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 =
Returns MCP tool identifier string.
'rai_tooling'- DESCRIPTION =
Returns Human-readable description of this tool.
'Run tooling validation (CI YAML, version checks)'- ANNOTATIONS =
Returns MCP protocol annotations describing tool capabilities.
{ 'readOnlyHint' => true, 'destructiveHint' => false, 'idempotentHint' => true, 'openWorldHint' => false }.freeze
- VALID_ACTIONS =
Returns Set of permitted action values.
['validate-ci-yaml', 'check-versions'].freeze
- INPUT_SCHEMA =
Returns JSON Schema defining the tool input parameters.
{ type: 'object', properties: { action: { type: 'string', enum: ['validate-ci-yaml', 'check-versions'], description: 'Tooling action (default: validate-ci-yaml)' }, verbose: { type: 'boolean', description: 'Show detailed output (default: false)' } } }.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.
54 55 56 57 58 59 60 61 62 63 |
# File 'lib/rosett_ai/mcp/tools/tooling_tool.rb', line 54 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 |