Class: KairosMcp::Tools::SystemUpgrade
- Defined in:
- lib/kairos_mcp/tools/system_upgrade.rb
Instance Method Summary collapse
- #call(arguments) ⇒ Object
- #category ⇒ Object
- #description ⇒ Object
- #examples ⇒ Object
- #input_schema ⇒ Object
- #name ⇒ Object
- #related_tools ⇒ Object
- #usecase_tags ⇒ Object
Methods inherited from BaseTool
#initialize, #invoke_tool, #to_full_schema, #to_schema
Constructor Details
This class inherits a constructor from KairosMcp::Tools::BaseTool
Instance Method Details
#call(arguments) ⇒ Object
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/kairos_mcp/tools/system_upgrade.rb', line 79 def call(arguments) command = arguments['command'] approved = arguments['approved'] || false names = arguments['names'] case command when 'check' handle_check when 'preview' handle_preview when 'apply' handle_apply(approved, names: names) when 'status' handle_status when 'skillsets' handle_skillsets else text_content("Unknown command: #{command}. Use check, preview, apply, status, or skillsets.") end end |
#category ⇒ Object
22 23 24 |
# File 'lib/kairos_mcp/tools/system_upgrade.rb', line 22 def category :utility end |
#description ⇒ Object
17 18 19 20 |
# File 'lib/kairos_mcp/tools/system_upgrade.rb', line 17 def description 'Check for gem updates and safely migrate data directory templates. ' \ 'Supports check, preview, apply, and status commands.' end |
#examples ⇒ Object
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/kairos_mcp/tools/system_upgrade.rb', line 30 def examples [ { title: 'Check if upgrade is needed', code: 'system_upgrade(command: "check")' }, { title: 'Preview all changes before applying', code: 'system_upgrade(command: "preview")' }, { title: 'Apply the upgrade', code: 'system_upgrade(command: "apply", approved: true)' }, { title: 'Show current meta status', code: 'system_upgrade(command: "status")' } ] end |
#input_schema ⇒ Object
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/kairos_mcp/tools/system_upgrade.rb', line 55 def input_schema { type: 'object', properties: { command: { type: 'string', description: 'Command: "check", "preview", "apply", "status", or "skillsets". ' \ '"skillsets" lists all available SkillSets with install status.', enum: %w[check preview apply status skillsets] }, approved: { type: 'boolean', description: 'Set to true to approve and apply the upgrade (required for apply command)' }, names: { type: 'array', items: { type: 'string' }, description: 'Specific SkillSet names to install/upgrade (optional, for apply command)' } }, required: ['command'] } end |
#name ⇒ Object
13 14 15 |
# File 'lib/kairos_mcp/tools/system_upgrade.rb', line 13 def name 'system_upgrade' end |
#related_tools ⇒ Object
51 52 53 |
# File 'lib/kairos_mcp/tools/system_upgrade.rb', line 51 def %w[skills_evolve chain_record chain_status] end |
#usecase_tags ⇒ Object
26 27 28 |
# File 'lib/kairos_mcp/tools/system_upgrade.rb', line 26 def %w[upgrade update migration version template system maintenance] end |