Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -433,19 +433,27 @@ await server.withMethodHandler(ListTools.self) { _ in
Tool(
name: "weather",
description: "Get current weather for a location",
inputSchema: .object([
inputSchema`: .object([
"type": .string("object"),
"properties": .object([
"location": .string("City name or coordinates"),
"units": .string("Units of measurement, e.g., metric, imperial")
"location": .object([
"description": .string("City name or coordinates"),
"type": .string("string"),
"units": .string("Units of measurement, e.g., metric, imperial")
])
])
])
),
Tool(
name: "calculator",
description: "Perform calculations",
inputSchema: .object([
"type": .string("object"),
"properties": .object([
"expression": .string("Mathematical expression to evaluate")
"expression": .object([
"type": .string("string"),
"description": .string("Mathematical expression to evaluate")
])
])
])
)
Expand Down Expand Up @@ -886,4 +894,4 @@ see the [GitHub Releases page](https://github.com/modelcontextprotocol/swift-sdk
This project is licensed under the MIT License.

[mcp]: https://modelcontextprotocol.io
[mcp-spec-2025-03-26]: https://modelcontextprotocol.io/specification/2025-03-26
[mcp-spec-2025-03-26]: https://modelcontextprotocol.io/specification/2025-03-26