You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Two read-only MCP tools that complement run_site_audit / get_site_audit (#269):
list_site_audits — input brand_id. Returns the brand's recent audits (id, url, status, total score, created_at) — so an agent can find a past audit by URL/date instead of needing the id.
get_site_audit_quota — returns the org's monthly Site Audit allowance ({ used, limit, remaining }; limit: -1 = unlimited) so an agent can check remaining credits before calling run_site_audit.
Why
Lets an assistant see audit history and how many runs remain before spending a credit — same courtesy the dashboard hub gives (recent list + "X/Y audits left").
Approach
Pure reads, no quota charge — mirror the existing read tools (e.g. list_prompts, get_visibility_summary):
Data fns in web/src/lib/mcp/data.ts: listSiteAuditsFor(auth, brandId) (ownership check, then query site_audits) and getSiteAuditQuotaFor(auth) (reuses the server's getSiteAuditQuotaStatus via the existing GET /api/audits/quota route or a CRON_SECRET internal call).
Register both in web/src/lib/mcp/server.ts.
REST parity: GET /api/mcp/site-audits?brandId= and GET /api/mcp/site-audits/quota.
Acceptance
list_site_audits returns recent audits for an owned brand; foreign brand → not found
get_site_audit_quota returns used/limit/remaining (unlimited reported as -1)
Picking this up alongside #269/#305 — adding the two read tools (list_site_audits + get_site_audit_quota), no quota charge. Clearing it from the backlog since it's had no contributor claim. PR will stack on #305.
Activity
gkhngyk commentedon Jun 26, 2026
Picking this up alongside #269/#305 — adding the two read tools (
list_site_audits+get_site_audit_quota), no quota charge. Clearing it from the backlog since it's had no contributor claim. PR will stack on #305.feat(mcp): list_site_audits + get_site_audit_quota read tools (#306)
feat(agent): use Site Audit from the in-product assistant (#307)