Skip to main content
Glama
jayluxferro

pdf-inspector-mcp

by jayluxferro

extract_text_with_positions

Extract text from PDFs with position, font, and style details to support layout-aware analysis and inspection.

Instructions

Extract text items with position, font, and style metadata.

Returns a list of TextItem objects each with: text, x, y, width, height, font, font_size, page, is_bold, is_italic, is_underline, is_strikeout, item_type.

Args: path: Absolute path to a PDF file on the local filesystem. data: Base64-encoded PDF bytes. pages: Optional list of 0-indexed page numbers to extract.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNo
pathNo
pagesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

With no annotations, the description carries the transparency burden. It discloses the return structure (TextItem fields) and parameter types, but does not address behavioral details such as error handling, mutual exclusivity of path/data, or read-only guarantees. This is adequate but not comprehensive.

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-structured: clear purpose, return type, and Args. Each sentence adds necessary information without redundancy.

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?

The description covers the main invocation requirements and output, but it leaves ambiguity about whether path and data are mutually exclusive or if at least one is required. This could cause incorrect invocation.

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?

The schema has zero descriptions, but the Args section fully explains each parameter: path (absolute path), data (Base64 bytes), pages (optional zero-indexed list). This compensates completely for the missing schema 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?

The description uses a specific action ('Extract text items') on a PDF resource, with explicit qualifiers ('with position, font, and style metadata') that differentiate it from sibling tools like extract_text. It clearly states the tool's scope and distinct value.

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 usage by highlighting the positional and style metadata, but it does not explicitly state when to use this tool instead of alternatives like extract_text or extract_text_in_regions. No exclusions or preferred contexts are provided.

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/jayluxferro/pdf-inspector-mcp'

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