get_page_count
Compile a Typleaf project and return the total PDF page count, enabling exact page-fill edits and answering page-number queries for both LaTeX and Typst.
Instructions
Compile the project and report the TOTAL number of pages in the PDF. Use this to answer 'how many pages is it?' or to drive a fill-exactly-N-pages editing loop. For LaTeX the count is read from the log; for Typst it is measured from the PDF, since typst prints no page count anywhere. Requires TYPLEAF_SESSION.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| 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. |