feat: add trait-based tool declaration (#677)
* feat: add trait-based tool declaration * fix: typo * fix: add docs, make more idomatic patterns, allow for empty parameters and return types * fix: format code * fix: add default trait * fix: docs typo
This commit is contained in:
parent
332fcbfb91
commit
6c336a90c1
1 changed files with 518 additions and 5 deletions
|
|
@ -130,7 +130,7 @@ async fn calculate(&self, params: Parameters<CalculationRequest>) -> Result<Json
|
|||
# }
|
||||
```
|
||||
|
||||
The `#[tool]` macro automatically generates an output schema from the `CalculationResult` type.
|
||||
The `#[tool]` macro automatically generates an output schema from the `CalculationResult` type. See the [documentation of `tool` module](crate::handler::server::router::tool) for more instructions.
|
||||
|
||||
## Tasks
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue