pub fn tool_definition_with_annotations(
name: impl Into<String>,
title: Option<String>,
description: Option<String>,
input_schema: McpSchema,
output_schema: Option<McpSchema>,
annotations: Option<McpToolAnnotations>,
) -> Result<ToolDefinition, McpToolError>Expand description
Build and validate an MCP tool definition with tool annotations.
ยงErrors
Returns McpToolError when the annotations, metadata, input schema, or
output schema are invalid.