Module: ToolRegistry
- Defined in:
- lib/stack-service-base/mcp/mcp_tool_registry.rb
Defined Under Namespace
Classes: Definition, ExecutionContext
Class Method Summary
collapse
Class Method Details
.define(name, &block) ⇒ Object
63
64
65
66
67
|
# File 'lib/stack-service-base/mcp/mcp_tool_registry.rb', line 63
def define(name, &block)
definition = Definition.new(name)
definition.instance_eval(&block)
registry[definition.name] = definition
end
|
.fetch(name) ⇒ Object
77
78
79
|
# File 'lib/stack-service-base/mcp/mcp_tool_registry.rb', line 77
def fetch(name)
registry[name.to_s]
end
|
.list ⇒ Object
73
74
75
|
# File 'lib/stack-service-base/mcp/mcp_tool_registry.rb', line 73
def list
registry.values.map(&:to_h)
end
|
.registry ⇒ Object
69
70
71
|
# File 'lib/stack-service-base/mcp/mcp_tool_registry.rb', line 69
def registry
@registry ||= {}
end
|