Class: RosettAi::Mcp::Tools::BehaviourDisplayTool
- Inherits:
-
Object
- Object
- RosettAi::Mcp::Tools::BehaviourDisplayTool
- Defined in:
- lib/rosett_ai/mcp/tools/behaviour_display_tool.rb
Overview
MCP tool: display behaviour configuration table.
Returns a formatted overview of all behaviours with their rules, versions, and enabled status.
Constant Summary collapse
- TOOL_NAME =
'rai_behaviour_display'- DESCRIPTION =
'Display behaviour configuration overview'- ANNOTATIONS =
{ 'readOnlyHint' => true, 'destructiveHint' => false, 'idempotentHint' => true, 'openWorldHint' => false }.freeze
- INPUT_SCHEMA =
{ type: 'object', properties: { format: { type: 'string', enum: ['json', 'table'], description: 'Output format (default: json)' } } }.freeze
Instance Method Summary collapse
-
#call(format: 'json') ⇒ Hash
Executes the display operation.
Instance Method Details
#call(format: 'json') ⇒ Hash
Executes the display operation.
42 43 44 45 46 47 48 |
# File 'lib/rosett_ai/mcp/tools/behaviour_display_tool.rb', line 42 def call(format: 'json') dir = RosettAi.root.join('conf', 'behaviour') return { behaviours: [], format: format } unless dir.directory? behaviours = dir.glob('*.yml').filter_map { |path| load_display(path) } { behaviours: behaviours, format: format, total: behaviours.size } end |