Skip to main content
Glama

X media

x_media

Upload images, GIFs, videos, or subtitles to X, poll video/GIF processing, and retrieve post media as viewable images or extracted frames for vision-capable models.

Instructions

Upload media, check video/GIF processing, and view attached media — photos are returned as images, videos are sampled into frames when ffmpeg is installed.

Actions (pass "action" plus that action's parameters):

  • upload: Upload an image, GIF, video or subtitle file and get a media_id to attach to x_posts action "create" or x_dms action "send".

  • status: Poll the processing state of an uploaded video or GIF. [requires: media_id]

  • view: Downloads media attached to a post and returns it as MCP image content, so vision-capable models can actually see pictures instead of only reading URLs.

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": {
      "action": "<action>"
    },
    "name": "x_media"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNo
pathNoPath to a local media file inside X_MCP_MEDIA_ROOTS (default: current directory).
actionYesAction to perform. One of: upload, status, view.
base64NoBase64-encoded file contents (no data: prefix, max 25 MB decoded).
framesNoHow many video frames to extract when ffmpeg is available.
alt_textNoAccessibility description (max 1000 chars).
categoryNoX media category. Inferred from the MIME type when omitted.
filenameNoFilename used to infer the MIME type for base64 uploads.
media_idNoMedia id returned by an upload.
tweet_idNoPost whose media should be viewed.
media_typeNoMIME type, e.g. image/png or video/mp4. Inferred when omitted.
media_indexNoWhich attachment to view for multi-image posts (0-3).
wait_for_processingNoPoll until video processing finishes.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, openWorldHint=true, idempotentHint=false and destructiveHint=false, so the bar is lower, yet the description still adds real behavior: photos come back as images, videos are frame-sampled only when ffmpeg is installed, and upload yields a media_id. It omits auth/permission requirements and rate limits, and does not clarify that status/view are non-mutating despite the tool-level readOnlyHint=false.

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 lead sentence front-loads the three capabilities and the return behavior, then a compact action list adds the per-action detail. Every line is load-bearing, though the action bullets repeat the enum values already present in the schema's action property.

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 13-parameter dispatch tool with no output schema, the description covers the action surface but never maps the flat parameter set onto individual actions (e.g., that path/url/base64 belong to upload, tweet_id/media_index to view). An agent can pick an action but must fully reverse-engineer parameter combinations from the schema alone.

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 92%, so the schema already carries most parameter meaning; the description only reinforces a few items such as frames being tied to ffmpeg availability and media_id originating from upload. It does not explain which parameters pair with which action, and wait_for_processing, alt_text, category and media_index are left entirely to the schema.

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 three concrete verb+resource actions (upload media, poll processing status, view attached media) and states the return form (media_id, MCP image content) for each. It also positions the tool relative to siblings by naming x_posts action "create" and x_dms action "send" as the consumers of the returned media_id, so an agent can tell this apart from the posting and DM tools.

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

Usage Guidelines4/5

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

Each action is given a clear use context: upload when you need a media_id to attach, status when polling video/GIF processing, view when a vision model needs to actually see attachments rather than read URLs. It does not give explicit when-not-to-use guidance or say how to choose between upload's path/url/base64 input forms, which is left to the schema.

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