Skip to main content
Glama

Read a file

sandbox_read_file
Read-onlyIdempotent

Read a file. Reads a file from the sandbox as text, or as base64 with encoding=base64. At most 10 MB.

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": {
      "path": "<path>",
      "sandboxId": "<sandboxId>"
    },
    "name": "sandbox_read_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesAbsolute, or relative to the sandbox's home directory.
encodingNoutf-8
sandboxIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true and openWorldHint=false, so the safety profile is covered. The description adds two genuinely new facts: a hard 10 MB cap and that binary content comes back as base64. It does not say what error occurs past 10 MB or whether the read is bytes-exact.

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?

Three short, front-loaded sentences with the size cap placed last as a constraint. The first sentence largely restates the title, a minor redundancy, but nothing else is wasted.

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

Completeness3/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 does state the return form (text or base64), which is the most important missing piece. It nonetheless leaves sandboxId undefined and says nothing about failure modes, binary detection, or behavior on non-existent paths for a 3-parameter tool.

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 only 33% (only path is documented), so the description partially compensates by explaining the encoding parameter's two modes and their effect on returned content. sandboxId remains unexplained in both schema and description, and no path-format details are added beyond the schema's note.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Read a file... from the sandbox'), and the tool name/context makes the contrast with sandbox_write_file and sandbox_exec evident. It does not explicitly name a sibling alternative, so it stops short of a 5.

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?

Usage is implied by the read-only nature and the note that base64 is used 'with encoding=base64', which tells the agent when to pick that mode. However, there is no explicit when-to-use versus sandbox_get or sandbox_exec, and no guidance on when a file is too large to read versus streaming.

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.