get_section_content
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
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | Project-relative path using forward slashes | |
| projectId | Yes | Overleaf project ID | |
| sectionId | Yes | ||
| followIncludes | No | Follow \input, \include, \subfile, and \import directives from filePath down, as get_full_document does; defaults to false, one file only |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | ||
| section | Yes | ||
| revision | Yes |