// 同步工具注册var syncToolRegistration = new McpServerFeatures.SyncToolRegistration( new Tool("calculator", "执行基本计算", new JsonSchemaObject() .addProperty("operation", new JsonSchemaString()) .addProperty("a", new JsonSchemaNumber()) .addProperty("b", new JsonSchemaNumber()) ), request -> { // 工具实现 return new CallToolResult(result); });