Skip to main content
Glama

Fix context bundle

get_fix_context
Read-onlyIdempotent

Fetch a paste-ready fix prompt, plain-English diagnosis, repro steps, root cause, blast radius, and app tokens for one bug report in a single call before writing a fix.

Instructions

Bundle everything an agent needs to fix one bug in a single call: a paste-ready fixPrompt (plain-English diagnosis + reproduction + suggested fix + relevant code + blast radius), plus report detail, repro steps, component, root cause, ontology tags, and the inventory action (with its expected_outcome contract) the report is filed against, plus recipe: a ≤4 KB excerpt with the app's tokens (CSS var / TS names), the design deviance score and deviance findings in the files this fix touches, so the fix uses the app's tokens instead of literals, and recipe.context: the tables the stack trace names with their columns from the latest schema snapshot (and any it says do not exist), whether the last merged fix is live, and the open hole-check findings, each section with its own state and note. Returns { report, fixPrompt, reproductionSteps, component, rootCause, bugOntologyTags, inventoryAction, recipe }; recipe is always { state, note, … } with state ok | drift | unknown | not_connected | error, never null. Read-only; no second LLM key needed. Use before writing a fix; use triage_issue for a multi-report review packet, or suggest_fix for just the Stage-2 hint.

Input Schema

NameRequiredDescriptionDefault
reportIdYesThe report UUID to fix (`report_id` is accepted too.)
projectIdNoProject UUID — required for org-scoped keys with multiple projects. (`project_id` is accepted too.)

Output Schema

NameRequiredDescriptionDefault
recipeYesDesign excerpt (≤ 4 KB) for the report's project: tokens with CSS var / TS names, the deviance score, findings in the files this fix touches, and context (tables the stack trace names, whether the last fix is live, open hole checks). Never null; when it could not be read, { state: 'error', note }.
reportYes
componentYesComponent or page the bug was attributed to
fixPromptYesPaste-ready fix prompt composed server-side, or null
rootCauseYesStage-2 root cause, or null before Stage 2 runs
bugOntologyTagsYesBug ontology tags, or null
inventoryActionYesThe inventory action (with its expected_outcome contract) the report is filed against, or null
reproductionStepsYesReproduction steps recorded on the report ([] if none)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.1.14
    • addedOutput schema / properties / recipe
      Added value: +{
      +  "additionalProperties": {},
      +  "description": "Design excerpt (≤ 4 KB) for the report's project: tokens with CSS var / TS names, the deviance score, findings in the files this fix touches, and context (tables the stack trace names, whether the last fix is live, open hole checks). Never null; when it could not be read, { state: 'error', note }.",
      +  "properties": {
      +    "context": {
      +      "additionalProperties": {},
      +      "description": "Backend and release context for this bug; each section has its own state, and unknown never means healthy",
      +      "properties": {
      +        "deploy": {
      +          "description": "{ state: live | deployed_since_merge | not_live | probe_failed | unknown | no_merged_fix | error, note, lastFix, targets }"
      +        },
      +        "radar": {
      +          "description": "{ state, note, checkedAt, findings: [{ rule, severity, message, fix }] }: open hole checks"
      +        },
      +        "schema": {
      +          "description": "{ state, note, snapshotAt, tables: [{ name, columns }], missing }: tables the stack trace names, from the latest schema snapshot"
      +        }
      +      },
      +      "required": [
      +        "schema",
      +        "deploy",
      +        "radar"
      +      ],
      +      "type": "object"
      +    },
      +    "findings": {
      +      "description": "Open design deviance findings in the files this fix touches",
      +      "items": {},
      +      "type": "array"
      +    },
      +    "note": {
      +      "description": "Why this state, in plain English",
      +      "type": "string"
      +    },
      +    "score": {
      +      "description": "Design deviance score 0–100, lower is better; null = not scored",
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "set": {
      +      "description": "The token set the excerpt was taken from",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "state": {
      +      "description": "ok | drift | unknown | not_connected | error; unknown never means healthy",
      +      "enum": [
      +        "ok",
      +        "drift",
      +        "unknown",
      +        "not_connected",
      +        "error"
      +      ],
      +      "type": "string"
      +    },
      +    "tokens": {
      +      "description": "Most useful tokens first: { path, value, cssVar, ts }. Use these names, not literals.",
      +      "items": {},
      +      "type": "array"
      +    },
      +    "truncated": {
      +      "description": "True when the excerpt was cut to stay under 4 KB",
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "state",
      +    "note"
      +  ],
      +  "type": "object"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "report",
      -  "fixPrompt",
      -  "reproductionSteps",
      -  "component",
      -  "rootCause",
      -  "bugOntologyTags",
      -  "inventoryAction"
      -]New value: +[
      +  "report",
      +  "fixPrompt",
      +  "reproductionSteps",
      +  "component",
      +  "rootCause",
      +  "bugOntologyTags",
      +  "inventoryAction",
      +  "recipe"
      +]
  2. Changed15 schema fields changedv0.1.12
    • addedInput schema / properties / projectId
      Added value: +{
      +  "description": "Project UUID — required for org-scoped keys with multiple projects. (`project_id` is accepted too.)",
      +  "type": "string"
      +}
    • removedInput schema / properties / project_id
      Removed value: -{
      -  "description": "Project UUID — required for org-scoped keys with multiple projects.",
      -  "type": "string"
      -}
    • changedInput schema / properties / reportId / description
      Previous value: -"The report UUID to fix"New value: +"The report UUID to fix (`report_id` is accepted too.)"
    • addedOutput schema / properties / bugOntologyTags / description
      Added value: +"Bug ontology tags, or null"
    • addedOutput schema / properties / component / description
      Added value: +"Component or page the bug was attributed to"
    • addedOutput schema / properties / component / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • addedOutput schema / properties / fixPrompt / description
      Added value: +"Paste-ready fix prompt composed server-side, or null"
    • addedOutput schema / properties / inventoryAction
      Added value: +{
      +  "description": "The inventory action (with its expected_outcome contract) the report is filed against, or null"
      +}
    • addedOutput schema / properties / report / additionalProperties
      Added value: +{}
    • addedOutput schema / properties / report / properties
      Added value: +{
      +  "breadcrumbs": {},
      +  "category": {
      +    "description": "bug | slow | visual | confusing | other",
      +    "type": [
      +      "string",
      +      "null"
      +    ]
      +  },
      +  "child_report_ids": {
      +    "items": {
      +      "type": "string"
      +    },
      +    "type": "array"
      +  },
      +  "component": {
      +    "description": "Component or page the bug was attributed to",
      +    "type": [
      +      "string",
      +      "null"
      +    ]
      +  },
      +  "console_logs": {
      +    "description": "Console entries captured with the report"
      +  },
      +  "created_at": {
      +    "type": [
      +      "string",
      +      "null"
      +    ]
      +  },
      +  "description": {
      +    "description": "What the reporter wrote (untrusted text)",
      +    "type": [
      +      "string",
      +      "null"
      +    ]
      +  },
      +  "environment": {
      +    "description": "Browser/OS/viewport the SDK captured"
      +  },
      +  "fix_attempts": {
      +    "description": "Latest fix attempts, newest first",
      +    "items": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "id": {
      +          "type": "string"
      +        },
      +        "status": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        }
      +      },
      +      "required": [
      +        "id"
      +      ],
      +      "type": "object"
      +    },
      +    "type": "array"
      +  },
      +  "fix_packet": {
      +    "description": "Paste-ready fix prompt composed server-side"
      +  },
      +  "id": {
      +    "description": "Report UUID",
      +    "type": "string"
      +  },
      +  "inventory_action": {
      +    "description": "Inventory action the report is filed against, when resolved"
      +  },
      +  "network_logs": {
      +    "description": "Network requests captured with the report"
      +  },
      +  "project_id": {
      +    "type": [
      +      "string",
      +      "null"
      +    ]
      +  },
      +  "reproduction_steps": {},
      +  "screenshot_url": {
      +    "description": "Signed screenshot URL",
      +    "type": [
      +      "string",
      +      "null"
      +    ]
      +  },
      +  "severity": {
      +    "description": "critical | high | medium | low",
      +    "type": [
      +      "string",
      +      "null"
      +    ]
      +  },
      +  "stage1_classification": {
      +    "description": "Stage-1 (fast) classification"
      +  },
      +  "stage2_analysis": {
      +    "description": "Stage-2 analysis: rootCause, suggestedFix, …"
      +  },
      +  "status": {
      +    "description": "Workflow status, e.g. new, classified, fixing, fixed, verified, reopened",
      +    "type": [
      +      "string",
      +      "null"
      +    ]
      +  },
      +  "summary": {
      +    "description": "One-line summary written by the classifier",
      +    "type": [
      +      "string",
      +      "null"
      +    ]
      +  },
      +  "title": {
      +    "type": [
      +      "string",
      +      "null"
      +    ]
      +  }
      +}
    • addedOutput schema / properties / report / required
      Added value: +[
      +  "id"
      +]
    • addedOutput schema / properties / report / type
      Added value: +"object"
    • addedOutput schema / properties / reproductionSteps / description
      Added value: +"Reproduction steps recorded on the report ([] if none)"
    • addedOutput schema / properties / rootCause / description
      Added value: +"Stage-2 root cause, or null before Stage 2 runs"
    • changedOutput schema / required
      Previous value: -[
      -  "report",
      -  "fixPrompt",
      -  "reproductionSteps",
      -  "component",
      -  "rootCause",
      -  "bugOntologyTags"
      -]New value: +[
      +  "report",
      +  "fixPrompt",
      +  "reproductionSteps",
      +  "component",
      +  "rootCause",
      +  "bugOntologyTags",
      +  "inventoryAction"
      +]
  3. Changed2 schema fields changedv0.1.10
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  4. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint/openWorldHint/idempotentHint, and the description goes well beyond them: it discloses the recipe state machine (ok | drift | unknown | not_connected | error, never null), that each section carries its own state and note, and that no second LLM key is required. That is meaningful operational context an agent needs before invoking.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The content is dense but mostly earns its place given the rich 8-field return. However it is delivered as one sprawling near-sentence packing fixPrompt, recipe, recipe.context and inventoryAction into a single block, which hurts readability. Front-loading is good but structure could be split into digestible lines.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite an output schema already existing, the description fills the remaining gaps an agent would care about: what 'recipe' and 'recipe.context' contain, the guaranteed state enum, and how it relates to sibling tools. Nothing needed to call it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% for both parameters (reportId, projectId plus the snake_case aliases), so the schema already documents them fully. The description adds no extra meaning about the parameters, so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific action and scope ('Bundle everything an agent needs to fix one bug in a single call') and then enumerates the concrete payload sections: fixPrompt, report detail, repro steps, component, root cause, ontology tags, inventory action, and recipe/recipe.context. It also names the distinct siblings (triage_issue, suggest_fix), so an agent can tell this apart from them without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit routing: 'Use before writing a fix; use triage_issue for a multi-report review packet, or suggest_fix for just the Stage-2 hint.' It gives the when-to-use condition and two named alternatives with the condition that selects each, leaving nothing to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.