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 =
'rai_behaviour_list'- DESCRIPTION =
'List all rai behaviour configuration files'- ANNOTATIONS =
{ '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.
30 31 32 33 34 35 36 |
# File 'lib/rosett_ai/mcp/tools/behaviour_list_tool.rb', line 30 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 |