Skip to main content
Glama

download_aeo_content_suite_zip

Download the completed Content Suite ZIP file from the AGENTAEO MCP server to analyze brand visibility and improve AI-generated answer rankings.

Instructions

Download the Content Suite ZIP after status is completed (same AGENTAEO_API_KEY as generate). Saves to cwd or AGENTAEO_MCP_DOWNLOAD_DIR.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
orderIdYesorderid UUID from generate_aeo_content_suite / check_aeo_content_suite_status
outputFileNameNoOptional filename, e.g. content-stripe.zip (default: content-suite-<first8ofuuid>.zip)

Implementation Reference

  • The handler logic for 'download_aeo_content_suite_zip' which fetches the ZIP content from the API and saves it to a file.
    async ({ orderId, outputFileName }) => {
      try {
        const oid = orderId.trim();
        if (!oid) {
          return {
            content: [{ type: "text" as const, text: "Error: orderId is required" }],
            isError: true,
          };
        }
        const name = (outputFileName?.trim() || `content-suite-${oid.replace(/-/g, "").slice(0, 8)}.zip`) as string;
        const dir = (process.env.AGENTAEO_MCP_DOWNLOAD_DIR || "").trim() || process.cwd();
        mkdirSync(dir, { recursive: true });
    
        const res = await fetch(`${API_BASE}/api/aeo-content-download/${encodeURIComponent(oid)}`, {
          method: "GET",
          headers: { "X-API-Key": apiKey },
        });
        if (!res.ok) {
          const errBody = await res.text();
          return {
            content: [
              {
                type: "text" as const,
                text:
                  `HTTP ${res.status} downloading ZIP.\n` +
                  (res.status === 403
                    ? "If this persists, ensure Render has the latest backend (portal Agent API key allowed on GET /api/aeo-content-download).\n"
                    : "") +
                  `\nBody (truncated): ${errBody.slice(0, 800)}`,
              },
            ],
            isError: true,
          };
        }
        const buf = Buffer.from(await res.arrayBuffer());
        const outPath = join(dir, name);
        writeFileSync(outPath, buf);
        return {
          content: [
            {
              type: "text" as const,
              text:
                `✅ Saved **${buf.length}** bytes to:\n\`${outPath}\`\n\n` +
                `Unzip to inspect HTML, JSON-LD, llms.txt, README.`,
            },
          ],
        };
  • src/index.ts:263-272 (registration)
    Registration of the 'download_aeo_content_suite_zip' tool, including its schema and tool definition.
    server.tool(
      "download_aeo_content_suite_zip",
      "Download the Content Suite ZIP after status is **completed** (same AGENTAEO_API_KEY as generate). Saves to cwd or AGENTAEO_MCP_DOWNLOAD_DIR.",
      {
        orderId: z.string().describe("orderid UUID from generate_aeo_content_suite / check_aeo_content_suite_status"),
        outputFileName: z
          .string()
          .optional()
          .describe("Optional filename, e.g. content-stripe.zip (default: content-suite-<first8ofuuid>.zip)"),
      },

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