Skip to main content
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

Common workflows

Inspect and monitor a pull request run

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

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

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

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.