pub fn tool_definition_for_input<Input>(
name: impl Into<String>,
title: Option<String>,
description: Option<String>,
output_schema: Option<McpSchema>,
) -> Result<McpTypedTool<Input>, McpToolError>where
Input: McpToolInput,Expand description
Build and validate a typed MCP tool definition from its input type.
§Errors
Returns McpToolError when the tool metadata is invalid or when the input
type’s generated schema or output schema is not accepted.