class

Enkaidu::MCPFunction

Inherits LLM::Function < Reference < Object

Defines a tool / function from an MCP server Because of an MCP function's input/output schema-only definitions, this class is derived from LLM::Function.

Constructors

new(tool_def : JSON::Any, mcpc : MCPC::HttpConnection, cli : Enkaidu::Session)

Initialize with the JSON representation of the tool return by MCP "tools/list", and the MCPC connection to use to make the tool call

Source

Instance methods

description
Source
input_json_schema(json : JSON::Builder)

The input schema for the parameters to this function, into the JSON builder.

Source
name
Source
new_runner

Return an instance of this function's Runner

Source
side_effects

Don't know what the MCP server does, it could be local, it could be remote.

Source
title
Source
to_json
Source
to_s(io)
Source

Nested types