|
33 | 33 | }, |
34 | 34 | { |
35 | 35 | "name": "sage_explain_error", |
36 | | - "description": "Get AI-friendly explanation of command error", |
| 36 | + "description": "Get a structured explanation of why a command failed. Returns {error_type, summary, root_cause, affected_files, suggestions}. Use to understand failures before attempting fixes. Parses common error patterns: compiler errors, test failures, permission denied, missing dependencies, syntax errors. Read-only, no side effects. Differs from sage_suggest_fix: this explains the problem; sage_suggest_fix provides fix commands. Use this first to understand, then sage_agentic_fix to get a fix.", |
37 | 37 | "inputSchema": { |
38 | 38 | "type": "object", |
39 | 39 | "properties": { |
40 | 40 | "command_id": { |
41 | 41 | "type": "integer", |
42 | | - "description": "Specific command ID (optional, defaults to last failed)" |
| 42 | + "description": "Run ID of the failed command (omit to analyze most recent failed command)" |
43 | 43 | } |
44 | 44 | } |
45 | 45 | } |
|
59 | 59 | }, |
60 | 60 | { |
61 | 61 | "name": "sage_spawn_agent", |
62 | | - "description": "Spawn specialized agent for task", |
| 62 | + "description": "Spawn a specialized sub-agent for a focused task. Returns {agent_id, status, result} when complete. Agent types: 'code' for implementation/refactoring, 'test' for writing/running tests, 'debug' for investigating failures, 'security' for vulnerability scanning, 'performance' for profiling/optimization. Use when a task benefits from focused expertise. The spawned agent runs in the same SAGE session and has access to command history. Side effects: agent may execute commands and modify files based on task. Agents run synchronously and return when complete.", |
63 | 63 | "inputSchema": { |
64 | 64 | "type": "object", |
65 | 65 | "properties": { |
66 | 66 | "agent_type": { |
67 | 67 | "type": "string", |
68 | 68 | "enum": ["code", "test", "debug", "security", "performance"], |
69 | | - "description": "Type of agent to spawn" |
| 69 | + "description": "Specialization: code (implement), test (verify), debug (investigate), security (scan), performance (optimize)" |
70 | 70 | }, |
71 | 71 | "task": { |
72 | 72 | "type": "string", |
73 | | - "description": "Task description for the agent" |
| 73 | + "description": "Natural language description of what the agent should accomplish" |
74 | 74 | } |
75 | 75 | }, |
76 | 76 | "required": ["agent_type", "task"] |
77 | 77 | } |
78 | 78 | }, |
79 | 79 | { |
80 | 80 | "name": "sage_run_workflow", |
81 | | - "description": "Execute workflow pipeline", |
| 81 | + "description": "Execute a named workflow pipeline (test, ci, deploy, or custom). Use when running multi-step automated sequences defined in YAML. Returns {success, steps: [{name, status, duration_ms, output}], total_duration_ms}. Side effects: executes commands defined in workflow, may modify files. Errors: throws WorkflowNotFound if name invalid, YAMLParseError if file malformed. Prefer over manual multi-command sequences for reproducible CI/CD tasks.", |
82 | 82 | "inputSchema": { |
83 | 83 | "type": "object", |
84 | 84 | "properties": { |
|
95 | 95 | }, |
96 | 96 | { |
97 | 97 | "name": "sage_get_history", |
98 | | - "description": "Get command history", |
| 98 | + "description": "Retrieve recent command execution history from SAGE's SQLite database. Returns [{run_id, command, exit_code, duration_ms, timestamp, compression_ratio}]. Use to review what commands ran, find a run_id for sage_show_raw or sage_explain_error, or analyze patterns in failures. Set failed_only=true to filter to non-zero exit codes only. Read-only, no side effects. Prefer over shell history for accurate timing and compression metrics.", |
99 | 99 | "inputSchema": { |
100 | 100 | "type": "object", |
101 | 101 | "properties": { |
102 | 102 | "limit": { |
103 | 103 | "type": "integer", |
104 | | - "description": "Number of commands to retrieve", |
| 104 | + "description": "Number of recent commands to retrieve (most recent first)", |
105 | 105 | "default": 10 |
106 | 106 | }, |
107 | 107 | "failed_only": { |
108 | 108 | "type": "boolean", |
109 | | - "description": "Only show failed commands", |
| 109 | + "description": "Filter to commands with non-zero exit code only", |
110 | 110 | "default": False |
111 | 111 | } |
112 | 112 | } |
|
143 | 143 | }, |
144 | 144 | { |
145 | 145 | "name": "sage_call", |
146 | | - "description": "Run a command as an explicit agent tool-call with purpose metadata (tracked for tool-quality metrics).", |
| 146 | + "description": "Run a command with explicit purpose tagging for analytics. Use instead of sage_run_command when you want to track WHY commands are run (read/search/test/build/deploy/audit). Returns same output as sage_run_command plus {purpose, agent} metadata. The purpose tag feeds SAGE's ML predictor to learn which command types fail in this repo. No side effects beyond command execution. Use 'read' for cat/head/tail, 'search' for grep/find, 'test' for pytest/jest, 'build' for make/npm build, 'deploy' for deployment scripts, 'audit' for security scans.", |
147 | 147 | "inputSchema": { |
148 | 148 | "type": "object", |
149 | 149 | "properties": { |
150 | | - "command": {"type": "string", "description": "Command to execute"}, |
151 | | - "purpose": {"type": "string", "enum": ["read", "search", "test", "build", "deploy", "audit", "unknown"], "default": "unknown"}, |
152 | | - "agent": {"type": "string", "description": "Calling agent name", "default": "mcp"} |
| 150 | + "command": {"type": "string", "description": "Shell command to execute"}, |
| 151 | + "purpose": {"type": "string", "enum": ["read", "search", "test", "build", "deploy", "audit", "unknown"], "description": "Why this command is being run - improves ML failure prediction", "default": "unknown"}, |
| 152 | + "agent": {"type": "string", "description": "Name of the calling agent for multi-agent tracking", "default": "mcp"} |
153 | 153 | }, |
154 | 154 | "required": ["command"] |
155 | 155 | } |
|
232 | 232 | }, |
233 | 233 | { |
234 | 234 | "name": "sage_agentic_fix", |
235 | | - "description": "Get an auto-fix suggestion for the last failed command. Returns the fix command, strategy, and confidence.", |
| 235 | + "description": "Get an auto-fix suggestion for a failed command. Analyzes the error output and returns {fix_command, strategy, confidence, explanation}. Use after a command fails to get a ready-to-run fix. Differs from sage_suggest_fix: this returns a single best fix with confidence score; sage_suggest_fix returns multiple options. Read-only - does NOT execute the fix (use sage_agentic_run for auto-apply). Confidence is 0.0-1.0; values >0.8 are high-confidence fixes. Returns null if no fix can be determined.", |
236 | 236 | "inputSchema": { |
237 | 237 | "type": "object", |
238 | 238 | "properties": { |
239 | | - "command_id": {"type": "integer", "description": "Specific command ID (optional, defaults to last failed)"} |
| 239 | + "command_id": {"type": "integer", "description": "Run ID of the failed command (omit to use most recent failed command)"} |
240 | 240 | } |
241 | 241 | } |
242 | 242 | }, |
|
0 commit comments