Skip to main content
Glama

Read one section

get_section
Read-only

Read a named section's LaTeX by title, with its file and line range, so you can inspect one part without loading the full document.

Instructions

Returns the LaTeX of one section (up to the next heading of the same or higher level), found by title anywhere in the document, with its file and line range. Read-only. Use it to read a section without the whole file (get_outline lists the titles); to change it, copy text from here into edit_file.

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": {
      "title": "<title>"
    },
    "name": "get_section"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileNoOnly look in this file, e.g. "sections/intro.tex"
titleYesSection title, matched case-insensitively (exact first, then unique partial match)
projectNoProject name, id or Overleaf URL. May be omitted when exactly one project is pinned.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.1.4
    • changedInput schema / properties / file / description
      Previous value: -"Look only in this file"New value: +"Only look in this file, e.g. \"sections/intro.tex\""
  2. First observedv2.1.1

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so the repeated "Read-only" is redundant. However, the description adds real behavioral context the annotations cannot: the precise slice boundary (next heading of same or higher level) and the fact that the response includes file and line range. It does not say what happens when a title matches nothing or several sections partially match (the uniqueness rule lives only in the schema).

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 tight sentences: return value and boundary first, then the use case, then the alternative and the mutation hand-off. No filler, and the most decision-relevant facts are front-loaded.

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 no output schema, the description carries the return semantics and does so adequately (LaTeX body, file, line range), and a read-only three-parameter tool needs little more. The only gap is failure/ambiguity behavior when a title is not found or matches multiple sections.

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 100%, and the schema already spells out case-insensitive matching with exact-then-unique-partial resolution. The description only adds the implied contrast that lookup defaults to the whole document unless a file narrows it, which is a modest gain over the existing schema text.

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?

States a specific verb and resource ("Returns the LaTeX of one section") plus the exact retrieval boundary ("up to the next heading of the same or higher level") and the lookup key (title, anywhere in the document). It is clearly distinguishable from read_file, get_outline, and grep named among the siblings.

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?

Gives both the use case and the alternative: read one section instead of the whole file, with get_outline named as the way to discover titles. It also closes the loop on mutation by directing the agent to copy text into edit_file, so there is no ambiguity about which tool performs the write.

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