Skip to main content
Glama

Inspect PDF

pdf_inspect

Reads a PDF's header to return page count, byte size, encryption status, producer, and SHA-256 hash without extracting document content. Use it to inspect metadata and verify files quickly.

Instructions

Read a PDF header: page count, byte size, encryption flag, producer, sha256. No content is returned.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>"
    },
    "name": "pdf_inspect"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesabsolute path to the PDF

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.4

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full burden. It does disclose the important behavior that only metadata is returned and no document content is exposed, and 'Read' signals a non-mutating operation. However, it says nothing about failure modes: missing file, corrupted file, or whether password-protected/encrypted PDFs can be inspected at all (the encryption flag hints they can, but this is not stated).

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?

Two short sentences, front-loaded with the action and followed immediately by the field list. Every clause earns its place, though the enumeration plus disclaimer could be tightened slightly.

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 single-parameter read tool with no annotations and no output schema, the description usefully enumerates the returned fields rather than leaving the agent to guess. Only error and encrypted-file behavior is missing, a minor gap at this complexity level.

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 (path) exists and its schema description ('absolute path to the PDF') is fully documented at 100% coverage. The description adds nothing about the path argument, so the schema baseline of 3 applies.

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 ('Read a PDF header') and enumerates exactly what is returned: page count, byte size, encryption flag, producer, sha256. The closing 'No content is returned' implicitly separates it from content-oriented siblings such as pdf_extract_text and pdf_ocr.

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?

There is no explicit when-to-use or when-not-to-use statement, and no sibling is named as an alternative. The 'No content is returned' line does imply the agent should reach for a different tool when actual text is needed, so guidance is present but only implied.

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