#[mcp_tool]Expand description
Marks a function as an MCP tool.
MCP tools are explicitly opt-in and exposed through the MCP endpoint.
ยงAttributes
name = "tool_name"- Override the exposed tool nametitle = "Human title"- Display title for MCP clientsdescription = "..."- Tool descriptionpublic- No authentication requiredrequire_role("admin")- Require specific roletimeout = 30- Timeout in secondsrate_limit(requests = 100, per = "1m", key = "user")read_only- Annotation hint for clientsdestructive- Annotation hint for clientsidempotent- Annotation hint for clientsopen_world- Annotation hint for clients- Parameter
#[schemars(...)]/#[serde(...)]attrs - Included in generated input schema