Class: RosettAi::Mcp::Tools::ProjectTool
- Inherits:
-
Object
- Object
- RosettAi::Mcp::Tools::ProjectTool
- Defined in:
- lib/rosett_ai/mcp/tools/project_tool.rb
Overview
MCP tool: show project status and information.
Returns project lifecycle status, info, or drift detection. Read-only operation.
Constant Summary collapse
- TOOL_NAME =
'rai_project'- DESCRIPTION =
'Show rai project status, info, or drift detection'- ANNOTATIONS =
{ 'readOnlyHint' => true, 'destructiveHint' => false, 'idempotentHint' => true, 'openWorldHint' => false }.freeze
- VALID_ACTIONS =
['status', 'info', 'drift'].freeze
Instance Method Summary collapse
-
#call(action: 'status') ⇒ Hash
Executes the project query.
Instance Method Details
#call(action: 'status') ⇒ Hash
Executes the project query.
33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/rosett_ai/mcp/tools/project_tool.rb', line 33 def call(action: 'status') return ResponseHelper.error("Invalid action: #{action}") unless VALID_ACTIONS.include?(action) case action when 'status' then action_status when 'info' then action_info when 'drift' then action_drift end rescue StandardError => e ResponseHelper.error("Project #{action} failed: #{e.}") end |