Skip to main content
Glama

get_async_report

Retrieve status and results of an asynchronous insight report using its run ID. Optionally specify fields to return.

Instructions

Check status and retrieve results of an async insight report.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
report_run_idYesReport run ID from create_async_report
fieldsNoComma-separated fields to return

Implementation Reference

  • The 'get_async_report' tool handler. It takes report_run_id and optional fields, makes a GET request to the Meta Ads API using the report_run_id as path, and returns the async report data with rate limit info.
    // ─── get_async_report ──────────────────────────────────────
    server.tool(
      "get_async_report",
      "Check status and retrieve results of an async insight report.",
      {
        report_run_id: z.string().describe("Report run ID from create_async_report"),
        fields: z.string().optional().describe("Comma-separated fields to return"),
      },
      async ({ report_run_id, ...params }) => {
        try {
          const { data, rateLimit } = await client.get(`/${report_run_id}`, { ...params });
          return { content: [{ type: "text" as const, text: JSON.stringify({ ...data as object, _rateLimit: rateLimit }, null, 2) }] };
        } catch (error) {
          return { content: [{ type: "text" as const, text: `Failed: ${error instanceof Error ? error.message : String(error)}` }], isError: true };
        }
      }
    );
  • Input schema for 'get_async_report': requires 'report_run_id' (string) and optional 'fields' (string, comma-separated). Validated using zod.
    {
      report_run_id: z.string().describe("Report run ID from create_async_report"),
      fields: z.string().optional().describe("Comma-separated fields to return"),
    },
  • Registration of the 'get_async_report' tool on the MCP server via server.tool() with description, schema, and handler.
    server.tool(
      "get_async_report",
      "Check status and retrieve results of an async insight report.",
      {
        report_run_id: z.string().describe("Report run ID from create_async_report"),
        fields: z.string().optional().describe("Comma-separated fields to return"),
      },
      async ({ report_run_id, ...params }) => {
        try {
          const { data, rateLimit } = await client.get(`/${report_run_id}`, { ...params });
          return { content: [{ type: "text" as const, text: JSON.stringify({ ...data as object, _rateLimit: rateLimit }, null, 2) }] };
        } catch (error) {
          return { content: [{ type: "text" as const, text: `Failed: ${error instanceof Error ? error.message : String(error)}` }], isError: true };
        }
      }
    );
  • src/index.ts:65-65 (registration)
    Top-level invocation of registerInsightTools(server, client) which registers all insight tools including get_async_report.
    registerInsightTools(server, client);
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description must fully disclose behavior. It fails to mention if the tool can be called multiple times, whether it blocks until ready, or what happens if the report is not yet complete. This lack of detail reduces transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence, concise and to the point. However, it could be slightly more informative without being verbose, which might improve clarity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description lacks detail on the return value (e.g., status formats, result structure). Since there is no output schema, the description should compensate, but it only vaguely mentions 'retrieve results'. This is adequate but not fully complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already covers 100% of parameter descriptions, so the description adds no extra meaning. Baseline 3 is appropriate as the description does not enhance understanding beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool checks status and retrieves results of an async insight report. It uses a specific verb and resource, and distinguishes itself from the sibling tool 'create_async_report'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies the tool should be used after creating an async report, and the schema references 'create_async_report' for the report_run_id. However, it does not explicitly state when not to use it or provide alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/mikusnuz/meta-ads-mcp'

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