Skip to main content
Glama

Upload a local file for publishing

ig_media_upload
Read-only

Gets a one-time upload link for a LOCAL image or video the user wants to publish with ig_publish (Instagram only fetches media from a link, so a local file has to be uploaded first). Returns upload_url (send the file's raw bytes with an HTTP PUT and the given headers, before upload_url_expires_at), the exact curl command, step-by-step instructions, and a media_ref to pass to ig_publish as the media url (or, for a jpg/png, as a reel's cover_url) once the upload finished. Works only where you can run a command or code that reads the file and reaches the internet (e.g. a terminal agent). In a chat app (Claude's sandbox cannot reach Buzzfy), call ig_publish with the media url choose-file instead: Buzzfy's card asks the user to pick the file. Does not post anything. Files: mp4/mov up to 300 MB, jpg/png/webp up to 8 MB (Instagram prefers JPEG). An upload no post uses is deleted after 24 hours.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "size_bytes": "<size_bytes>"
    },
    "name": "ig_media_upload"
  }
}

Input Schema

NameRequiredDescriptionDefault
filenameNoThe local file's name, e.g. reel.mp4. Its extension (.mp4, .mov, .jpg, .png or .webp) sets the file type. Give this, content_type, or both.
size_bytesYesThe local file's size in bytes, read from the file. Checked against Instagram's limits: 300 MB for a video, 8 MB for an image.
content_typeNoThe file's type, for when you have no filename. If you give both, they must agree.

Output Schema

NameRequiredDescriptionDefault
curlYesThe upload as a curl command; replace the placeholder path ./your-file.<ext> with the real one.
methodYesThe HTTP method to use on upload_url.
headersYesThe HTTP headers to send with the upload: the Content-Type.
max_bytesYesThe largest file Instagram accepts for this type, in bytes.
media_refYesPass this as a media `url` to ig_publish after the upload has finished.
keep_hoursYesAn upload no post uses is deleted after this many hours.
upload_urlYesPUT the file's bytes here. Valid about 2 hours, for one upload.
content_typeYesThe file type Buzzfy took from filename or content_type; the upload must use it.
instructionsYesStep-by-step: run the upload, what a 200 answer means, and the exact ig_publish call to make next.
upload_url_expires_atYesWhen upload_url stops working, ISO 8601 in UTC.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / additionalProperties
      Previous value: -falseNew value: +{}
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations declare readOnlyHint=true and idempotentHint=false; the description is consistent, clarifying that nothing is posted and that the link is one-time with an expiry ('before upload_url_expires_at'). It adds context annotations cannot carry: 24-hour deletion of unused uploads, format/size limits, and the network-reachability prerequisite.

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 core action and the sibling routing come first, and every sentence carries operational value. It is dense with nested parentheses and long clauses, which slightly slows scanning, but no sentence is filler.

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?

Even though an output schema exists, the description tells the agent how to consume the result (PUT raw bytes with the given headers before expiry, then pass media_ref to ig_publish, including the cover_url case). Combined with prerequisites and limits, an agent has everything needed to call it and chain it correctly.

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 coverage is 100%, so the baseline is 3 and the schema already explains filename/extension typing, size limits, and the content_type enum. The description adds cross-parameter meaning — what size limit applies to which media kind and Instagram's JPEG preference — but largely restates limits the schema already documents.

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 ('Gets a one-time upload link for a LOCAL image or video'), and immediately explains why it exists relative to ig_publish ('Instagram only fetches media from a link'). An agent can distinguish this from ig_publish without consulting either 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?

Explicit when-to-use (local file you can read and PUT), when-not (chat app / Claude sandbox cannot reach Buzzfy) and the named alternative behavior (call ig_publish with 'choose-file' so the card prompts the user). It also states 'Does not post anything', closing off the most likely misuse.

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.