Skip to main content
Glama

ig_get_container_status

Retrieve the processing status of a media container to determine if a video has completed processing and is ready for use.

Instructions

Check the processing status of a media container (useful for videos).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
container_idYesContainer ID to check

Implementation Reference

  • The handler that executes the ig_get_container_status tool. It calls the Meta Graph API GET /{container_id} with fields id,status,status_code and returns the result.
    server.tool(
      "ig_get_container_status",
      "Check the processing status of a media container (useful for videos).",
      {
        container_id: z.string().describe("Container ID to check"),
      },
      async ({ container_id }) => {
        try {
          const { data, rateLimit } = await client.ig("GET", `/${container_id}`, {
            fields: "id,status,status_code",
          });
          return { content: [{ type: "text", text: JSON.stringify({ ...data as object, _rateLimit: rateLimit }, null, 2) }] };
        } catch (error) {
          return { content: [{ type: "text", text: `Get container status failed: ${error instanceof Error ? error.message : String(error)}` }], isError: true };
        }
      }
    );
  • Input schema for ig_get_container_status: requires a container_id string parameter.
    {
      container_id: z.string().describe("Container ID to check"),
    },
  • src/index.ts:42-42 (registration)
    Registration of all Instagram publishing tools (including ig_get_container_status) via registerIgPublishingTools call.
    registerIgPublishingTools(server, client);
  • The registerIgPublishingTools function that registers ig_get_container_status along with other publishing tools on the MCP server.
    export function registerIgPublishingTools(server: McpServer, client: MetaClient): void {
  • Helper function waitForContainer that polls container status — notably uses the same client.ig GET /{containerId} endpoint as ig_get_container_status.
    /** Poll container status until FINISHED or error (video upload) */
    async function waitForContainer(client: MetaClient, containerId: string, maxWait = 30): Promise<void> {
      const interval = 2000;
      const maxAttempts = Math.ceil((maxWait * 1000) / interval);
      for (let i = 0; i < maxAttempts; i++) {
        const { data } = await client.ig("GET", `/${containerId}`, { fields: "status_code" });
        const status = (data as { status_code?: string }).status_code;
        if (status === "FINISHED") return;
        if (status === "ERROR") throw new Error("Container processing failed (ERROR status)");
        await new Promise((r) => setTimeout(r, interval));
      }
      throw new Error(`Container processing timed out after ${maxWait}s`);
    }
Behavior2/5

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

No annotations provided, so description carries full burden. It only states the action but does not disclose behavioral aspects like whether it is read-only, what statuses are returned, or any prerequisites. Lacks transparency.

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

Conciseness5/5

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

Single sentence of 12 words, front-loaded with key information. No extraneous content.

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?

For a simple one-parameter tool with no output schema, the description explains the purpose but does not include return value or behavior. Could be improved with status examples or note about destructiveness.

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?

Schema covers 100% of parameters with clear description. The description adds no additional meaning beyond the schema, achieving baseline score.

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 verb 'check' and the resource 'processing status of a media container', with added context that it is useful for videos. It is specific and distinguishes from sibling tools.

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

Usage Guidelines3/5

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

The description implies usage for checking video container status but does not explicitly provide when to use or not use, nor mentions alternatives. Usage context is only implied.

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-mcp'

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