Patrol for AI assistants

Connect an AI assistant to Patrol to review and deploy your store's accessibility fixes in conversation. This page lists every tool the assistant receives once connected.

Connect

Server URL: https://mcp.patrolapp.ai/client/mcp

To connect, follow the setup guide.

Tools

whoami

Who am I

Returns the resolved client-MCP principal for the authenticated caller, including its current permission level on the shop and any resolved agency membership.

Takes no inputs.

switch_shop

Switch shop

Ends your current session so you can reconnect and choose a different shop. Switching shops is a fresh Shopify sign-in, not a live swap.

Takes no inputs.

pull_request_list

List pull requests

List the pull requests Patrol has opened for your shop, each with its live GitHub status (open/merged/closed) and open date.

Takes no inputs.

pull_request_outstanding_files

List outstanding files

List the file fixes staged for deployment on your shop but not yet in a pull request — the candidates to bundle into a new PR.

Takes no inputs.

pull_request_diff

Diff staged fixes

Return the diff (live baseline vs. staged fix content) for the given file fixes on your shop, ready for a review viewer. Pass `fileFixIds` from `pull_request_outstanding_files`. This is a review copy only. To deploy these fixes, open a pull request with `pull_request_create` and merge it with `pull_request_merge`. Changes copied into the repository by hand are not recorded in the shop's Patrol deployment history, and Patrol keeps the fixes and their violations outstanding.

Inputs for pull_request_diff
Field Required Type Description
fileFixIds Yes
{
  "type": "array",
  "items": {
    "type": "string",
    "minLength": 1
  },
  "minItems": 1,
  "maxItems": 100
}

fix_explain

Explain staged fixes

Explain the given staged file fixes on your shop: each file's diff plus a per-violation-type summary of what the fix changes and why (element counts and descriptions). Pass `fileFixIds` from `pull_request_outstanding_files`. Explanation only — no validation diagnostics. This is a review copy only. To deploy these fixes, open a pull request with `pull_request_create` and merge it with `pull_request_merge`. Changes copied into the repository by hand are not recorded in the shop's Patrol deployment history, and Patrol keeps the fixes and their violations outstanding.

Inputs for fix_explain
Field Required Type Description
fileFixIds Yes
{
  "type": "array",
  "items": {
    "type": "string",
    "minLength": 1
  },
  "minItems": 1,
  "maxItems": 100
}

violations_export_status

Get violation-export status

Get the status of your shop's violation export, started via `violations_export_start`: pending, generating, ready, or failed. Returns `startedAt` so you can judge how fresh the snapshot is. When ready, returns a `downloadUrl` — a link to fetch the CSV file out of band and hand to the user, never rows to read into this conversation. `columns` lists every column the file can carry, not every column each row populates — rows for rules Patrol can fix automatically carry only `violationId` and `themeId`.

Takes no inputs.

third_party_vendor_violations_list

List third-party violations

List your shop's active third-party accessibility violations — those caused by installed apps and other vendors' code — grouped by vendor, each with its violation types and counts. Covers third-party violations only; the shop's first-party violations (theme, content, product and every other source) are in `violations_export_start`. `totalThirdPartyViolations` counts only violations attributed to a vendor, not the `unattributed` bucket, while `totalThirdPartyElements` is a tally of affected page elements, not violations, and includes the `unattributed` bucket — the two are not comparable. For one line per vendor, rule and source, with script URLs and page locations, start `third_party_vendor_violations_export_start`.

Takes no inputs.

pull_request_create_status

Get PR-creation job status

Get the status of one of your shop's pull-request creation jobs by its `jobId`: pending, in progress (with step progress), completed (with the PR url), or failed. Only one pull request can be created for a shop at a time; a job refused for that reason fails with `blockedByJobId`, the job that held the shop. That job carries its own fixes, not yours — it only tells you when to retry: poll it until it settles, then call `pull_request_create` again. When polling it returns nothing (it was started in the Patrol app), retry with backoff instead.

Inputs for pull_request_create_status
Field Required Type Description
jobId Yes string

third_party_vendor_violations_export_status

Get third-party violation-export status

Get the status of your shop's third-party violation export, started via `third_party_vendor_violations_export_start`: pending, generating, ready, or failed. Returns `startedAt` so you can judge how fresh the snapshot is. When ready, returns a `downloadUrl` — a link to fetch the CSV file out of band and hand to the user, never rows to read into this conversation. `columns` lists every column the file can carry; each line fills only the location columns for its `sourceKind`. `rowCount` counts file lines (one per vendor, rule and source), not violations; for violation totals, sum the file's `violationCount` column.

Takes no inputs.

repositories

List repositories

List the GitHub repositories you can open a pull request against for your shop — the `repository` choices for `pull_request_create`. A member of the shop's agency sees the agency's connected installation(s); anyone else sees the installation they selected for this shop in the Patrol app.

Takes no inputs.

repo_refs

List repository refs

List a repository's branches and collaborators (pass `repository` as `owner/name`) — the base-branch and reviewer choices for opening a pull request.

Inputs for repo_refs
Field Required Type Description
repository Yes string

pull_request_create

Create a pull request

Real production action: open a GitHub pull request containing accessibility fixes Patrol generated for your shop — never local or user-authored code, which this tool cannot accept. Its content is fixed entirely by the `fileFixIds` you pass, taken from `pull_request_outstanding_files`; `title` and `body` only label it. Pass `repository` (as `owner/name`) from `repositories`; `baseBranch` and `reviewers` come from `repo_refs`. Returns a `jobId`; poll `pull_request_create_status` for progress and the resulting PR url. The pull request is recorded in the shop's Patrol deployment history — the audit trail for these fixes. Prefer this over applying `pull_request_diff` output by hand.

Inputs for pull_request_create
Field Required Type Description
fileFixIds Yes
{
  "type": "array",
  "items": {
    "type": "string",
    "format": "uuid"
  },
  "minItems": 1,
  "maxItems": 100
}
repository Yes string
title No string
body No string
baseBranch No string
reviewers No
{
  "type": "array",
  "items": {
    "type": "string",
    "minLength": 1
  }
}

pull_request_merge

Merge a pull request

Real production action: merge one of your shop's Patrol-opened pull requests, which triggers that shop's deploy. Pass `prUrl` from `pull_request_list`. `method` defaults to `squash`. Merging an already-merged PR is rejected. Merging through this tool marks the deployment as published in the shop's Patrol deployment history.

Inputs for pull_request_merge
Field Required Type Description
prUrl Yes string
method No one of "merge", "squash", "rebase"

violations_export_start

Start a violation export

Start a downloadable CSV export of your shop's active accessibility violations. Every active violation gets a row, but only input-required rules — the ones needing a human decision, such as `color-contrast`, `heading-order` and `target-size` — carry the detail columns. Every other row holds just `violationId` and `themeId` with the remaining columns empty; that is the expected shape, not missing data, and it is usually the majority of rows. Poll `violations_export_status` for progress and, once ready, a link to download the file out of band — the result is a file to fetch, never rows to read into this conversation.

Takes no inputs.

third_party_vendor_violations_export_start

Start a third-party violation export

Start a downloadable CSV export of your shop's active third-party accessibility violations, one line per vendor, rule and source. `sourceKind` says where the violating markup came from and which location columns a line fills: `script` is markup a vendor script injected, located by `scriptUrl`, `scriptLine` and `scriptCol`; `embedded` is content inside a vendor iframe, located by `embeddedUrl`; `route` is a page a vendor app renders in full, located by `pathname`; `unknown` is an iframe whose source Patrol could not read, located by `unknownIdentity`. An empty `sourceKind` means Patrol recorded no source for those violations, so the line has no location cells. Empty cells elsewhere are the expected shape, not missing data. Lines with empty vendor columns are violations no vendor was attributed to. `violationCount` counts violations: on lines with a vendor it adds up to `totalThirdPartyViolations` from `third_party_vendor_violations_list`, and on lines without one to its `unattributed.groupCount`. `elementCount` counts affected page elements, not violations, and on all lines adds up to `totalThirdPartyElements`. Poll `third_party_vendor_violations_export_status` for progress and, once ready, a link to download the file out of band — the result is a file to fetch, never rows to read into this conversation.

Takes no inputs.