Skip to main content
Glama

upload_media

Upload images or videos to X (Twitter) by providing base64-encoded data, returning a media ID for attaching to posts. Supports formats like PNG, JPEG, and MP4 with specified MIME types.

Instructions

Upload an image or video to X. Returns a media_id that can be attached to posts. Provide the file as base64-encoded data.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
media_dataYesBase64-encoded media file data
mime_typeYesMIME type (e.g. 'image/png', 'image/jpeg', 'video/mp4')
media_categoryNoCategory: 'tweet_image', 'tweet_gif', or 'tweet_video' (default: tweet_image)
Behavior2/5

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

With no annotations, the description carries full burden but provides minimal behavioral context. It mentions the return value (media_id) but lacks details on error conditions, rate limits, authentication requirements, or side effects (e.g., whether uploads are public or private).

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?

Two concise sentences with zero waste: the first states purpose and outcome, the second provides key parameter guidance. It's front-loaded and appropriately sized for the tool's complexity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with no annotations and no output schema, the description is adequate but incomplete. It covers the basic purpose and parameter format but lacks critical context like error handling, usage constraints, or integration with sibling tools (e.g., post_tweet).

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?

Schema description coverage is 100%, so the schema fully documents parameters. The description adds marginal value by clarifying that media_data is 'base64-encoded' and that the media_id is for attaching to posts, but doesn't provide additional semantics beyond what the schema already covers.

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 specific action ('upload'), resource ('image or video to X'), and outcome ('returns a media_id that can be attached to posts'), distinguishing it from sibling tools that focus on reading, deleting, or interacting with tweets rather than uploading media.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., authentication), constraints (e.g., file size limits), or how it relates to sibling tools like post_tweet (which might use the media_id).

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

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