class

MCP::Server::ToolRouter

Inherits Reference < Object

Instance methods

add_tool(name : String, handler : ToolHandler)
Source
add_tool_async(name : String, &handler : AsyncToolHandler)

Register an async tool handler. The handler receives CallToolRequestParams and RequestHandlerExtra and returns a Channel(AsyncResult(CallToolResult)). The router waits on the channel and returns or raises accordingly.

Source
disable(name : String)
Source
enable(name : String)
Source
has_tool?(name : String) : Bool
Source
remove_tool(name : String)
Source

Nested types