Skip to main content
Glama

Count pages in several PDFs

pdf_count

Count pages in one or more PDFs, returning per-file page counts, totals, and how many files were readable. Unreadable files are listed separately without stopping the rest.

Instructions

Page count per file plus the total, for any number of PDFs, with how many were readable. A file that cannot be read is reported on its own row and the others still count. Read-only. Free and unlimited.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathsYesPaths to the PDF files

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.20.0

TDQS

B3.2/5.0
Behavior1/5

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

The description asserts 'Read-only', but the annotations declare readOnlyHint=false (and idempotentHint=false). A page count is inherently a safe, idempotent read, so the annotation flag contradicts the stated behavior and could mislead an agent about safety/idempotency. The otherwise useful failure semantics ('a file that cannot be read is reported on its own row') cannot rescue a direct contradiction with structured metadata.

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?

Three tight sentences, front-loaded with the primary output ('page count per file plus the total'), then error semantics, then cost. Every clause carries information; nothing is padding.

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?

With no output schema, the description compensates well by describing return values (per-file counts, total, readable count) and partial-failure behavior. The main gap is the contradiction with readOnlyHint rather than missing content, plus no note on path resolution or how unreadable files are surfaced.

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?

Only one parameter (paths) with 100% schema description coverage, so the schema fully documents it (array of file paths, minItems 1). The description corroborates multiplicity ('any number of PDFs') and implies an array, but adds no path syntax, glob, or ordering detail beyond the schema. Baseline 3 for full coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (count pages) and resource (PDFs), and even specifies the output shape: per-file count plus total plus readable count. It differentiates itself from single-file siblings like pdf_info and pdf_pages by emphasizing batch scope ('for any number of PDFs'), though it never names a sibling explicitly.

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

Usage Guidelines3/5

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

'For any number of PDFs' implies the batch use case, and the description hints this is free/unlimited so there's no reason to batch conservatively. But there is no explicit when-to-use vs. alternatives (pdf_info, pdf_pages) and no exclusions or prerequisites stated.

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

Deploy Server

Other Tools