Skip to main content
Glama

Read an app's file

read_file
Read-only

Read a file from line offset, counted from 1: 1,000 lines by default, 2,000 at most, and 40,000 characters at most. A published app's data file is read from the live app, any other file from the draft.

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": {
      "app": "<app>",
      "path": "<path>"
    },
    "name": "read_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
appYesThe app, as list_apps names it, such as sam/budget.
pathYesapp.py, instructions.md, tests/<name>.py, migrate.py or data/<name>.
limitNo
offsetNo

Schema Changelog

Changes observed during successful MCP inspections.

No schema history has been recorded yet.

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so safety is covered. The description adds genuinely useful behavior beyond that: 1-based line offsetting, a 1,000-line default, 2,000-line maximum, a 40,000-character cap, and the live-vs-draft source resolution. It stops short of saying what happens on truncation (e.g., whether a marker or flag is returned).

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?

Two tight sentences with no filler; the offset semantics and size limits are front-loaded. The colon-joined clause stacking three limits is slightly dense but still readable.

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 read-only, four-parameter tool with no output schema, the definition covers the essentials an agent needs: source resolution and truncation bounds. The remaining gap is the truncation/return behavior when a file exceeds the caps, which would be helpful but is not strictly required.

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 only 50%, with limit and offset carrying no descriptions in the schema. The description compensates by defining offset as 1-based and restating the limit default and ceiling, plus adding a 40,000-character cap that is absent from the schema entirely. The app/path semantics are left to the schema's own descriptions.

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 ('Read a file') and adds the scope of the read, including where the content comes from (live app for published data files, draft otherwise). It does not explicitly contrast with near-siblings such as read_app_data or ask_for_app_file, 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 Guidelines3/5

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

Usage context is implied by the published-vs-draft rule, which tells the agent what content it will actually get. However, there is no explicit when-to-use guidance or named alternative (e.g., for writing, listing, or reading non-file resources), so the agent must infer routing from sibling names alone.

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