Skip to main content

Module tool_trait

Module tool_trait 

Source

Structs§

ToolContext
Context passed to tool handlers. Contains pre-resolved values that many tools need, avoiding repeated async lock acquisition inside handlers. Extended with shared server state for tools that need cache/session access.
ToolOutput
Result returned by an McpTool handler.

Traits§

McpTool
Trait for a self-contained MCP tool. Each tool provides its own schema definition and handler, eliminating the possibility of schema/handler drift.

Functions§

get_bool
get_int
get_str
get_str_array