Skip to main content
Glama

Publish media container

instagram_publish_media

Publish a FINISHED Instagram media container and return the new media ID. Confirm processing status first to avoid duplicate posts.

Instructions

Phase 2 of publishing: publish a media container that has finished processing, returning the new media id. The container must be FINISHED (see instagram_get_container_status). This is never auto-retried — a repeated publish costs quota and posts a duplicate; retry only after confirming the previous call did not already publish.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
applyNoSet true to actually perform this write. Omitted (or false) returns a non-mutating preview of exactly what would happen and calls nothing, unless IG_WRITE_MODE=apply is configured. An explicit false always forces preview.
accountNoName of the configured account profile to operate as (multi-account). Omit to use the default profile (IG_ACTIVE_PROFILE).
creationIdYesThe FINISHED media container id (creation_id) to publish.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.8.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedInput schema / properties / creationId / pattern
      Added value: +"^[A-Za-z0-9_-]{1,64}$"
  2. First observedv0.7.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only say idempotentHint=false; the description converts that into concrete operational consequences (repeated publish costs quota and posts a duplicate, never auto-retried) and specifies the safe retry protocol. This is exactly the behavioral context structured fields cannot convey.

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?

Three tight sentences, zero filler. The pipeline position and precondition come first, the idempotency warning after, which matches the order an agent needs to reason about the call.

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

Completeness5/5

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

With no output schema, the description still names the return value, and it covers the precondition, the safety envelope (nature of non-idempotency) and retry policy. Nothing essential for correct invocation is missing.

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 description coverage is 100%, including the apply preview flag, account profile selection and the creationId pattern, so the schema already carries parameter meaning. The description reiterates that creationId must be FINISHED but adds no new syntax or format detail.

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?

States a specific verb and resource ('publish a media container that has finished processing') and positions itself in the pipeline as 'Phase 2 of publishing', which cleanly separates it from instagram_create_media_container (phase 1) and instagram_get_container_status. The return value (new media id) is also named.

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

Usage Guidelines5/5

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

Explicitly states the precondition ('The container must be FINISHED (see instagram_get_container_status)') and points at the sibling that verifies it. It also gives a when-to-retry rule and the penalty for retrying blindly, so no usage condition is left to inference.

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