Skip to main content
Glama

read_file

Retrieve files from a sandbox to view code outputs, logs, and generated reports. Use base64 encoding for binary files like images.

Instructions

Read a file back out of a sandbox — an artifact your code produced, a log, a generated report. Use encoding "base64" for binary files such as images.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
encodingNo
sandbox_idYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.1.0

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description must carry the behavioral burden. It conveys that the operation is a read and gives an encoding hint for binary files, but it does not disclose what happens on missing files, whether the path is relative to the sandbox root, or how the file content is returned (text vs base64 string).

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 two concise sentences. The purpose is front-loaded in the first sentence, and the useful encoding guidance follows immediately. There is no filler, repetition, or unnecessary detail.

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

Completeness2/5

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

There is no output schema and no annotations, so the description should explain return values and usage context more fully. It does not state what the response contains, what encoding default applies, or how the path should be specified, leaving an agent to guess important operational details.

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%, so the description must compensate. It only explains the encoding parameter usage explicitly; sandbox_id and path are left to inference from the tool name and general context. The path format and identifier semantics are not addressed.

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 opens with a specific verb and resource: 'Read a file back out of a sandbox.' It also clarifies the types of files intended ('an artifact your code produced, a log, a generated report'), which differentiates it from siblings like write_file and list_files without needing to name them.

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 implies when to use this tool: to retrieve artifacts your code produced while running in a sandbox. It also provides a concrete parameter-level instruction ('Use encoding "base64" for binary files such as images'), but it does not explicitly state exclusions or compare against alternatives like list_files for discovering files.

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

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/fstandhartinger/sandbox-as-a-service-mcp'

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