Skip to main content
Glama
flafkus
by flafkus

read_file

Read-only

Retrieve the contents of a text file from an Overleaf project. Large files are truncated unless the full flag is set, and the response indicates if truncation occurred.

Instructions

Read a text file from an Overleaf project.

Files over 100000 characters are truncated unless full=True, and the response sets truncated=true. write_file refuses to replace a file that was only read in part, because the unseen tail would be lost.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fullNoReturn the whole file instead of the first 100000 characters. Needed before write_file can replace a large file; prefer edit_file for a targeted change.
pathYesPath inside the project, e.g. main.tex
projectYesProject id (24-char hex) or exact name

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

The readOnlyHint annotation is complemented by concrete behavioral detail: the 100000-character truncation threshold, the truncated flag in the response, and the interaction with write_file when a file was only partially read. This goes well beyond the annotation.

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?

The description is compact and front-loaded, with only three purposeful sentences. Every sentence adds useful information: what the tool does, its truncation behavior, and a critical safety interaction with write_file.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The definition is complete for a read operation: it identifies the resource, covers truncation and full-file reading, explains consequences of partial reads, and an output schema exists so return values need not be described in prose.

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 description coverage is 100%, so the baseline is 3. The main description repeats the full parameter's truncation behavior rather than adding substantial new param semantics beyond the schema, though it does usefully tie full=True to the write_file safeguard.

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?

The description opens with a specific verb and resource: 'Read a text file from an Overleaf project.' It clearly distinguishes this tool from siblings like list_files and write_file, and the truncation/write_file behavior reinforces its role as a read operation.

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

Usage Guidelines5/5

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

The description explicitly explains when full=True is necessary and warns that write_file will refuse to replace a partially-read file. The schema adds 'prefer edit_file for a targeted change,' giving clear guidance on choosing between read_file and edit_file.

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