Skip to main content
Glama

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

TableJSON Schema
NameRequiredDescriptionDefault
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?

Annotations are all false, so the description must disclose behavior. It does: 'Compile the project' indicates non-read-only action, and 'Requires TYPLEAF_SESSION' states an authentication requirement. It also explains the method for each engine. This adds valuable context beyond annotations. It could be more explicit about side effects, but the compilation action is clearly implied.

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

Conciseness5/5

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

The description is two sentences with no filler. The primary purpose is front-loaded, followed by usage guidance and engine-specific behavior. Every sentence earns its place, and it is compact yet complete.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with a single parameter, a fully descriptive schema, and clear behavioral notes, the description covers purpose, usage, and method. It states it reports a total page count, so the return value is implied. No significant information needed for correct invocation is missing.

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 description covers 100% of the parameter and provides detailed guidance on what project_id is and when to use it, including avoiding local paths and preferring list_projects. The tool description adds nothing about the parameter itself, so the baseline of 3 is appropriate.

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 states a specific verb and resource: 'Compile the project and report the TOTAL number of pages in the PDF.' It clearly distinguishes the tool from siblings like get_sections or section_page_map by focusing on page count. The intended use cases are explicitly named, leaving no doubt about what the tool does.

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 provides clear use cases: answering 'how many pages is it?' or driving a fill-exactly-N-pages editing loop. It also notes engine-specific behavior (LaTeX vs. Typst). However, it does not mention when not to use this tool or point to alternatives (e.g., local file tools), though the parameter schema covers those exclusions. Still, the description itself gives sufficient context for correct selection.

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