get_sections
Extract heading structure from Typst or LaTeX files, returning types, titles, hierarchy levels, and previews to analyze document organization.
Instructions
Parse a source file and extract its heading structure. Typst (.typ) and LaTeX (.tex) are both supported; the parser is chosen from the file extension. For Typst this reports =-markup headings (the same ones the Typleaf editor's outline pane shows) as heading1..headingN; for LaTeX, \section/\subsection/etc. Returns types, titles, hierarchy levels, and content previews.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | Path to the source file. Typst (.typ) and LaTeX (.tex) are both supported; the parser is chosen from the file extension. | |
| 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. |