Skip to main content
Glama

runtime_sandboxes_files_read

Read-only

Read a file in a sandbox as text (UTF-8) or base64. Text reads can take a line range (startLine, lineCount) so large files come in pieces; the reply says the total line count. At most 1 MiB per read; any path the sandbox user may read.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
pathYesAbsolute path in the sandbox, e.g. /workspace/app/main.py. Any path the sandbox user may use.
encodingNotext
lineCountNo
startLineNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is covered. The description adds genuinely useful behavioral context beyond that: a 1 MiB per-read limit, that the reply includes total line count, and that any path the sandbox user may read is allowed. It omits error/oversize behavior, but the added constraints are substantive.

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?

Three tight sentences, front-loaded with the core action and immediately followed by the encoding and paging mechanics. No filler; every clause conveys an operational detail.

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 does note the reply carries the total line count, and it covers size limits, encoding, paging, and permission scope. A little more on the returned content structure (e.g., how base64 vs text is surfaced, truncation signaling) would make it fully complete.

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 low (20%), so the description carries real weight: it explains encoding (text/base64), the startLine/lineCount line-range semantics, and the path access permission scope. Only 'id' remains unexplained, but its UUID type makes it self-evident, so the description compensates well 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 (read) and resource (a file in a sandbox) with the scope of what it returns (text UTF-8 or base64). This clearly separates it from siblings like files_list, files_write, files_manage, and files_watch without needing to open any schema.

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?

It implies usage through the encoding and line-range mechanics but never states when to choose this over alternatives such as files_list or files_manage, nor any prerequisites. Usage is inferable from context rather than explicitly guided.

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.