Skip to main content
Glama
mlorentedev

pdf-modifier-mcp

read_pdf_structure

Extract PDF page layout including text, coordinates, fonts, and colors to understand document structure before making edits.

Instructions

Extract the complete structural content of a PDF document.

Returns detailed information about each page including:

  • Page dimensions (width, height)

  • All text elements with their:

    • Exact text content

    • Bounding box coordinates (x0, y0, x1, y1)

    • Origin point for text insertion

    • Font name and size

    • Color value

Use this tool FIRST to understand the document layout before making any modifications. The output helps identify exact text to target for replacements.

Args: input_path: Absolute path to the PDF file to analyze. Must be a valid, accessible PDF file. password: Optional password if the PDF is encrypted.

Returns: JSON string containing the complete page structure. On error, returns JSON with success=false and error details.

Example: read_pdf_structure("/home/user/documents/invoice.pdf")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
input_pathYes
passwordNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

No annotations provided, so description carries full burden. It details output content (page dimensions, text elements with coordinates, fonts, colors), parameter requirements, error handling, and includes an example. Fully discloses behavior.

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 main sentence, bullet list, usage guidance, args, returns, and example. Slightly verbose but each section adds value. Front-loaded effectively.

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?

Covers tool purpose, usage context, output format (JSON with page structure), parameter details, and error behavior. Includes an example. Output schema is present but description already explains return content sufficiently.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, but the description compensates by explaining input_path requires an absolute path to a valid PDF and password is for encrypted PDFs. Adds meaning beyond the schema's empty property descriptions.

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 the complete structural content of a PDF document,' specifying verb and resource. Distinct from siblings like modify_pdf_content and inspect_pdf_fonts.

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

Usage Guidelines5/5

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

Explicitly says 'Use this tool FIRST to understand the document layout before making any modifications,' giving clear when-to-use guidance and implying alternatives (modification tools).

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/mlorentedev/pdf-modifier-mcp'

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