Skip to main content
Glama

Inspect PDF Structure

inspect_structure
Read-onlyIdempotent

Examine PDF internal structure: catalog entries, page tree, object statistics, and encryption status. Specify output format as markdown or JSON.

Instructions

Examine PDF internal object structure including catalog entries, page tree, and object statistics.

Args:

  • file_path (string): Absolute path to a local PDF file

  • response_format ('markdown' | 'json'): Output format (default: 'markdown')

Returns: Catalog entries (keys and types), page tree info (page count, MediaBox samples), object statistics (total count, stream count, type distribution), and encryption status.

Examples:

  • Examine document catalog for structural features

  • Count PDF objects and streams

  • Check page dimensions across the document

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYesAbsolute path to a local PDF file (e.g., "/path/to/document.pdf")
response_formatNoOutput format: "markdown" for human-readable, "json" for structured datamarkdown
Behavior4/5

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

Annotations (readOnlyHint, destructiveHint, idempotentHint) indicate safe, idempotent behavior. The description adds specifics about returned data (catalog entries, object statistics, encryption status) and parameters, providing value beyond annotations without contradiction.

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 well-organized into Args, Returns, and Examples sections, concise without extraneous text. Front-loaded purpose sentence efficiently conveys the tool's function.

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?

Given rich annotations and full schema coverage, the description explains return values clearly (catalog entries, page tree, object stats, encryption). No output schema exists, so the description adequately fills that gap for the tool's moderate complexity.

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?

Input schema has 100% description coverage, already detailing both parameters (file_path, response_format) with defaults and examples. The description reiterates this information with minor elaboration (e.g., example paths), but adds little new meaning.

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 tool examines PDF internal object structure, listing specific outputs like catalog entries, page tree, and object statistics. It distinguishes itself from more specialized siblings (e.g., inspect_fonts, inspect_annotations) by offering a broad structural overview.

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?

The description implies use for general structure inspection but does not explicitly indicate when to choose this tool over siblings like compare_structure or get_page_count. No exclusions or alternatives are mentioned, leaving the agent to infer context.

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

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