From 6d5c968d9af763df4534bd0217e854aaf147f834 Mon Sep 17 00:00:00 2001 From: EhsanAzish80 Date: Fri, 25 Sep 2026 17:37:03 +0300 Subject: [PATCH] Fix tool input schemas in README examples --- README.md | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 1bf1670a..df004395 100644 --- a/README.md +++ b/README.md @@ -703,9 +703,16 @@ await server.withMethodHandler(ListTools.self) { _ in name: "weather", description: "Get current weather for a location", inputSchema: .object([ + "type": "object", "properties": .object([ - "location": .string("City name or coordinates"), - "units": .string("Units of measurement, e.g., metric, imperial") + "location": .object([ + "type": "string", + "description": "City name or coordinates" + ]), + "units": .object([ + "type": "string", + "description": "Units of measurement, e.g., metric, imperial" + ]) ]) ]) ), @@ -713,8 +720,12 @@ await server.withMethodHandler(ListTools.self) { _ in name: "calculator", description: "Perform calculations", inputSchema: .object([ + "type": "object", "properties": .object([ - "expression": .string("Mathematical expression to evaluate") + "expression": .object([ + "type": "string", + "description": "Mathematical expression to evaluate" + ]) ]) ]) )