Skip to main content
Glama

Upload a file to attach to a post

upload_media

Upload a small file you are holding (an image, or a tiny PDF) straight into the app and get back the permanent public URL for media_urls on schedule_post or update_post. Send the bytes base64-encoded in content_base64. Hard limit 32 KB decoded — inline tool arguments cannot reliably carry more than that, so for ANY normal photo, video or carousel PDF use create_upload_link instead and let the user upload it from their machine. Allowed: JPEG, PNG, WebP, GIF, PDF, MP4, MOV. Pass attach_to_post_id to append the file to an existing post in the same call; a PDF must be that post's only attachment.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filenameYesThe file's name, e.g. carousel.pdf or hero.png.
content_typeNoMIME type. Inferred from the filename extension when omitted.
content_base64YesThe file's bytes, base64-encoded. Max 5 MB decoded.
attach_to_post_idNoOptional post id from list_scheduled_posts. Appends this file to that post's existing media instead of replacing it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior4/5

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

The description discloses a large amount of behavioral context beyond annotations: size limits, allowed formats, attachment semantics, and the fact that a PDF must be the only attachment. However, it introduces a contradiction with the input schema (description says 32KB max, schema says 5MB max). This confusion reduces the transparency score, as it can mislead an agent about actual constraints.

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?

The description is dense but every sentence adds necessary operational detail: purpose, size constraint, allowed types, attachment behavior, and the sibling alternative. It is front-loaded with the core purpose and then builds specifics. No fluff.

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?

For a tool with 4 parameters and no output schema, the description covers the return value (public URL), input encoding, size limits, allowed types, and attachment behavior. It also routes to create_upload_link where appropriate. Nothing critical 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 coverage is 100%, so the parameters are documented. The description adds value by clarifying the base64-encoding expectation, allowed file types, and the attach_to_post_id append behavior. But it also contradicts the schema's size limit for content_base64, which is a negative factor. Net it adds more than it detracts, so a 4 is appropriate.

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 description clearly states the tool's purpose: upload a small file and return a public URL for media_urls on schedule_post or update_post. It explicitly distinguishes itself from the sibling create_upload_link by noting that for normal files the agent should use that alternative. This is specific and unambiguous.

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?

The description gives explicit usage conditions: hard size limit of 32KB decoded, allowed file types, and when to switch to create_upload_link (any normal photo, video, or carousel PDF). It also explains the attach_to_post_id behavior. This is exemplary routing guidance.

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