Update inputSchema example usage (#136)
* Update Tool inputSchema in README example usage * Update inputSchema usage in Tool tests
This commit is contained in:
parent
7a76001187
commit
36865fb056
1 changed files with 22 additions and 12 deletions
10
README.md
10
README.md
|
|
@ -434,15 +434,19 @@ server.withMethodHandler(ListTools.self) { _ in
|
|||
name: "weather",
|
||||
description: "Get current weather for a location",
|
||||
inputSchema: .object([
|
||||
"location": .string("City name or coordinates"),
|
||||
"units": .string("Units of measurement, e.g., metric, imperial")
|
||||
"properties": .object([
|
||||
"location": .string("City name or coordinates"),
|
||||
"units": .string("Units of measurement, e.g., metric, imperial")
|
||||
])
|
||||
])
|
||||
),
|
||||
Tool(
|
||||
name: "calculator",
|
||||
description: "Perform calculations",
|
||||
inputSchema: .object([
|
||||
"expression": .string("Mathematical expression to evaluate")
|
||||
"properties": .object([
|
||||
"expression": .string("Mathematical expression to evaluate")
|
||||
])
|
||||
])
|
||||
)
|
||||
]
|
||||
|
|
|
|||
Loading…
Reference in a new issue