McpServerFeatures.SyncToolSpecification
.@Deprecated
public static class McpServerFeatures.SyncToolRegistration
extends java.lang.Object
Example tool registration:
new McpServerFeatures.SyncToolRegistration(
new Tool(
"calculator",
"Performs mathematical calculations",
new JsonSchemaObject()
.required("expression")
.property("expression", JsonSchemaType.STRING)
),
args -> {
String expr = (String) args.get("expression");
return new CallToolResult("Result: " + evaluate(expr));
}
)
构造器和说明 |
---|
SyncToolRegistration()
已过时。
|
限定符和类型 | 方法和说明 |
---|---|
McpServerFeatures.SyncToolSpecification |
toSpecification()
已过时。
|
public McpServerFeatures.SyncToolSpecification toSpecification()