Skip to main content
Glama

Read Media File

read_media_file
Read-only

Extract base64-encoded data and MIME type from image or audio files within permitted directories for processing by AI agents.

Instructions

Read an image or audio file. Returns the base64 encoded data and MIME type. Only works within allowed directories.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYes
Behavior3/5

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

Annotations already declare readOnlyHint=true, so the agent knows this is a safe read operation. The description adds useful context about directory restrictions and output format (base64 + MIME type), but does not cover rate limits, file size limits, or error behaviors, which would enhance transparency further.

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?

The description is front-loaded with core purpose and output, followed by a constraint, in two efficient sentences with zero wasted words, making it easy for an agent to parse quickly.

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?

Given the tool's low complexity (1 parameter), annotations covering safety, and an output schema (implied by context signals), the description is mostly complete but could improve by detailing parameter semantics or error cases. It adequately covers purpose, constraints, and output without redundancy.

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 0%, so the schema provides no parameter details. The description does not explain the 'path' parameter beyond implying it's for file location, leaving format and constraints unspecified. This is a baseline score as the description adds minimal semantic value over the bare 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 clearly states the specific action ('Read'), resource ('image or audio file'), and output ('base64 encoded data and MIME type'), distinguishing it from sibling tools like read_file, read_text_file, and read_multiple_files by specifying media file types.

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?

The description provides clear context with 'Only works within allowed directories,' guiding when to use it, but does not explicitly mention when not to use it or name alternatives like read_text_file for non-media files, which would have earned a 5.

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/agentward-ai/agentward'

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