section_page_map
Map every heading to its starting PDF page, get total page count and last-page fullness to judge content distribution and plan exact page fills.
Instructions
Compile once, then map EVERY heading to the PDF page it starts on, plus the total page count and how full the last page is. This is the 'perceive the position of each element on the page' overview — ideal for judging how content is distributed across pages and for a fill-exactly-N-pages workflow. Omit file to use the compile root.
Cost differs by format: a LaTeX project resolves every heading from one offline SyncTeX parse, while a Typst project needs one request PER heading (Typleaf keeps its sync map inside the build directory, so there is nothing to download) — slow on a long document, and it can race the server's build eviction. The text-area fullness figures are LaTeX-only; Typst reports no page geometry. Requires TYPLEAF_SESSION.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | Project-relative path of the root document (e.g. 'main.typ'). Omit to auto-detect it. Pass it explicitly if the project has several candidate roots and none is named main.typ / main.tex. | |
| project_id | Yes | Typleaf project ID — a 24-character lowercase hex string (e.g. '692a83fb82feceb233c4b0e7'), obtained from list_projects or the project URL. NOT a local filesystem path, NOT '.', NOT a project name or title. These tools operate on the REMOTE Typleaf project. Only call these tools when the user explicitly asks to work with a Typleaf project — never for general local file I/O. If you already have a copy of THIS project checked out on the local filesystem, prefer the standard read/grep tools against that path. Always call list_projects first when unsure. |