get_page_audit

Tool MCP get_page_audit : récupérer un Page Audit par id. Payload minimal pendant le run, rapport complet une fois COMPLETED.

Mis à jour le 2026-05-07

get_page_audit

get_page_audit récupère un Page Audit par id. C'est l'endpoint de polling du cycle de vie d'audit : tant que PENDING/GENERATING, la réponse est volontairement minimale pour ne pas brûler les tokens de l'agent. À COMPLETED, la réponse inclut le summary complet (totalModifications, geoScore, …) et modifications (le diff structuré à appliquer sur la page).

Quand l'utiliser

Après avoir appelé run_page_audit, pollez ce tool jusqu'à status: "COMPLETED". Intervalle typique : 10–20 secondes. L'audit est borné par une génération LLM, pas par la latence réseau, donc poller plus serré n'accélère rien.

Input

Champ Type Description
projectId string (CUID) Projet ciblé. Le tool renvoie audit_not_found si l'audit n'appartient pas à ce projet.
auditId string (CUID) L'id renvoyé par run_page_audit.

Response

Encore en cours

{
  "ok": true,
  "auditId": "clx_rep_42",
  "status": "GENERATING",
  "pageUrl": "https://example.com/features/integrations",
  "pageTitle": "Native integrations — Example",
  "isComplete": false,
  "message": "Audit still running. Typical completion: 30-90 seconds. Poll this tool again.",
  "createdAt": "2026-05-05T09:00:00.000Z",
  "updatedAt": "2026-05-05T09:00:30.000Z"
}

Complété

{
  "ok": true,
  "auditId": "clx_rep_42",
  "status": "COMPLETED",
  "pageUrl": "https://example.com/features/integrations",
  "pageTitle": "Native integrations — Example",
  "keyword": "Native integrations — Example",
  "isComplete": true,
  "summary": {
    "totalModifications": 12,
    "geoScore": 71,
    "...": "champs spécifiques à la feature"
  },
  "modifications": [ /* liste structurée de changements recommandés */ ],
  "totalCostUsd": 0.083,
  "createdAt": "2026-05-05T09:00:00.000Z",
  "updatedAt": "2026-05-05T09:01:13.000Z"
}

Échoué

{
  "ok": true,
  "auditId": "clx_rep_42",
  "status": "FAILED",
  "pageUrl": "https://example.com/features/integrations",
  "isComplete": true,
  "errorMessage": "Page returned 503; could not parse content."
}

Non trouvé

{
  "ok": false,
  "error": "audit_not_found",
  "message": "No page audit with this id is attached to the given project. Verify the auditId returned by run_page_audit."
}

Tips et patterns

  • Branchez sur isComplete, pas sur status. COMPLETED et FAILED sont les deux états terminaux — isComplete: true couvre les deux.
  • Ne rendez pas le tableau modifications tel quel à l'user. Il est structuré pour un rendu downstream : walkez-le et formulez les changements importants en langage naturel.
  • Cappez le polling. Après ~3 minutes sans isComplete: true, considérez l'audit comme bloqué et remontez le problème plutôt que de poller à l'infini.

Tools liés

  • run_page_audit — queue l'audit que ce tool poll.
  • list_page_audits — lister tous les audits du projet (du plus récent au plus ancien) sans poll un id à la fois.