Skip to main content
Glama

Read a file

read_file
Read-only

Returns a text file's content as everyone sees it now. Optionally only a range of lines (1-based, inclusive). The content is the author's manuscript text. An image (PNG, JPEG, GIF, WebP) is returned as the picture itself, and a PDF or EPS figure as a picture of its first page, so figures can be looked at.

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_id": "<project_id>",
      "path": "<path>"
    },
    "name": "read_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesThe file's path, e.g. main.tex or sections/intro.tex.
end_lineNo
project_idYesThe project's id, from list_projects.
start_lineNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint true, destructiveHint false, openWorldHint false), so the bar is lower. The description still adds real behavioral context: that the returned text is the author's manuscript source rather than rendered output, and that non-text files come back as pictures rather than bytes or an error. It does not cover large-file limits, encoding, or error behavior for missing paths.

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 sentences, front-loaded with the primary behavior, then the line-range option, then media handling. Every sentence carries information; the closing clause 'so figures can be looked at' is slightly informal padding, and 'as everyone sees it now' is a looser phrasing of 'current saved version.'

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 must describe what comes back, and it does so well across text and image types. For a 4-parameter read tool this is nearly complete; only handling of unlisted binary formats and error cases is absent, which is a minor gap.

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% — start_line and end_line have no schema descriptions — and the description compensates precisely by defining the optional line range as 1-based and inclusive. Path format and project_id provenance are already documented in the schema, so nothing important is left unexplained.

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 and resource ('Returns a text file's content') and scopes it to the current shared version. It further distinguishes output modality by file type — text for source files, the image itself for PNG/JPEG/GIF/WebP, first-page picture for PDF/EPS — which an agent cannot infer from the name alone and which separates it from write_file, edit_file, and delete_file.

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 implied rather than stated: the agent can infer 'use this to look at a file's contents,' but there is no explicit when-to-use, when-not-to-use, or pointer to an alternative such as list_files or search for locating content. No prerequisites or failure conditions are mentioned.

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