Skip to main content
Glama

Post a photo, video or carousel to Instagram

publish_post
Destructive

Use this when the owner asks to post a photo, video, reel or carousel to Instagram right now, or to put one on their Instagram Story. Publish NOW to the client's connected Instagram: files from this chat (files — an image you made or one they attached; JPEG, PNG or WebP photos, the last two turned into JPEG here, or MP4/MOV videos; up to 50MB each), their own files by upload_id (from start_file_upload, every file PUT — deleted once posted), or public https URLs (one for a single post, two to ten for a carousel; Instagram fetches them itself, so they must be reachable at publish time). Pass exactly one of files, upload_id or urls. ONLY when the client has asked for it — this goes out immediately and publicly, and there is no undo. To post later, use schedule_post. For a video the product rendered, use publish_video instead so the link is refreshed first. A reel posts with Instagram's own pick (its first frame) unless they choose a cover: their own image (cover_file, or cover_upload_id from its own 1-file upload) or a moment (cover_frame_seconds). Only a reel has a cover, and it cannot be changed once posted.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "publish_post"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindNoWith urls only (an upload knows its own). Default IMAGE. REELS for a video. In a carousel this applies to every slide, so do not mix photos and videos in one call.
urlsNoPublic https URLs: one for a single post; 2-10 for a carousel, in swipe order. Use this OR upload_id.
filesNoFiles from this chat to post: 1 for a single post, 2-10 for a carousel, in swipe order. JPEG, PNG or WebP photos or MP4/MOV videos. Use this OR upload_id OR urls.
trialNoPost it to Instagram as a TRIAL REEL: shown to people who do not follow the account first; it reaches their followers only when the client opens it in the Instagram app and taps "Share with everyone". One video only — never a photo or a carousel. Use it ONLY when the client asks for a trial reel.
clientNoClient website slug (or id). Required for platform-scoped keys.
captionNoUp to 2200 characters. On a carousel it belongs to the whole post, not a slide.
placementNoWhere on Instagram. Default "feed": a post on the profile. "story": an Instagram Story for 24 hours instead — no caption, no cover and no trial (they are not sent), one Story per file or per carousel slide, a video 3 to 60 seconds. Use "story" ONLY when the client asks for a Story.
platformsNoWhere to post. Default ["instagram"]. YouTube (a Short) needs YouTube connected in Settings › Connections and takes ONE video only.
upload_idNoThe client's own files, from start_file_upload once every file has been PUT. Use this OR files OR urls.
auto_shareNoOnly with trial: true. Instagram shares the trial reel with the account's followers by itself if it does well; Instagram decides what counts as doing well, so it may not happen. It is set when the reel goes out and cannot be added afterwards, and nothing here can share a reel that is already posted: for that the client taps "Share with everyone" on it in the Instagram app. Use it ONLY when the client asks for it.
cover_fileNoA reel only: the cover image from this chat (one JPEG or PNG, up to 8MB). Use this OR cover_upload_id OR cover_frame_seconds.
post_againNoONLY when the client says they want a second copy of something that already went out. Without it, the same files within the hour reports the first post instead of posting.
cover_upload_idNoA reel only: the owner's own cover image — the upload_id of a separate start_file_upload with count 1 (one JPEG or PNG, up to 8MB; 1080x1920 is best, and words kept to the middle). Use this OR cover_file OR cover_frame_seconds.
cover_frame_secondsNoA reel only: a moment of the video, in seconds from the start (decimals allowed), to be its cover. Use this OR cover_upload_id OR cover_file.
resume_container_idNoONLY from a previous still_processing result on a SINGLE post. Finishes the upload already in flight rather than starting a second one.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / placement
      Added value: +{
      +  "description": "Where on Instagram. Default \"feed\": a post on the profile. \"story\": an Instagram Story for 24 hours instead — no caption, no cover and no trial (they are not sent), one Story per file or per carousel slide, a video 3 to 60 seconds. Use \"story\" ONLY when the client asks for a Story.",
      +  "enum": [
      +    "feed",
      +    "story"
      +  ],
      +  "type": "string"
      +}
  2. Changed3 schema fields changed
    • addedInput schema / properties / cover_file
      Added value: +{
      +  "description": "A reel only: the cover image from this chat (one JPEG or PNG, up to 8MB). Use this OR cover_upload_id OR cover_frame_seconds.",
      +  "items": {
      +    "properties": {
      +      "download_url": {
      +        "description": "Temporary https download link for the file.",
      +        "type": "string"
      +      },
      +      "file_id": {
      +        "description": "The file's id in the chat app.",
      +        "type": "string"
      +      },
      +      "file_name": {
      +        "type": "string"
      +      },
      +      "mime_type": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "download_url",
      +      "file_id"
      +    ],
      +    "type": "object"
      +  },
      +  "maxItems": 1,
      +  "minItems": 1,
      +  "type": "array"
      +}
    • addedInput schema / properties / cover_frame_seconds
      Added value: +{
      +  "description": "A reel only: a moment of the video, in seconds from the start (decimals allowed), to be its cover. Use this OR cover_upload_id OR cover_file.",
      +  "type": "number"
      +}
    • addedInput schema / properties / cover_upload_id
      Added value: +{
      +  "description": "A reel only: the owner's own cover image — the upload_id of a separate start_file_upload with count 1 (one JPEG or PNG, up to 8MB; 1080x1920 is best, and words kept to the middle). Use this OR cover_file OR cover_frame_seconds.",
      +  "type": "string"
      +}
  3. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already mark this as destructive and open-world, but the description adds critical behavior: the post is public and immediate with no undo; upload files are deleted once posted; URLs must be reachable at publish time; Story content disappears after 24 hours; trial reels require manual sharing unless auto_share is set; and duplicate files within an hour return the first post unless post_again is set. These are real operational consequences beyond the annotations.

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 front-loaded with the core action and primary alternative before covering modes, media inputs, covers, and edge cases. It is long but dense, which is appropriate for a 15-parameter destructive tool. Some repetition exists, such as restating "only when the client asks" and Story restrictions that also appear in the schema, preventing a full 5.

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, 15 parameters, and destructive open-world behavior, the description supplies what an agent needs: authentication/account prerequisites (client slug, connected Instagram, YouTube connection for Shorts), mutually exclusive input paths, timing and immutability constraints, duplicate-post behavior, and failure recovery via resume_container_id. Nothing essential for safe invocation is missing.

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

Parameters4/5

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

Schema description coverage is 100%, so the baseline is 3, but the description adds cross-parameter constraints the schema only partially states: "Pass exactly one of files, upload_id or urls," carousel slides must not mix photos and videos, kind applies to every slide, and cover options apply only to reels. It also clarifies story behavior (no caption, cover, or trial) and trial restrictions. The remaining gap is minor because most field-level detail is already in 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 first sentence states a specific verb and resource: publish a photo, video, reel, carousel, or Story to Instagram "right now." It distinguishes from siblings by naming schedule_post for later posting and publish_video for rendered video. An agent can identify the tool's purpose without opening the schema.

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?

It gives explicit when-to-use conditions (client asked to post now, or a Story) and when-not conditions ("ONLY when the client has asked for it," no undo). It names alternatives directly: schedule_post for later, publish_video for product-rendered video, and start_file_upload for upload_id. The guidance is unusually complete.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources