Skip to main content
Glama

check_aeo_audit_status

Monitor AEO audit progress by polling status until free preview is ready or full report is complete, handling pending paid pipeline checks.

Instructions

Check status of an AEO audit. Poll until free_preview_ready (free) or is_complete at full report (paid). If paid_pipeline_pending is true, keep polling.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
auditIdYesThe audit ID returned from run_aeo_audit

Implementation Reference

  • The `check_aeo_audit_status` tool handler function that fetches the status of an AEO audit from the AgentAEO API using the provided `auditId`.
    server.tool(
      "check_aeo_audit_status",
      "Check status of an AEO audit. Poll until free_preview_ready (free) or is_complete at full report (paid). If paid_pipeline_pending is true, keep polling.",
      {
        auditId: z.string().describe("The audit ID returned from run_aeo_audit"),
      },
      async ({ auditId }) => {
        try {
          const res = await fetch(`${API_BASE}/api/aeo-status/${auditId}`, {
            method: "GET",
            headers: {
              "X-API-Key": apiKey,
            },
          });
          const data = (await res.json()) as Record<string, unknown>;
          if (!res.ok) {
            const err = (data?.error as string) || (data?.message as string) || `HTTP ${res.status}`;
            return {
              content: [{ type: "text" as const, text: `Error: ${err}` }],
              isError: true,
            };
          }
          const status = (data?.status as string) ?? (data?.current_step != null ? "processing" : "unknown");
          const isComplete = (data?.is_complete as boolean) ?? (data?.status === "completed");
          const freePreviewReady = (data?.free_preview_ready as boolean) === true;
          const paidPipelinePending = (data?.paid_pipeline_pending as boolean) === true;
          let text =
            `Status: ${status}\n` +
            `current_step: ${data?.current_step ?? "?"}\n` +
            `is_complete: ${isComplete}\n` +
            `free_preview_ready: ${freePreviewReady}\n` +
            `paid_pipeline_pending: ${paidPipelinePending}\n`;
          if (data?.score != null) text += `Score: ${data.score}\n`;
          if (data?.grade) text += `Grade: ${data.grade}\n`;
          text += `\nRaw response:\n${JSON.stringify(data, null, 2)}`;
          return {
            content: [{ type: "text" as const, text }],
          };
        } catch (err) {
          const msg = err instanceof Error ? err.message : String(err);
          return {
            content: [{ type: "text" as const, text: `Error: ${msg}` }],
            isError: true,
          };
        }
      }
    );

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/agentaeo/agentaeo-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server