Skip to main content
Glama

media_extraction_helper

Extracts direct media URLs from a tweet, including images, videos, and animated GIFs. Returns URLs with dimensions, bit rates, and content types for further processing.

Instructions

Extracts direct media URLs (images, videos, animated GIFs) from a tweet. Use this tool when the LLM needs to access media content from a tweet—for example, to view an attached image, download a video, analyze media metadata, or pass media URLs to other tools. For photos, returns the direct image URL. For videos and animated GIFs, returns all available variants with direct URLs, bit rates, and content types. The highest bitrate MP4 variant is typically the best quality video. Returns the tweet ID, media array with type/URL/dimensions/duration, and total media count.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tweet_idYesThe unique numeric string ID of the tweet to extract media from. The tool will fetch the tweet with media expansions and return direct URLs for all attached images, videos, and animated GIFs.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
statusYesIndicates the outcome of the operation: "success" or "error".
messageYesA human-readable summary of the result.
dataYesContainer holding the extracted media URLs and metadata.
Behavior4/5

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

With no annotations, description details behavior: return format for photos vs videos/GIFs, mentioning bitrates and highest quality, along with returned fields (tweet ID, media array, count). Lacks mention of rate limits or auth.

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?

Description is concise, front-loaded with main action, and every sentence adds value without redundancy.

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?

Given single parameter, presence of output schema, and no nested objects, the description fully covers input, output, and behavior.

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% with one parameter. Description adds context by explaining the tool fetches tweet with media expansions, supplementing the schema's brief description.

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 extracts direct media URLs from a tweet, specifying types (images, videos, animated GIFs). It distinguishes from siblings like post_tweet or search_tweets, which have different purposes.

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?

Explicitly says when to use (e.g., to view attached image, download video) but does not mention when not to use or provide alternatives.

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/GenAIwithMS/twitter-mcp'

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