Skip to main content
Glama

sandbox_read_file

Read-only

Read text files from a project's sandbox using relative paths resolved against /workspace/work, with optional byte limits to control output size.

Instructions

Read a text file from a project's sandbox. Relative paths resolve against /workspace/work.

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

Input Schema

NameRequiredDescriptionDefault
pathYesFile path inside the sandbox.
projectYesInstalled project: its slug, or its id such as "github:owner/name".
max_bytesNoRead at most this many bytes (default 100000).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

readOnlyHint=true already tells the agent this is a non-mutating operation, so the description does not need to restate safety. It does add genuinely new behavior not in any structured field: relative paths resolve against /workspace/work. It omits what happens on a missing file or whether output past max_bytes is truncated or an error, which would matter for an agent parsing results.

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, zero filler, with the core action front-loaded and the path-resolution rule immediately after. Nothing could be removed without losing information.

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?

For a simple read tool with full schema coverage, a readOnly annotation, and no output schema, the definition is nearly sufficient. The remaining gaps are error and truncation behavior, which are minor for a basic file read but would help an agent interpret results.

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

Parameters4/5

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

Schema description coverage is 100%, so the baseline is 3, but the description adds real meaning beyond the schema: the schema only says 'File path inside the sandbox,' while the description specifies that relative paths resolve against /workspace/work. It adds nothing further about max_bytes truncation semantics, which is the one remaining gap.

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?

The description states a specific verb and resource: reading a text file from a project's sandbox. The sibling set contains sandbox_write_file and sandbox_exec, and the read/write/exec distinction is self-evident from the verb, though the description never names an alternative explicitly.

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 only implied: the phrase 'Read a text file' signals this is for textual content rather than binaries or execution, which steers the agent away from sandbox_exec. There is no explicit when-to-use statement, no prerequisite about the project needing to be installed, and no discussion of when to prefer a project tool via call_project_tool instead.

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