Skip to main content
Glama

Find which PDF page each \label lands on

label_pages
Read-only

Reads the latest compile’s .aux file to return each label’s number and PDF page, plus total page count, enabling page-limit checks and figure-reference placement checks. Run compile first.

Instructions

Reads the .aux file of the most recent compile and returns, for every \label, its number (e.g. section or table number) and the PDF page it lands on, plus the total page count. Useful for page-limit checks ('does the Conclusion end on page 8?') and for checking that figures sit near their first reference. Call compile first.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "label_pages"
  }
}

Input Schema

NameRequiredDescriptionDefault
project_idNoOverleaf project id from list_projects or open_project. Opens the project if it is not already active. Pass it on every call when MCP sessions may change between calls. Writes without it only go to the project last confirmed by open_project or by a write naming it.
label_prefixNoOnly labels starting with this, e.g. 'sec:' or 'tab:'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.4.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=true, so the description carries real weight and does: it discloses the data source (the most recent compile's `.aux`), the ordering dependency on `compile`, and the shape of what comes back (per-label number, page, total pages). It does not say what happens when no `.aux` exists or after an out-of-date compile, which keeps it from a 5.

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?

Three tight sentences, front-loaded with the mechanism before the motivations, and every clause carries information. Slightly denser than needed with two separate use-case parentheticals, but no filler.

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?

For a read-only, two-parameter tool with no output schema, the description adequately conveys the return values, the compile dependency, and the intended purposes. The remaining gap is unspecified edge behavior (stale or missing `.aux`) and the unmentioned `label_prefix` semantics.

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?

Schema coverage is 100%, so `project_id` and `label_prefix` are already documented in the schema; the description adds nothing about either, including the prefix-filtering behavior. Baseline 3 applies when the schema does all the work.

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?

States a specific verb and resource: reads the `.aux` file of the most recent `compile` and returns each \label's number and PDF page plus total page count. This is clearly distinguishable from generic file readers like `read_file` and from `compile` itself.

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?

Gives concrete use cases (page-limit checks, verifying figures sit near their first reference) and an explicit prerequisite: call `compile` first. It stops short of stating when not to use it or naming an alternative for raw `.aux` inspection, so it falls just below the top mark.

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