Skip to content

Commit c1a6958

Browse files
committed
Add "type: object" to InputSchema
This allows tools like mcpInspector to list the tools
1 parent c0407a0 commit c1a6958

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,8 @@ 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([
438439
"location": .string("City name or coordinates"),
439440
"units": .string("Units of measurement, e.g., metric, imperial")
@@ -444,6 +445,7 @@ await server.withMethodHandler(ListTools.self) { _ in
444445
name: "calculator",
445446
description: "Perform calculations",
446447
inputSchema: .object([
448+
"type": .string("object"),
447449
"properties": .object([
448450
"expression": .string("Mathematical expression to evaluate")
449451
])
@@ -886,4 +888,4 @@ see the [GitHub Releases page](https://github.com/modelcontextprotocol/swift-sdk
886888
This project is licensed under the MIT License.
887889

888890
[mcp]: https://modelcontextprotocol.io
889-
[mcp-spec-2025-03-26]: https://modelcontextprotocol.io/specification/2025-03-26
891+
[mcp-spec-2025-03-26]: https://modelcontextprotocol.io/specification/2025-03-26

0 commit comments

Comments
 (0)