Skip to main content

create_tool

Function create_tool 

Source
pub fn create_tool<F, Fut, Args>(
    name: &str,
    description: &str,
    handler: F,
) -> McpTool
where F: Fn(Args) -> Fut + Send + Sync + 'static, Fut: Future<Output = Result<McpToolResult>> + Send + 'static, Args: for<'de> Deserialize<'de> + JsonSchema + 'static,
Expand description

Helper function to create a tool without the macro (for dynamic tool creation)