Class: RosettAi::Mcp::Tools::ValidateTool
- Inherits:
-
Object
- Object
- RosettAi::Mcp::Tools::ValidateTool
- Defined in:
- lib/rosett_ai/mcp/tools/validate_tool.rb
Overview
MCP tool: validate rai configuration files.
Runs behaviour, design, and tooling validation and returns structured results. Read-only operation.
Constant Summary collapse
- TOOL_NAME =
'rai_validate'- DESCRIPTION =
'Validate rai configuration files (behaviours, designs, tooling)'- ANNOTATIONS =
{ 'readOnlyHint' => true, 'destructiveHint' => false, 'idempotentHint' => true, 'openWorldHint' => false }.freeze
Instance Method Summary collapse
-
#call(scope: nil) ⇒ Hash
Executes the validation.
Instance Method Details
#call(scope: nil) ⇒ Hash
Executes the validation.
31 32 33 34 35 36 37 38 |
# File 'lib/rosett_ai/mcp/tools/validate_tool.rb', line 31 def call(scope: nil) results = { valid: true, errors: [], warnings: [] } scopes = scope ? [scope] : ['behaviour', 'design'] scopes.each { |s| validate_scope(s, results) } results[:valid] = results[:errors].empty? results end |