Class: Woods::Console::Server::ToolSpec
- Inherits:
-
Struct
- Object
- Struct
- Woods::Console::Server::ToolSpec
- Defined in:
- lib/woods/console/tool_specs.rb
Overview
Value object that holds a single MCP tool’s declarative specification.
Instance Attribute Summary collapse
-
#description ⇒ String
readonly
Human-readable description shown to the LLM.
-
#handler ⇒ Proc
readonly
Lambda called with symbolised args hash; returns the request Hash forwarded to the bridge/executor.
-
#name ⇒ String
readonly
MCP tool name (e.g. “console_count”).
-
#properties ⇒ Hash
readonly
JSON Schema property definitions (name => description:).
-
#required ⇒ Array<String>?
readonly
Required property names, or nil.
-
#tier ⇒ Integer
readonly
Tier number (1-4).
Instance Attribute Details
#description ⇒ String (readonly)
Returns Human-readable description shown to the LLM.
35 |
# File 'lib/woods/console/tool_specs.rb', line 35 ToolSpec = Struct.new(:name, :description, :properties, :required, :tier, :handler, keyword_init: true) |
#handler ⇒ Proc (readonly)
Returns Lambda called with symbolised args hash; returns the request Hash forwarded to the bridge/executor. Any tier-specific objects (validators, guards) are captured in the lambda’s closure.
35 |
# File 'lib/woods/console/tool_specs.rb', line 35 ToolSpec = Struct.new(:name, :description, :properties, :required, :tier, :handler, keyword_init: true) |
#name ⇒ String (readonly)
Returns MCP tool name (e.g. “console_count”).
35 |
# File 'lib/woods/console/tool_specs.rb', line 35 ToolSpec = Struct.new(:name, :description, :properties, :required, :tier, :handler, keyword_init: true) |
#properties ⇒ Hash (readonly)
Returns JSON Schema property definitions (name => description:).
35 |
# File 'lib/woods/console/tool_specs.rb', line 35 ToolSpec = Struct.new(:name, :description, :properties, :required, :tier, :handler, keyword_init: true) |
#required ⇒ Array<String>? (readonly)
Returns Required property names, or nil.
35 |
# File 'lib/woods/console/tool_specs.rb', line 35 ToolSpec = Struct.new(:name, :description, :properties, :required, :tier, :handler, keyword_init: true) |
#tier ⇒ Integer (readonly)
Returns Tier number (1-4).
35 |
# File 'lib/woods/console/tool_specs.rb', line 35 ToolSpec = Struct.new(:name, :description, :properties, :required, :tier, :handler, keyword_init: true) |