Skip to main content
Glama

Read a project file

read_file
Read-only

Reads live Overleaf project files, including collaborators' unsaved edits, with optional line ranges; images returned as images.

Instructions

Reads a file live from Overleaf (always the latest content, including collaborators' unsaved typing). Optionally a line range. Images (png/jpg/gif/webp) are returned as images.

Input Schema

NameRequiredDescriptionDefault
pathYesFile path inside the project, e.g. "main.tex" or "sections/intro.tex"
endLineNo
projectNoProject name, id or Overleaf URL. May be omitted when exactly one project is pinned.
startLineNo
lineNumbersNoPrefix lines with their numbers (do not copy these into edits)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.1.1

TDQS

A4/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, openWorldHint=true), and the description still adds real behavioral context: content is live and may include unsaved collaborator edits, and the return type varies with file extension (images vs text). It omits what happens on a missing path, whether line ranges are 1-indexed/inclusive, and the cost of live reads, so it stops short of a 5.

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 short sentences, front-loaded with the live-content guarantee, then the optional range, then the media-type caveat. Every clause carries information an agent needs and nothing is repeated from the schema.

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?

There is no output schema, so the description rightly explains the return shape (text vs image) and the line-range option, which is the main ambiguity for a 5-param read tool. Missing only error behavior for invalid or binary paths and the interaction between lineNumbers and a range, which keeps it short of complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 60%: path, project, and lineNumbers are documented in-schema, while startLine/endLine have only numeric bounds. The description partially compensates by framing them as a combined 'line range', but does not say they are inclusive, 1-indexed, or whether endLine can be omitted while startLine is set. It adds little beyond the schema for the documented params.

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?

Specific verb+resource ('Reads a file live from Overleaf') with the defining scope called out: it returns the latest live content including collaborators' unsaved typing, which separates it from a saved-state read like download_file. It also states the two output shapes (text with optional line range, images returned as images), so an agent can tell it apart from grep/search without opening 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?

Usage is implied rather than stated: 'live ... latest content' tells the agent to prefer this over a saved copy, and 'Images ... returned as images' hints at when it beats a text-only path. But no sibling is named and no when-not condition is given (e.g. use grep to find content across files, download_file for export).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.