| Package | Description |
|---|---|
| io.modelcontextprotocol.server | |
| org.noear.solon.ai.mcp.server |
| Modifier and Type | Method and Description |
|---|---|
McpServerFeatures.SyncToolSpecification.Builder |
McpServerFeatures.SyncToolSpecification.Builder.callHandler(BiFunction<McpSyncServerExchange,McpSchema.CallToolRequest,McpSchema.CallToolResult> callHandler)
Sets the call tool handler function.
|
McpServer.SyncSpecification<S> |
McpServer.SyncSpecification.rootsChangeHandler(BiConsumer<McpSyncServerExchange,List<McpSchema.Root>> handler)
Registers a consumer that will be notified when the list of roots changes.
|
McpServer.SyncSpecification<S> |
McpServer.SyncSpecification.rootsChangeHandlers(List<BiConsumer<McpSyncServerExchange,List<McpSchema.Root>>> handlers)
Registers multiple consumers that will be notified when the list of roots
changes.
|
McpServer.SyncSpecification<S> |
McpServer.SyncSpecification.tool(McpSchema.Tool tool,
BiFunction<McpSyncServerExchange,Map<String,Object>,McpSchema.CallToolResult> handler)
Deprecated.
Use
McpServer.SyncSpecification.toolCall(McpSchema.Tool, BiFunction) instead for tool
calls that require a request object. |
McpServer.SyncSpecification<S> |
McpServer.SyncSpecification.toolCall(McpSchema.Tool tool,
BiFunction<McpSyncServerExchange,McpSchema.CallToolRequest,McpSchema.CallToolResult> handler)
Adds a single tool with its implementation handler to the server.
|
| Constructor and Description |
|---|
Sync(McpSchema.Implementation serverInfo,
McpSchema.ServerCapabilities serverCapabilities,
List<McpServerFeatures.SyncToolSpecification> tools,
Map<String,McpServerFeatures.SyncResourceSpecification> resources,
List<McpSchema.ResourceTemplate> resourceTemplates,
Map<String,McpServerFeatures.SyncPromptSpecification> prompts,
Map<McpSchema.CompleteReference,McpServerFeatures.SyncCompletionSpecification> completions,
List<BiConsumer<McpSyncServerExchange,List<McpSchema.Root>>> rootsChangeConsumers,
String instructions)
Create an instance and validate the arguments.
|
SyncToolSpecification(McpSchema.Tool tool,
BiFunction<McpSyncServerExchange,Map<String,Object>,McpSchema.CallToolResult> call)
Deprecated.
|
| Constructor and Description |
|---|
McpServerContext(McpSyncServerExchange serverExchange) |
Copyright © 2025. All rights reserved.