Skip to main content
Glama

read_file

Read-only

Read text from a file in a ShareLaTeX project, optionally limited to a line range. Use it to inspect .tex sources or chapter files before editing.

Instructions

Read text from one file in a ShareLaTeX project.

Read-only. project is a project name or id. file_path is the path
inside the project, such as main.tex or chapters/intro.tex. Omit
start_line and end_line to read the whole file. Line numbers are
1-based and inclusive. end_line past the end of the file is clamped.

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": "<project>",
      "file_path": "<file_path>"
    },
    "name": "read_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
projectYes
end_lineNo
file_pathYes
start_lineNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so 'Read-only' is largely redundant. However, the description adds genuinely new behavioral detail: 1-based inclusive line numbering and the fact that end_line past EOF is silently clamped, which tells the agent it will not error on out-of-range requests.

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 core action and scope are front-loaded in the first sentence, followed by tightly packed parameter semantics. No sentence is wasted and the line-number contract is grouped logically.

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?

An output schema exists, so return values need no explanation, and the read-only annotations cover the safety profile. Minor gaps remain around error behavior (nonexistent project or file) and whether very large files are truncated, but nothing essential to a correct call is missing.

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

Parameters5/5

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

Schema coverage is 0%, so the description carries the full burden and does so: project is a name or id, file_path is a project-relative path with concrete examples (main.tex, chapters/intro.tex), and start_line/end_line are 1-based, inclusive, and optional for whole-file reads.

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 first sentence names a specific verb and resource ('Read text from one file in a ShareLaTeX project') and the 'one file' scoping implicitly separates it from whole-project or section-level reads. It does not explicitly name a sibling such as read_section to disambiguate, so it falls short of the top mark.

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?

The description gives parameter-level usage guidance ('Omit start_line and end_line to read the whole file'), which implies the whole-file vs range cases. It never states when to prefer this over read_section, search_project, or list_files, leaving the alternative selection to inference.

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