Skip to main content
Glama

get_pdf_page_count

Count the total number of pages in a PDF document to verify document length or prepare for processing tasks.

Instructions

Get the total number of pages in a PDF file

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filePathYesAbsolute path to the PDF file
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool's function but lacks details on error handling (e.g., what happens with invalid file paths or non-PDF files), performance (e.g., speed for large files), or output format (e.g., integer vs. structured response). This leaves significant gaps in understanding how the tool behaves beyond its basic purpose.

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 a single, clear sentence that front-loads the core purpose without unnecessary words. It efficiently conveys the tool's function ('Get the total number of pages in a PDF file') in a way that's easy to parse, with zero wasted information or structural issues.

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

Completeness3/5

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

For a simple tool with one parameter and no output schema, the description covers the basic purpose but lacks completeness. It doesn't explain the return value (e.g., integer count), error cases, or dependencies. While annotations are absent, the description could better address behavioral aspects to compensate, making it minimally adequate but with clear gaps in context.

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 input schema has 100% description coverage, with 'filePath' clearly documented as an 'Absolute path to the PDF file'. The description adds no additional parameter semantics beyond what the schema provides, such as file format requirements or path examples. Given the high schema coverage, a baseline score of 3 is appropriate, as the schema adequately handles parameter documentation.

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 specific action ('Get') and resource ('total number of pages in a PDF file'), making the purpose immediately understandable. It distinguishes this tool from siblings like 'extract_pdf_image', 'get_pdf_metadata', or 'read_pdf' by focusing exclusively on page counting rather than extraction, metadata retrieval, or content reading.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. While it implies usage for PDF files, it doesn't specify scenarios where page count is needed over other operations (e.g., using 'get_pdf_metadata' for broader info or 'read_pdf' for content). No exclusions or prerequisites are mentioned, leaving usage context vague.

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/rturv/mcp-pdf-reader'

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