Skip to main content
Glama
IvanBBaev
by IvanBBaev

x_media_upload

Upload local images, GIFs, or videos via chunked upload, returning a media_id to attach to posts. Optionally add accessibility alt text and poll status until processing succeeds.

Instructions

X (Twitter): upload a local image, GIF, or video via the chunked v2 flow and return a media_id to attach with x_post_create. The file must live inside the operator-configured media directory. Videos and GIFs may keep processing after upload — poll x_media_status until processing_state is succeeded before posting. Optional alt_text adds an accessibility description. (disabled by policy read-only)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesPath of the media file to upload (image, GIF, or video). Must be inside the operator-configured media directory; relative paths resolve against it.
alt_textNoAccessibility description attached to the media after upload (max 1000 chars).
media_categoryNoUpload category for the composer. Defaults to the one implied by the file’s actual content (image -> tweet_image, GIF -> tweet_gif, video -> tweet_video).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYes
metaYes
summaryNo
Behavior5/5

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

Beyond the annotations, the description discloses key behaviors: the file must live in the operator-configured media directory, videos/GIFs process asynchronously, polling x_media_status is required before posting, and the tool is disabled by policy 'read-only'. This significantly enriches the agent's model of how the upload behaves.

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 well-organized: main purpose first, then directory constraint, async processing guidance, optional parameter, and policy note. Every sentence carries operational value and none are redundant with the schema.

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 three well-documented parameters, an output schema, and several siblings, the description covers the full usage workflow: upload, get media_id, wait for processing via x_media_status, then attach with x_post_create. It also surfaces environment-specific constraints like the media directory and read-only policy, so an agent has enough context to invoke it correctly.

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?

The input schema already documents all parameters with 100% coverage, including path constraints, alt_text max length, and media_category defaults. The description adds only minor semantic reinforcement (e.g., alt_text is for accessibility), so the baseline of 3 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 names a specific verb ('upload'), a specific resource ('local image, GIF, or video' via the chunked v2 flow), and the concrete outcome ('return a media_id to attach with x_post_create'). It is clearly distinguishable from siblings like x_media_status and x_post_create.

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 workflow context: upload before creating a post, then poll x_media_status until processing_state is succeeded. It also names the relevant sibling tools (x_post_create, x_media_status) and notes the read-only policy disablement, which tells the agent when the tool is unavailable.

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

Install Server

Other Tools

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/IvanBBaev/x-mcp'

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