class Riffer::Mcp::Registration
Per-server state managed by Riffer::Mcp::Registry.
Created when a server is registered. Discovers tools via the MCP tools/list call, then generates tool classes.
Attributes
The manifest that describes this server.
Public Class Methods
Source
# File lib/riffer/mcp/registration.rb, line 23 def initialize(manifest) @manifest = manifest @cancelled = false @tools = [] #: Array[singleton(Riffer::Tool)] @mutex = Mutex.new run_discovery end
Public Instance Methods
Source
# File lib/riffer/mcp/registration.rb, line 36 def retire! @mutex.synchronize { @cancelled = true } end
Retires this registration, preventing in-flight discovery from publishing state.
Source
# File lib/riffer/mcp/registration.rb, line 44 def retired? @mutex.synchronize { @cancelled } end
Returns true if this registration has been retired.
Source
# File lib/riffer/mcp/registration.rb, line 17 def tools @mutex.synchronize { @tools } end
Generated Riffer::Tool subclasses.