run_page_audit
run_page_audit MCP tool: queue a Page Audit on a URL. Respects plan quota (Growth 4/mo, Pro 10/mo) and Agency credit cap. Returns auditId; the audit completes asynchronously.
Updated 2026-05-07
run_page_audit
run_page_audit queues a Page Audit on a URL and returns an auditId immediately. The audit runs asynchronously (typically 30–90 seconds) and goes through PENDING → GENERATING → COMPLETED. Poll get_page_audit to fetch the modifications when ready.
Requires
memberrole minimum.customerrole is rejected.
Billing
Costs depend on the workspace plan:
| Plan | Cost | Limit |
|---|---|---|
| Starter | n/a | Page audits not included; tool returns quota_exceeded:disabled. |
| Growth | Free | 4 audits per billing month. |
| Pro | Free | 10 audits per billing month. |
| Agency | 100 credits | Unlimited; capped by monthlyOverageCapEuros if set. |
Eligibility is checked before the audit is queued. If the workspace cannot run another audit, the tool returns a structured quota_exceeded error and no work is started.
In development (NODE_ENV=development), the eligibility check and credit charge are bypassed.
Async lifecycle
run_page_auditreturns{ success: true, auditId, status: "PENDING" }.- Poll
get_page_auditwith theauditId. WhilePENDING/GENERATING, the response is minimal. - On
COMPLETED,get_page_auditreturns the full summary and modifications. - On
FAILED,get_page_auditreturns anerrorMessage.
Input
| Field | Type | Description |
|---|---|---|
projectId |
string (CUID) | Project scope. |
pageUrl |
string (URL) | Full URL of the page to audit. Must be https:// and publicly accessible. |
Response
Success — audit queued
{
"success": true,
"auditId": "clx_rep_42",
"status": "PENDING",
"plan": "AGENCY",
"mode": "credits",
"creditsCharged": 100,
"remainingCredits": 4900,
"message": "Audit queued. Poll get_page_audit with this auditId to fetch results when status transitions to COMPLETED."
}
For Growth/Pro the response includes mode: "quota" and remainingAuditsThisMonth instead of creditsCharged/remainingCredits.
Error — quota exceeded
{
"success": false,
"ok": false,
"error": "quota_exceeded",
"plan": "GROWTH",
"reason": "quota_reached",
"auditsThisPeriod": 4,
"quotaPerMonth": 4,
"upgradeUrl": "/billing",
"message": "Workspace cannot run another page audit right now. Inspect the `reason` and either upgrade or raise the overage cap."
}
reason is one of:
disabled— plan does not include page audits (Starter).quota_reached— Growth/Pro hit the monthly cap; renews at the next billing period.insufficient_credits— Agency hit the overage cap; raisemonthlyOverageCapEurosor wait for renewal.
Error — fetch failed
{
"success": false,
"ok": false,
"error": "fetch_failed",
"message": "Could not fetch the page. The URL may be private, redirecting, or blocking crawlers."
}
No credits are charged when the page cannot be fetched.
Tips and patterns
- Always check
successfirst, then branch onerrorfor the structured cases above. - De-dup before queueing.
list_missed_citationsreturnshasExistingAudit; only audit pages withfalse. - Poll, don't block. Loop
get_page_auditevery 10–20 seconds. Don't tighten the loop further — the audit is bound by an LLM call, not your polling. - Surface the cost to the user. On Agency,
creditsChargedandremainingCreditsgive the agent everything to render a "100 credits used, 4,900 remaining" line.
Related tools
- list_missed_citations — pick the URLs most worth auditing.
- get_page_audit — poll the result.
- list_page_audits — see what's already done.