Skip to main content
Glama

publish_reel

Upload short-form videos to Instagram from a public URL in MP4 format. Add captions and control feed sharing to publish Reels.

Instructions

Publish a Reel (short-form video) to Instagram. Video must be publicly accessible URL, MP4 format.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
video_urlYesURL of the video to publish as Reel
captionNoCaption for the Reel (optional)
share_to_feedNoAlso share to main feed (default: true)

Implementation Reference

  • The core implementation of the publish_reel tool logic.
    async publishReel(
      videoUrl: string,
      caption?: string,
      shareToFeed = true
    ): Promise<IGPublishResult> {
      const id = this.aid();
      const body: Record<string, any> = {
        media_type: "REELS",
        video_url: videoUrl,
        share_to_feed: String(shareToFeed),
      };
      if (caption) body.caption = caption;
    
      const container = await this.request("POST", `${id}/media`, { body });
      const result = await this.request("POST", `${id}/media_publish`, {
        body: { creation_id: container.id },
      });
      return { id: result.id };
    }
  • src/index.ts:127-140 (registration)
    Tool definition and schema registration for publish_reel.
    {
      name: "publish_reel",
      description:
        "Publish a Reel (short-form video) to Instagram. Video must be publicly accessible URL, MP4 format.",
      inputSchema: {
        type: "object" as const,
        properties: {
          video_url: { type: "string", format: "uri", description: "URL of the video to publish as Reel" },
          caption: { type: "string", description: "Caption for the Reel (optional)" },
          share_to_feed: { type: "boolean", description: "Also share to main feed (default: true)", default: true },
        },
        required: ["video_url"],
      },
    },
  • Dispatcher logic in index.ts that calls the handler.
    case "publish_reel": {
      const result = await c.publishReel(args.video_url, args.caption, args.share_to_feed ?? true);
      return JSON.stringify(result, null, 2);
    }

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/mcpware/instagram-mcp'

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