Skip to main content
Glama

pdf_page_count

Count the pages in a PDF and answer how many pages a document has. Reads only the page tree to avoid processing text or metadata, so large files stay cheap to check.

Instructions

Count the pages in a PDF. Answers "how many pages is this?".

Reads only the document's page tree, so it stays cheap on large files. It does not read page text, page sizes, or document properties.

Args: ref: PDF file path, or a workspace artifact id.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses the internal mechanism (reads only the page tree), the resulting cost profile (cheap on large files), and explicit exclusions (no text, sizes, or document properties). It doesn't cover failure modes such as encrypted or unreadable PDFs.

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?

Front-loaded with the core action, followed by a short rationale sentence and a compact Args block. Every sentence earns its place with no padding.

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 single-parameter read tool with an output schema, this definition covers purpose, cost profile, scope exclusions, and parameter meaning. Nothing further is needed to invoke it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate, and it does by clarifying that 'ref' accepts either a filesystem path or a workspace artifact id — meaningful added semantics beyond the bare string in the schema. Field format details and examples are still absent.

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 (count) and resource (pages in a PDF), with the user-facing question it answers. It is unambiguous against siblings like pdf_metadata or pdf_render_pages, which operate on the same resource but deliver different 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?

Gives clear usage context ('how many pages is this?') and a cost-based rationale for choosing it on large files. It does not explicitly name alternatives (e.g. pdf_metadata) or state when-not to use it, but the intended scenario is easy to infer.

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