struct

Smith::MCP::ToolDefinition

Inherits Struct < Value < Object

One tool as the server describes it. input_schema is passed to the provider untouched — LLM::ToolSpec#parameters is a JSON::Any, so the translation really is a hand-through, $refs and all.

Constructors

new(name : String, description : String, input_schema : JSON::Any)
Source

Class methods

from_json(value : JSON::Any) : ToolDefinition | Nil
Source
normalize_schema(value : JSON::Any | Nil) : JSON::Any

A schema smith can hand to a provider. Servers omit inputSchema, send null, or send a bare {} — all three mean "no arguments", and a provider that receives them as-is may reject the whole request.

Source

Instance methods

description
Source
input_schema
Source
name
Source