Class: RosettAi::Mcp::Tools::ToolingTool
- Inherits:
-
Object
- Object
- RosettAi::Mcp::Tools::ToolingTool
- Defined in:
- lib/rosett_ai/mcp/tools/tooling_tool.rb
Overview
MCP tool: run tooling validation.
Validates CI YAML syntax and checks tool versions. Read-only operation.
Constant Summary collapse
- TOOL_NAME =
'rai_tooling'- DESCRIPTION =
'Run tooling validation (CI YAML, version checks)'- ANNOTATIONS =
{ 'readOnlyHint' => true, 'destructiveHint' => false, 'idempotentHint' => true, 'openWorldHint' => false }.freeze
- VALID_ACTIONS =
['validate-ci-yaml', 'check-versions'].freeze
Instance Method Summary collapse
-
#call(action: 'validate-ci-yaml', verbose: false) ⇒ Hash
Executes tooling validation.
Instance Method Details
#call(action: 'validate-ci-yaml', verbose: false) ⇒ Hash
Executes tooling validation.
34 35 36 37 38 39 40 41 42 43 |
# File 'lib/rosett_ai/mcp/tools/tooling_tool.rb', line 34 def call(action: 'validate-ci-yaml', verbose: false) return ResponseHelper.error("Invalid action: #{action}") unless VALID_ACTIONS.include?(action) case action when 'validate-ci-yaml' then validate_ci_yaml(verbose) when 'check-versions' then check_versions(verbose) end rescue StandardError => e ResponseHelper.error("Tooling #{action} failed: #{e.}") end |