Skip to main content
Glama

studio_read_file

Read-onlyIdempotent

Read a file of the open page, with line numbers. Without a range, returns the first 400 lines; ask for more with start_line and end_line. A line longer than 8000 characters is cut; studio_search_in_files finds text inside it. version "start" reads the file as it was when the session opened, to put back something removed.

Input Schema

NameRequiredDescriptionDefault
pathYesOne of the page's four files.
versionNocurrent (the default): the file as it is now; start: as it was when the session opened.
end_lineNo
session_idYesThe session_id studio_open_page returned.
start_lineNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4/5.0
Behavior4/5

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

Annotations already cover read-only/idempotent safety, and the description adds genuinely new behavioral facts: the 400-line default window, the 8000-character line truncation, and the historical view semantics of version "start". It doesn't say what happens when the path or session_id is invalid, but the truncation/limit disclosures are exactly the kind of context an agent needs.

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 tight sentences with the core action and default behavior front-loaded. The final clause about version "start" is slightly compressed and reads awkwardly, but no sentence is filler.

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 5-parameter read tool with no output schema and full annotation coverage, the description supplies the essentials an agent needs to call it correctly: available files, default range, truncation behavior, and the historical-version option. Error handling and exact response shape remain unstated, but those are minor here.

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?

With 60% schema coverage (path, version, session_id described; start_line and end_line bare), the description compensates by explaining the default line window and that start_line/end_line request more, and it elaborates the current-vs-start meaning. Only session_id is left to the schema, so the description meaningfully closes the coverage 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 opens with a specific verb and resource ("Read a file of the open page, with line numbers") and scopes it to the page's files, which separates it from the write/edit siblings. It also names studio_search_in_files as the alternative for locating text, though it doesn't contrast with studio_read_doc.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

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

It gives concrete usage context: the 400-line default and how to page with start_line/end_line, plus a pointer to studio_search_in_files when text is buried inside a long line. It also explains when to use version "start" (to restore something removed). It stops short of stating prerequisites or when not to use it.

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.