ig_get_container_status
Check the processing status of media containers, particularly for videos, to monitor upload progress and ensure content is ready for use.
Instructions
Check the processing status of a media container (useful for videos).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| container_id | Yes | Container ID to check |
Implementation Reference
- The `ig_get_container_status` tool is defined here as part of the `registerIgPublishingTools` function. It takes a `container_id` and queries the Meta API to get the status and status_code of the specified media container.
// ─── ig_get_container_status ───────────────────────────────── 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 }; } } );