Skip to main content
Glama

Inspect PDF Annotations

inspect_annotations
Read-onlyIdempotent

Extract and categorize annotations from a PDF, including links, highlights, comments, and form fields. Get a breakdown by subtype and page.

Instructions

Extract and categorize all annotations in a PDF document.

Args:

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

  • pages (string, optional): Page range. Format: "1-5", "3", or "1,3,5-7". Omit for all pages.

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

Returns: Total annotation count, breakdown by subtype (Link, Widget, Highlight, Text, etc.) and by page, flags for links/forms/markup presence, and individual annotation details.

Examples:

  • Check for form fields (Widget annotations)

  • Find all links in a document

  • Inventory markup annotations (highlights, comments)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYesAbsolute path to a local PDF file (e.g., "/path/to/document.pdf")
pagesNoPage range to process. Format: "1-5", "3", or "1,3,5-7". Omit for all pages.
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 already declare readOnlyHint=true, destructiveHint=false, idempotentHint=true. Description adds details on return structure (count, breakdown, flags, details) 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well-structured with clear sections (Args, Returns, Examples) but somewhat verbose; could be trimmed slightly while retaining all necessary information.

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 the lack of output schema, the description thoroughly explains the return value (count, breakdown, flags, details) and provides concrete examples covering key use cases.

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?

Parameters are fully described in the schema (100% coverage). The description repeats format but adds useful context via concrete examples, especially for pages and response_format.

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?

Clearly states 'Extract and categorize all annotations in a PDF document.' Verb and resource are specific, and the tool is well-differentiated from siblings like inspect_fonts or inspect_structure.

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?

Provides examples of use cases (check form fields, find links, inventory markup annotations) but does not explicitly state when to use this tool over alternatives or when not to use it.

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