Skip to main content
Glama

Get a media file

get_media
Read-only

Read one library file: filename, mimeType, size, dimensions, duration, altText, hasThumbnail and — for a video — processing (true while it is still being prepared: wait until it is false before attaching it, so the post does not publish a video the platform cannot read yet). Use it to check a fresh upload or import before attaching it; no download URL is returned.

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

Input Schema

NameRequiredDescriptionDefault
mediaIdYesThe media ID (from list_media)
organizationIdNoOrganization to act in — an id from list_organizations. Required when this connection was authorized for more than one organization; omit it when there is only one.

Output Schema

NameRequiredDescriptionDefault
idNoUse this as a mediaId on a post
sizeNoBytes
widthNo
heightNo
altTextNoAlternative text published with this file; null when none — set it with update_media
durationNoSeconds, for video
filenameNo
mimeTypeNo
mimetypeNoDeprecated: the same value as mimeType, kept for one release cycle. Use mimeType.
createdAtNo
duplicateNoTrue when an import matched a file already in the library
processingNoTrue while a fresh video is still being prepared (poster and dimensions); wait before attaching it to a post
hasThumbnailNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already establish readOnly/non-destructive/openWorld, and the description adds real context on top: the semantics of the processing flag, the consequence of ignoring it (a published post with a video the platform cannot read), and an explicit limitation that no download URL is returned. That is behavior an agent could not infer from the annotations.

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?

Front-loaded with the resource and its fields, then the actionable caveat; nearly every clause carries information. The nested parenthetical about processing is dense and could be split for readability, but nothing is wasted.

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 simple two-parameter read with a full output schema and clear annotations, the definition covers what an agent needs: what is returned, what is deliberately not returned, and the readiness check before attaching. No gap remains that would cause a mis-call.

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 both parameters are documented in-schema, including mediaId's provenance (from list_media) and the multi-org rule for organizationId. The description adds no parameter-level meaning beyond that, so the baseline 3 applies.

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?

Opens with a specific verb+resource ("Read one library file") and enumerates exactly what comes back (filename, mimeType, size, dimensions, duration, altText, hasThumbnail, processing). The word "one" distinguishes it from the list_media sibling, and the stated fields let an agent decide whether this is the right read for its question.

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?

Gives a concrete usage condition — check a fresh upload or import before attaching it — plus a timing rule: wait until processing is false before attaching. It stops short of naming an explicit alternative or when-not-to-use case (e.g. versus get_media_usage for statistics), so it is clear but not fully routed.

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.

Resources