Smith::MCP::Manager
Inherits Reference < Object
Every configured server, and the naming rules that keep their tools apart.
Constants
MAX_TOOL_NAME = 64
Anthropic and OpenAI both cap tool names at 64 characters and accept only this alphabet, so a server called "my server!" has to be folded into it before it ever reaches a request.
Constructors
build(specs : Array(ServerSpec), timeout : Time::Span = Client::DEFAULT_TIMEOUT, startup_timeout : Time::Span = Client::STARTUP_TIMEOUT) : Manager
Sourcenew(handles : Array(ServerHandle) = Array(ServerHandle).new)
SourceClass methods
sanitize(value : String) : String
Sourcetool_name(server : String, tool : String) : String
The registered name for one tool. The mcp__ prefix is what keeps these
clear of the built-in tools and makes mcp__filesystem__* addressable in
a permission rule.
unique(name : String, taken : Set(String)) : String
SourceInstance methods
[](name : String) : ServerHandle | Nil
Sourceempty?
Sourcehandles
Sourcerunning
Sourceshutdown
Sourcestart_all(warn_io : IO = STDERR) : Nil
Starts everything, reporting failures rather than raising them.