Skip to main content

tool_from_json_definition

Function tool_from_json_definition 

Source
pub fn tool_from_json_definition(value: Value) -> Result<Tool, ErrorData>
Expand description

Convert an untyped MCP tool-definition JSON object ({name, description, inputSchema, outputSchema}) into an [rmcp::model::Tool].

This is the shape MCP clients expect from tools/list. It is the conversion a server needs when its tool catalog is stored as plain JSON (for example, provider-derived schemas) rather than built with the rmcp-macros tool-router machinery.