Skip to main content
Glama

get_section_content

Read-only

Reads the parsed body of a single LaTeX section by ID, from its heading to the next same-or-higher heading, including nested subsections. Optionally follows \input and \include directives.

Instructions

Read one parsed section body. The body runs from after the heading to the next heading at the same or a higher level, so it includes nested subsections, and the last section runs to the end of its file, including \end{document} when the file holds it. By default this reads a single file. With followIncludes: true, filePath is the document get_sections started from and sectionId comes from that call; a section that lies in one file is read as that file holds it, include directives included, which is exactly what write_section replaces, and revision is that file's revision; a section in an included file ends where that file ends, so it never holds the including file's \end{document}. A section with spansFiles: true reads as flattened text across files, for reading only.

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": {
      "projectId": "<projectId>",
      "filePath": "<filePath>",
      "sectionId": "<sectionId>"
    },
    "name": "get_section_content"
  }
}

Input Schema

NameRequiredDescriptionDefault
filePathYesProject-relative path using forward slashes
projectIdYesOverleaf project ID
sectionIdYes
followIncludesNoFollow \input, \include, \subfile, and \import directives from filePath down, as get_full_document does; defaults to false, one file only

Output Schema

NameRequiredDescriptionDefault
contentYes
sectionYes
revisionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.3.0

TDQS

A4.2/5.0
Behavior5/5

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

Annotations only declare readOnlyHint, so the description carries the behavioral burden and does so thoroughly: it explains section boundary rules, nested subsection inclusion, \end{document} handling, how include directives are resolved per file, what revision refers to, and that the single-file read is exactly what write_section replaces. These are non-obvious traits an agent could not infer from the schema or 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?

Purpose is front-loaded in the first sentence and every subsequent sentence carries distinct operational information with no filler. The prose is dense and clause-heavy ("a section that lies in one file is read as that file holds it, include directives included"), which costs some readability, but nothing is redundant.

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 an output schema present, no return-value explanation is needed, and the description covers the hard cases: cross-file sections, include boundaries, and read-only flattened spans. It stops short of describing failure behavior for an invalid sectionId or a projectId that does not own the file, which would complete the picture for a tool that is otherwise well specified.

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 75%, leaving sectionId undescribed in the schema, and the description compensates by stating sectionId comes from get_sections. It also adds meaning the schema does not: filePath denotes the root document rather than the containing file when followIncludes is true. This is meaningful semantic lift over a baseline of 3.

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 gives a specific verb and resource ("Read one parsed section body") and the rest defines exactly what constitutes a section body versus a whole file. It is clearly distinct from the enumerating sibling get_sections, which it references as the source of sectionId, though it never names get_full_document or read_file as alternative entry points.

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

Usage Guidelines4/5

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

It establishes a clear default ("By default this reads a single file") and states the prerequisite for the alternative mode: with followIncludes: true, filePath must be the document get_sections started from and sectionId must come from that call. It also flags that spansFiles sections are "for reading only." What's missing is explicit guidance on when to choose this tool over get_full_document or read_file, but the conditions for each internal mode are unambiguous.

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