Skip to content

Commit 9bfbcb4

Browse files
committed
print tools properties
Signed-off-by: Christian Tzolov <[email protected]>
1 parent 77b973f commit 9bfbcb4

File tree

1 file changed

+3
-0
lines changed
  • model-context-protocol/weather/starter-webmvc-server/src/test/java/org/springframework/ai/mcp/sample/client

1 file changed

+3
-0
lines changed

model-context-protocol/weather/starter-webmvc-server/src/test/java/org/springframework/ai/mcp/sample/client/SampleClient.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ public void run() {
4646
// List and demonstrate tools
4747
ListToolsResult toolsList = client.listTools();
4848
System.out.println("Available Tools = " + toolsList);
49+
toolsList.tools().stream().forEach(tool -> {
50+
System.out.println("Tool: " + tool.name() + ", description: " + tool.description() + ", schema: " + tool.inputSchema());
51+
});
4952

5053
CallToolResult weatherForcastResult = client.callTool(new CallToolRequest("getWeatherForecastByLocation",
5154
Map.of("latitude", "47.6062", "longitude", "-122.3321")));

0 commit comments

Comments
 (0)