Skip to main content

closure_tool

Function closure_tool 

Source
pub fn closure_tool<F>(
    name: String,
    description: Option<String>,
    input_schema: Value,
    handler: F,
) -> Tool
where F: Fn(&HashMap<String, Value>) -> McpResult<Vec<ContentBlock>> + Send + Sync + 'static,
Expand description

Extension to create tools with closures