@@ -433,19 +433,27 @@ await server.withMethodHandler(ListTools.self) { _ in
433433 Tool (
434434 name : " weather" ,
435435 description : " Get current weather for a location" ,
436- inputSchema : .object ([
436+ inputSchema`: .object ([
437+ " type" : .string (" object" ),
437438 " properties" : .object ([
438- " location" : .string (" City name or coordinates" ),
439- " units" : .string (" Units of measurement, e.g., metric, imperial" )
439+ " location" : .object ([
440+ " description" : .string (" City name or coordinates" ),
441+ " type" : .string (" string" ),
442+ " units" : .string (" Units of measurement, e.g., metric, imperial" )
443+ ])
440444 ])
441445 ])
442446 ),
443447 Tool (
444448 name : " calculator" ,
445449 description : " Perform calculations" ,
446450 inputSchema : .object ([
451+ " type" : .string (" object" ),
447452 " properties" : .object ([
448- " expression" : .string (" Mathematical expression to evaluate" )
453+ " expression" : .object ([
454+ " type" : .string (" string" ),
455+ " description" : .string (" Mathematical expression to evaluate" )
456+ ])
449457 ])
450458 ])
451459 )
@@ -886,4 +894,4 @@ see the [GitHub Releases page](https://github.com/modelcontextprotocol/swift-sdk
886894This project is licensed under the MIT License.
887895
888896[ mcp ] : https://modelcontextprotocol.io
889- [ mcp-spec-2025-03-26 ] : https://modelcontextprotocol.io/specification/2025-03-26
897+ [ mcp-spec-2025-03-26 ] : https://modelcontextprotocol.io/specification/2025-03-26
0 commit comments