> ## 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.

> ## Agent Instructions
> Spur is an AI-powered QA engineer that lets teams create and run automated end-to-end tests for web and mobile apps using natural language.
> When answering questions about Spur, cite the relevant page from docs.spurtest.com.

# Inspecting PR Agent Runs With MCP

> Use the Spur MCP server or Spur AI to inspect PR Agent runs, monitor live progress, read proof-aware test verdicts, and pull step evidence or screenshots.

> [!NOTE]
>
> PR Agent is in private beta. These tools are read-only and appear on both the Spur MCP server and Spur AI for your active Application.

When PR Agent tests a pull request, Spur evaluates the diff, resolves the preview URL, runs relevant saved tests, and generates autonomous browser tests. With the Model Context Protocol (MCP) tools — or directly inside Spur AI — your assistant can monitor a live run, inspect saved and autonomous test verdicts, and pull step evidence, vetted findings, and screenshots without switching to the Spur app.

## Available tools

| Tool | What it does |
| - | - |
| `get_pr_agent_run` | Reads one parent PR Agent run by `pr_agent_run_id` or by `repo_full_name` and `pr_number` (with optional `head_sha` prefix or full SHA). Returns live lifecycle phase, preview provenance, plan summary, saved test results (`task_id` links into `get_test_run`), autonomous test rollups (`auto_session_request_id` links into `get_autonomous_run`), blocked or skipped states, and a link to the run in the Spur app |
| `list_autonomous_runs` | Lists PR Agent autonomous runs newest first, with parent pull request metadata (`pr_agent_run_id`, `repo_full_name`, `pr_number`, `head_sha`) and a link to the run in the Spur app. Filter with `search: { repo_full_name, pr_number, status }` before pagination (`pr_number` requires `repo_full_name`). Defaults `hours_ago` to 168 (7 days) and `limit` to 25 (max 100) |
| `get_autonomous_run` | Reads one autonomous run by `auto_session_request_id`. Defaults to `include: "overview"` (session summary, pull request context, Spur link, and a paged list of generated tests with proof-aware verdicts and safe reasons). Pass `auto_test_id` with `include: "steps"` for ordered step evidence, `include: "findings"` for vetted findings, or `include: "screenshots"` (with optional 1-based `step_number`) for up to 6 downscaled inline screenshots plus recording availability and a Spur UI link |

## Common workflows

### Inspect and monitor a pull request run

```text theme={null}
"Check the latest PR Agent run for acme/web PR #247 and monitor it until it finishes"
```

The agent calls `get_pr_agent_run(repo_full_name: "acme/web", pr_number: 247)` to read the parent run's live state — current phase, preview URL provenance, test plan summary, saved tests, autonomous tests, and any skipped or login-blocked tests. While the run is still in progress (`live: true`), the agent polls `get_pr_agent_run` on a short interval until the run reaches a terminal status, then drills into failing saved tests with `get_test_run` or failing autonomous tests with `get_autonomous_run`.

### List autonomous runs for a pull request

```text theme={null}
"Show me the latest PR Agent autonomous runs for acme/web PR #247"
```

The agent calls `list_autonomous_runs` with `search: { repo_full_name: "acme/web", pr_number: 247 }` and returns each matching run's `auto_session_request_id`, status, commit SHA, timestamps, and Spur link. Pass `offset: <next_offset>` to page through older runs, or raise `hours_ago` to search beyond the default 7-day window.

### Inspect generated test verdicts

```text theme={null}
"What failed in autonomous run req-123?"
```

The agent calls `get_autonomous_run(auto_session_request_id: "req-123")` with the default `include: "overview"`. Each generated test reports its lifecycle `status`, UI-aligned `state` (`passed`, `failed`, `error`, `stopped`, `running`, or `waiting`), proof-aware `result` (`pass`, `fail`, or `null`), step count, and a short reason when a test failed or errored. Infrastructure and preview errors report `result: null` and `state: "error"` rather than a regression.

### Drill into step evidence, findings, and screenshots

```text theme={null}
"Show the steps, findings, and screenshots for test 412 in autonomous run req-123"
```

The agent calls `get_autonomous_run` with `auto_test_id: 412` and:

* `include: "steps"` — ordered steps, action outcomes, sanitized reasoning and verification notes, and stripped page URLs.
* `include: "findings"` — vetted findings and the failed step number for that test.
* `include: "screenshots"` — up to 6 downscaled inline screenshots, prioritizing the first frame, the failed step, and the last frame. Pass a 1-based `step_number` to narrow screenshots to one step.

Raw video recordings do not stream over MCP. When a recording is stored, `get_autonomous_run(include: "screenshots")` reports that it is available and includes the authenticated Spur UI link to watch it in the app.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.