Class: Woods::Console::Server::ToolSpec

Inherits:
Struct
  • Object
show all
Defined in:
lib/woods/console/tool_specs.rb

Overview

Value object that holds a single MCP tool’s declarative specification.

Instance Attribute Summary collapse

Instance Attribute Details

#descriptionString (readonly)

Returns Human-readable description shown to the LLM.

Returns:

  • (String)

    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)

#handlerProc (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.

Returns:

  • (Proc)

    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)

#nameString (readonly)

Returns MCP tool name (e.g. “console_count”).

Returns:

  • (String)

    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)

#propertiesHash (readonly)

Returns JSON Schema property definitions (name => description:).

Returns:

  • (Hash)

    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)

#requiredArray<String>? (readonly)

Returns Required property names, or nil.

Returns:

  • (Array<String>, nil)

    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)

#tierInteger (readonly)

Returns Tier number (1-4).

Returns:

  • (Integer)

    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)