diff --git a/spring-ai-mcp-core/src/main/java/org/springframework/ai/mcp/client/McpSyncClient.java b/spring-ai-mcp-core/src/main/java/org/springframework/ai/mcp/client/McpSyncClient.java index 208eedf..2454a2e 100644 --- a/spring-ai-mcp-core/src/main/java/org/springframework/ai/mcp/client/McpSyncClient.java +++ b/spring-ai-mcp-core/src/main/java/org/springframework/ai/mcp/client/McpSyncClient.java @@ -111,6 +111,15 @@ public class McpSyncClient implements AutoCloseable { * Send a tools/list request. * @return the list of tools result. */ + public McpSchema.ListToolsResult listTools() { + return this.delegate.listTools().block(); + } + + /** + * Send a tools/list request. + * @param cursor the cursor + * @return the list of tools result. + */ public McpSchema.ListToolsResult listTools(String cursor) { return this.delegate.listTools(cursor).block(); } @@ -128,6 +137,14 @@ public class McpSyncClient implements AutoCloseable { return this.delegate.listResources(cursor).block(); } + /** + * Send a resources/list request. + * @return the list of resources result. + */ + public McpSchema.ListResourcesResult listResources() { + return this.delegate.listResources().block(); + } + /** * Send a resources/read request. * @param resource the resource to read @@ -158,6 +175,14 @@ public class McpSyncClient implements AutoCloseable { return this.delegate.listResourceTemplates(cursor).block(); } + /** + * Request a list of resource templates the server has. + * @return the list of resource templates result. + */ + public McpSchema.ListResourceTemplatesResult listResourceTemplates() { + return this.delegate.listResourceTemplates().block(); + } + /** * List Changed Notification. When the list of available resources changes, servers * that declared the listChanged capability SHOULD send a notification: @@ -195,6 +220,10 @@ public class McpSyncClient implements AutoCloseable { return this.delegate.listPrompts(cursor).block(); } + public ListPromptsResult listPrompts() { + return this.delegate.listPrompts().block(); + } + public GetPromptResult getPrompt(GetPromptRequest getPromptRequest) { return this.delegate.getPrompt(getPromptRequest).block(); }