Skip to main content
Glama

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

TableJSON Schema
NameRequiredDescriptionDefault
fileNoProject-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_idYesTypleaf 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.
Behavior4/5

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

With all annotations set to false (not read-only, not idempotent, not destructive), the description carries the full burden of behavioral disclosure. It reveals that compilation is triggered ('Compile once'), exposes a race condition ('can race the server's build eviction'), notes format-specific request counts, and requires a session ('Requires TYPLEAF_SESSION'). This is substantive context beyond the annotations, earning a 4.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core purpose, then usage, then cost/behavioral caveats. It is longer than average but each sentence adds value (format differences, race warning, session requirement). No filler. The structure flows logically from what → when → watch out, which earns a 4.

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?

Given there is no output schema, the description adequately summarizes the output (headings mapped to pages, page count, last-page fullness) and notes that fullness figures are LaTeX-only. It covers format differences, performance implications, and prerequisites. While it doesn't detail the exact structure of the map, it provides enough for an agent to anticipate the result shape and call it correctly.

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?

The schema already provides 100% description coverage for both parameters, including type, examples, and guidance for the project_id (remote vs. local, when to use). The description adds minor context like 'Omit file to use the compile root' (already in schema) and cost differences, but it does not add meaningfully to the parameters themselves. Baseline 3 is appropriate when schema does the heavy lifting.

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?

The description clearly states the tool maps every heading to the PDF page it starts on, plus total page count and last-page fullness. This is a specific verb+resource with a concrete output. It distinguishes itself from siblings like get_sections (which lists sections) and get_page_count (which just gives count) by specifying the mapping and positional nature of the output.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly gives usage contexts: 'ideal for judging how content is distributed across pages and for a fill-exactly-N-pages workflow.' It also warns about cost differences between LaTeX and Typst and mentions a race condition risk, giving the agent criteria to decide whether to call it. However, it does not explicitly name alternatives or conditions to prefer another tool, so it lacks direct when-not guidance.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/superzeldalink/typleaf-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server