Skip to main content
Glama

Read one LaTeX section

read_section
Read-only

Extract one LaTeX section from an Overleaf .tex file by title, returning only that section's source so revisions stay focused and the rest of the paper remains out of context.

Instructions

Read one section of a .tex file by its title: from its heading to the next heading at the same or a shallower level, stopping before trailing matter such as \appendix, the bibliography or \end{document}. Prefer it over read_file when revising one part of a paper, so the rest stays out of context. sectionTitle is compared case-insensitively with the title in braces, not an optional [short] title: an exact match wins, otherwise the first heading in document order that contains it, so a short fragment can pick an earlier section than intended. Pulls from Overleaf first. Returns the section's LaTeX source as stored, cut off after 60,000 characters; if nothing matches, the reply lists the titles that exist.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesPath to the .tex file relative to the project root, e.g. main.tex.
projectNoWhich project to use: its Overleaf address, its 24-character id, or a registered project name. Omit to use the default project.
sectionTitleYesSection title exactly as it appears inside the sectioning command, e.g. Introduction for \section{Introduction}. Call list_sections first if unsure.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.8

TDQS

A4.9/5.0
Behavior5/5

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

Annotations only give readOnlyHint/openWorldHint; the description adds substantial behavior: source resolution (Overleaf first), an explicit output cap of 60,000 characters with truncation, the boundary rule that stops before \appendix/bibliography/\end{document}, and the failure mode of returning existing titles. That is a lot of operational context beyond the annotations.

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?

Front-loaded with the core action and free of filler, but it is dense: matching rules, truncation limit, source precedence and fallback behavior are packed into a few long multi-clause sentences, which would read better split out.

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?

There is no output schema, and the description compensates fully: it says what is returned (the section's stored LaTeX, truncated at 60,000 chars) and what happens on no match. Combined with the boundary and source rules, an agent has everything needed to call this correctly.

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 100%, yet the description goes past it by explaining that sectionTitle is matched case-insensitively against the brace title (not the [short] title), with exact match winning and otherwise first-containing match in document order — plus the concrete consequence that a short fragment may resolve to an earlier section. This is real added meaning for a required parameter.

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?

Opens with a precise verb+resource+scope: 'Read one section of a .tex file by its title', then defines the exact boundary (heading to next heading at same or shallower level). It explicitly contrasts itself with read_file, so an agent can separate it from sibling tools 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 Guidelines5/5

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

States the positive trigger ('when revising one part of a paper, so the rest stays out of context') and names the alternative to avoid ('Prefer it over read_file'). It also points to list_sections as the disambiguation step and records the 'Pulls from Overleaf first' source precedence.

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