Skip to main content
Glama

Read a file

rent_read_file
Read-onlyIdempotent

Reads a file from a running sandbox. Without encoding the content comes back as UTF-8 text when it is valid UTF-8, else as base64.

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": {
      "sandbox_id": "<sandbox_id>",
      "path": "<path>"
    },
    "name": "rent_read_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesAbsolute path, e.g. /home/user/main.py.
encodingNo
sandbox_idYesSandbox id (`lse_…`) from rent_create_sandbox or rent_list_sandboxes. It names the sandbox for its whole life and keeps answering rent_get_sandbox, with the final state, after it ends.

Output Schema

NameRequiredDescriptionDefault
pathYes
sizeYesBytes.
contentYes
encodingYes

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, idempotentHint, destructiveHint=false and openWorldHint, so the safety profile is covered. The description adds real value by disclosing the return-format rule: UTF-8 when valid, otherwise base64. It says nothing about failure modes (missing path, directory, oversized file) or size limits, which is the main remaining gap.

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, front-loaded with the action and followed by the output-format rule. Nothing is padded or repeated from the title.

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 an output schema and full annotations present, the description need not explain return shape or safety, and it covers the encoding behavior well. However, for a file-read tool it omits practical operating context such as error behavior for missing paths, read size limits, and whether the sandbox must be active — enough gaps to keep it at minimum-viable-plus.

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 coverage is 67%, and the one undocumented parameter is `encoding`, which the description specifically explains: omitting it yields auto-detected UTF-8 or base64. That directly supplies meaning the schema's bare enum does not, so it exceeds the baseline.

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 names a specific verb and resource ("Reads a file") and scopes it to "a running sandbox", which cleanly separates it from rent_write_file. It does not explicitly name or contrast with any sibling, so it falls 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 Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no statement of when to use this tool versus alternatives such as rent_exec or rent_get_process_output, nor any prerequisites (e.g. that the sandbox must be running). The only guidance is implicit in "running sandbox", which hints at a precondition but never states what happens after the sandbox ends.

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.

Resources