Define an agent tool
Arguments
- fun
R function implementing the tool.
- name
Tool name exposed to the model.
- description
Tool description.
- arguments
Optional argument schema, compatible with
ellmer::tool(). Missing schemas are inferred fromfunformals as generic JSON types.- side_effects
Side-effect metadata.
- returns
Return type metadata.
- interrupt
Whether the tool should pause for approval before execution.
- timeout
Optional timeout metadata.
- max_output_tokens
Approximate output token threshold before offloading.
Optional tags.