fixgraph_submit_fix
Submit a new software fix to the FixGraph community database, including root cause analysis, step-by-step instructions, and risk assessment for troubleshooting workflows.
Instructions
Submit a new fix to FixGraph. Requires FIXGRAPH_API_KEY env var.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| issue_id | Yes | Issue ID to attach the fix to | |
| title | Yes | Short title for the fix | |
| root_cause | Yes | Why the issue occurs | |
| steps | Yes | Ordered fix steps | |
| validation | No | How to verify the fix worked | |
| risk_level | No | Risk level of applying the fix |
Implementation Reference
- src/index.js:73-91 (handler)The `submitFix` function contains the logic to perform an HTTP POST request to submit a fix to the FixGraph API.
async function submitFix({ issue_id, title, root_cause, steps, validation, risk_level = 'low' }) { if (!API_KEY) { return { content: [{ type: 'text', text: 'FIXGRAPH_API_KEY is required to submit fixes.' }], isError: true }; } const res = await fetch(`${BASE_URL}/fixes`, { method: 'POST', headers: headers(), body: JSON.stringify({ issue_id, title, root_cause, steps, validation, risk_level, source: 'mcp' }), }); if (!res.ok) { const err = await res.text(); return { content: [{ type: 'text', text: `Failed to submit fix (${res.status}): ${err}` }], isError: true }; } const data = await res.json(); return { content: [{ type: 'text', text: `Fix submitted successfully. ID: ${data.id ?? data.fix_id ?? 'ok'}` }] }; } - src/index.js:127-154 (schema)The input schema for the 'fixgraph_submit_fix' tool defining the required parameters (issue_id, title, root_cause, steps).
name: 'fixgraph_submit_fix', description: 'Submit a new fix to FixGraph. Requires FIXGRAPH_API_KEY env var.', inputSchema: { type: 'object', properties: { issue_id: { type: 'string', description: 'Issue ID to attach the fix to' }, title: { type: 'string', description: 'Short title for the fix' }, root_cause: { type: 'string', description: 'Why the issue occurs' }, steps: { type: 'array', description: 'Ordered fix steps', items: { type: 'object', properties: { order: { type: 'integer' }, title: { type: 'string' }, description: { type: 'string' }, code: { type: 'string' }, codeLanguage:{ type: 'string' }, }, required: ['order', 'description'], }, }, validation: { type: 'string', description: 'How to verify the fix worked' }, risk_level: { type: 'string', enum: ['low', 'medium', 'high'], description: 'Risk level of applying the fix' }, }, required: ['issue_id', 'title', 'root_cause', 'steps'], }, - src/index.js:165-165 (registration)The tool request handler registration that routes 'fixgraph_submit_fix' calls to the `submitFix` function.
case 'fixgraph_submit_fix': return await submitFix(args);