> ## Documentation Index
> Fetch the complete documentation index at: https://docs.spurtest.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Fix Raised Bugs

> Use your AI assistant to pull failure details from Spur and resolve bugs directly in your code.

<Frame caption="MCP Launch Video">
  <video className="w-full aspect-video rounded-xl" controls src="https://mintcdn.com/spur/L-RuealhpG1Pq-0J/videos/spur-mcp-launch.mp4?fit=max&auto=format&n=L-RuealhpG1Pq-0J&q=85&s=3a363f749a744ecff37a73b073c96d57" title="Spur MCP launch" data-path="videos/spur-mcp-launch.mp4" />
</Frame>

When a Spur test fails, your AI assistant can pull the failure details — step results, console logs, network requests, and screenshots — and help you trace the issue back to your code.

Instead of switching between the Spur dashboard and your editor, you stay in one place. The agent gathers the context; you fix the bug.

## How It Works

<Steps>
  <Step title="Point your agent to the failed run">
    Tell your agent about the failure: *"Help me fix the bug from this failed test"* or paste a run ID directly. You can give the Shareable link, or the direct link to the test run.

    The agent calls `get_test_run_overview` to identify which steps failed and why.
  </Step>

  <Step title="Drill into the details">
    The agent automatically pulls deeper context using `get_test_run_details`, `get_test_run_console_logs`, and `get_test_run_network_logs` to surface JavaScript errors, failed HTTP requests, or unexpected behavior.
  </Step>

  <Step title="Inspect screenshots">
    If the agent deems it necessary, or you provide that instruction, it retrieves screenshots from the run via `get_test_run_screenshots` so it can see exactly what happened in the browser.
  </Step>

  <Step title="Fix the issue">
    With the full context available, your agent can help you identify the root cause and suggest or apply a fix directly in your codebase.
  </Step>
</Steps>
