Skip to main content
Glama

check_aeo_content_suite_status

Monitor the status of content suite generation by polling for completion or failure, using the order ID from the initial generation request.

Instructions

Poll Content Suite generation. After generate_aeo_content_suite returns (HTTP 202), call every 15–30s until status is completed or failed. Same X-API-Key as generate.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
orderIdYesorderid returned from generate_aeo_content_suite

Implementation Reference

  • The tool 'check_aeo_content_suite_status' is registered and implemented in src/index.ts. It polls the API to check the status of a Content Suite generation job using an orderId.
    server.tool(
      "check_aeo_content_suite_status",
      "Poll Content Suite generation. After generate_aeo_content_suite returns (HTTP 202), call every 15–30s until status is completed or failed. Same X-API-Key as generate.",
      {
        orderId: z.string().describe("orderid returned from generate_aeo_content_suite"),
      },
      async ({ orderId }) => {
        try {
          const oid = orderId.trim();
          if (!oid) {
            return {
              content: [{ type: "text" as const, text: "Error: orderId is required" }],
              isError: true,
            };
          }
          const res = await fetch(`${API_BASE}/api/aeo-content-status/${encodeURIComponent(oid)}`, {
            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}\n\n${JSON.stringify(data, null, 2)}` }],
              isError: true,
            };
          }
          const status = (data?.status as string) ?? "unknown";
          const downloadUrl = data?.download_url as string | null | undefined;
          let text =
            `orderid: ${data?.orderid ?? oid}\n` +
            `status: ${status}\n` +
            (downloadUrl ? `download_url: ${downloadUrl}\n` : "") +
            `\nWhen status is **completed**, GET the ZIP with the same X-API-Key (see download_url).\n\n` +
            `Raw 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