run_page_audit
run_page_audit MCP tool: queue a Page Audit on a URL. Charges 100 credits per audit on every plan, debited from the workspace credit pool. Returns auditId; the audit completes asynchronously.
Updated 2026-05-07
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
Every plan is credit-based. run_page_audit charges 100 credits per audit on Growth, Pro and Agency, debited from the workspace's monthly credit pool (Growth 1,500, Pro 3,000, Agency 5,000 credits per month). Beyond the included pool, overage is billed at 0.02 € per credit, capped by the workspace's configurable monthly overage cap.
Eligibility is checked before the audit is queued. If the workspace is out of credits or capped by its overage limit, the tool returns a structured quota_exceeded error (reason: "insufficient_credits") 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."
}
Every plan returns the same shape: mode: "credits" with creditsCharged and remainingCredits.
Error — quota exceeded
{
"success": false,
"ok": false,
"error": "quota_exceeded",
"plan": "GROWTH",
"reason": "insufficient_credits",
"creditsRequired": 100,
"remainingCredits": 40,
"upgradeUrl": "/billing",
"message": "Workspace does not have enough credits to run another page audit. Raise the monthly overage cap or wait for the next billing period."
}
reason is always insufficient_credits: the workspace is out of credits or capped by its monthly overage cap. Raise monthlyOverageCapEuros or wait for the next billing period.
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. Call
list_page_auditsfirst and skip URLs that already have a recentCOMPLETEDaudit. - 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 every plan,
creditsChargedandremainingCreditsgive the agent everything to render a "100 credits used, 4,900 remaining" line.
Related tools
- get_page_audit — poll the result.
- list_page_audits — see what's already done.