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
Instance Method Summary collapse
-
#call(format: 'json') ⇒ Hash
Executes the display operation.
Instance Method Details
#call(format: 'json') ⇒ Hash
Executes the display operation.
31 32 33 34 35 36 37 |
# File 'lib/rosett_ai/mcp/tools/behaviour_display_tool.rb', line 31 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 |