struct

Crig::McpTool

Inherits Crig::ToolDyn < Struct < Value < Object

Constructors

from_mcp_server(definition : MCP::Protocol::Tool, client : MCP::Client::Client) : self
Source
new(mcp_definition : MCP::Protocol::Tool, client : MCP::Client::Client, timeout : Time::Span | Nil = DEFAULT_MCP_TOOL_TIMEOUT)
Source

Class methods

to_tool_definition(definition : MCP::Protocol::Tool) : Crig::Completion::ToolDefinition
Source

Instance methods

call(args : String) : String
Source
call_async(args : String) : Channel(MCP::Shared::AsyncResult(String))
Source
client
Source
description
Source
mcp_definition
Source
name
Source
parameters
Source
timeout
Source
with_timeout(timeout : Time::Span | Nil) : self

Set (or clear) the per-call timeout, returning a new tool. On elapse the call resolves to a ToolError instead of blocking forever (upstream #1914).

Source