fix: remove unnecessary fields from tools' inputSchema (#856)

This commit is contained in:
Federico Poli 2026-05-28 17:28:57 +02:00 • committed by GitHub
commit 53e4410d99
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -169,6 +169,8 @@ async fn main() -> anyhow::Result<()> {
}
```
The generated tool `inputSchema` is derived from the fields of `T`. The type name and documentation on `T` are ignored; only field names, field types, and field documentation are used.
When you need custom server metadata or multiple capabilities (tools + prompts), use explicit `#[tool_handler]`:
```rust,ignore