Skip to main content
Glama

Get media

get_media
Read-only

Gets a file from a message (its media.id, or an email attachment's id): a picture comes back as an image to look at, a text file or PDF as its text, and every file with a download link valid for 15 minutes.

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": {
      "media_id": "<media_id>"
    },
    "name": "get_media"
  }
}

Input Schema

NameRequiredDescriptionDefault
media_idYesThe file's ID (media_…): a message's media.id, or an email attachment's id.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.9/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=true; the description adds real behavioral detail: images return as viewable images, text files and PDFs return as text, and every file carries a download link valid for 15 minutes. It does not cover failure behavior for expired or missing media, which would have pushed this higher.

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?

A single front-loaded sentence with three informative clauses and no filler. It is dense and slightly run-on, but every clause carries usable information about inputs or returns.

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

Completeness4/5

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

For a one-parameter, read-only tool with no output schema, the description covers both the accepted ID sources and the shape of the return value per file type, including link expiry. Only error/expiry handling and unsupported-type behavior are left implicit.

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 coverage is 100% and the schema's own media_id description already says a message's media.id or an email attachment's id, so the description largely restates it. It adds no format, length, or sourcing guidance beyond the schema, which is the baseline 3 case.

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?

States a specific verb ('Gets') and resource ('a file from a message'), and explicitly scopes the ID to a message's media.id or an email attachment's id. It also enumerates what comes back by file type, which separates it cleanly from get_message or read_chat at the point of selection.

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

Usage Guidelines3/5

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

The description implies when to use it (when you have a media.id or attachment id and want the file itself), but never says when not to use it or names an alternative such as get_message for retrieving the surrounding message. Usage is inferable rather than stated.

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.