Skip to main content

tool_with_annotations

Function tool_with_annotations 

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

Construct an SDK MCP tool definition with MCP annotations.