Open
Description
Describe the bug
Is the README example Tool registration method incorrect?
Using the example from the README, I get an error saying that the inputSchema is expected to be an object.
Example from the README:
Tool(
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")
])
)
When I try this format, I get the expected response:
Tool(
name: "weather",
description: "Get current weather for a location",
inputSchema: .object([
"type": "object",
"properties": [
"a": ["type": "number"],
"b": ["type": "number"]
],
"required": ["a", "b"]
])
)
To Reproduce
Steps to reproduce the behavior:
1.
Expected behavior
A clear and concise description of what you expected to happen.
Logs
If applicable, add logs to help explain your problem.
Additional context
Add any other context about the problem here.