Skip to main content

tool

Function tool 

Source
pub fn tool<F>(
    name: impl Into<String>,
    description: impl Into<String>,
    input_schema: Value,
    handler: F,
) -> SdkMcpTool
where F: Fn(Value) -> Result<Vec<MCPContent>, String> + Send + Sync + 'static,
Expand description

Construct an SDK MCP tool definition.