Skip to main content
Glama

Read media file

read_media_file
Read-onlyIdempotent

Reads an image or audio file as base64 with its MIME type so AI assistants can process media content. Use PDF-specific tools for PDF pages or text.

Instructions

Read an image or audio file as base64 with its MIME type. Not for PDF: one page as an image is read_pdf_page, the text is read_pdf_text.

Input Schema

NameRequiredDescriptionDefault
pathYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so the safety profile is covered by structured data. The description contributes the useful behavioral detail that output is base64 plus MIME type, but says nothing about size limits or how large files are handled — a real concern for base64 payloads.

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 short sentences with zero filler; the core capability is front-loaded and the PDF exclusion follows immediately as the natural next question.

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?

With no output schema, the description correctly states the return content (base64 + MIME type), which is the essential missing piece. Minor gaps remain on path format and any file-size or supported-format limits, but nothing an agent needs in order to attempt a correct call is absent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% and the description says nothing about the single 'path' parameter — no absolute vs relative convention, no mention of the allowed-directories constraint implied by the list_allowed_directories sibling. The agent must guess the path format, so the description fails to compensate for the coverage gap.

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 and resource ('Read an image or audio file') and adds the return form ('as base64 with its MIME type'), so the agent knows both action and payload shape. It also explicitly delineates the media-vs-PDF boundary, naming the sibling tools that handle PDFs.

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 an explicit exclusion ('Not for PDF') and routes to the two correct alternatives, read_pdf_page and read_pdf_text. It does not mention when to prefer read_text_file for plain text content, which is the one obvious adjacent case left to inference.

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