Class: RosettAi::Mcp::Tools::BehaviourListTool
- Inherits:
-
Object
- Object
- RosettAi::Mcp::Tools::BehaviourListTool
- Defined in:
- lib/rosett_ai/mcp/tools/behaviour_list_tool.rb
Overview
MCP tool: list rai behaviour files.
Returns a structured list of all behaviour files with metadata (name, version, rule count, enabled status).
Constant Summary collapse
- TOOL_NAME =
Returns MCP tool identifier string.
'rai_behaviour_list'- DESCRIPTION =
Returns Human-readable description of this tool.
'List all rai behaviour configuration files'- ANNOTATIONS =
Returns MCP protocol annotations describing tool capabilities.
{ 'readOnlyHint' => true, 'destructiveHint' => false, 'idempotentHint' => true, 'openWorldHint' => false }.freeze
Instance Method Summary collapse
-
#call ⇒ Hash
Executes the listing.
Instance Method Details
#call ⇒ Hash
Executes the listing.
33 34 35 36 37 38 39 |
# File 'lib/rosett_ai/mcp/tools/behaviour_list_tool.rb', line 33 def call dir = RosettAi.root.join('conf', 'behaviour') return { behaviours: [] } unless dir.directory? behaviours = dir.glob('*.yml').filter_map { |path| load_behaviour(path) } { behaviours: behaviours } end |