Skip to main content
Glama
marc-hanheide

PDF Redaction MCP Server

extract_text_from_pdf

Extract text from a previously loaded PDF, choosing plain text, JSON, or blocks output, with optional page selection.

Instructions

Extract text from a loaded PDF document.

The document must be loaded first using load_pdf.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formatNoOutput format - "text" (plain text), "json" (structured), or "blocks" (text blocks)text
document_idYesIdentifier of the loaded document
page_numberNoSpecific page number to extract (0-indexed). If None, extracts all pages

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

No annotations are provided, so the description must carry the full burden of behavioral disclosure. It does disclose a key prerequisite (the document must be loaded), but it does not explicitly state that this is a read-only operation, nor does it describe behavior on invalid document IDs or large documents. The prerequisite is valuable, but more behavioral context would be expected given the lack of annotations.

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 two short sentences that are front-loaded with the core action and followed by the key prerequisite. Every sentence earns its place, making it highly concise and easy to scan.

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 essential prerequisite and the schema fully documents all parameters. An output schema exists, so return values do not require explanation. However, the description does not mention alternative tools or potential error conditions, leaving some contextual gaps for an agent choosing the right tool.

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?

Schema description coverage is 100%, with all three parameters (format, document_id, page_number) having clear descriptions. The tool description adds no parameter-specific information beyond the schema, so it meets the baseline expectation but does not exceed it.

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's function: 'Extract text from a loaded PDF document.' It uses a specific verb and resource, and the prerequisite of a loaded document adds precision. This distinguishes it from sibling tools like load_pdf, search_text_in_pdf, and redact_by_coordinates, which have different purposes.

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?

The description explicitly states a necessary precondition: 'The document must be loaded first using load_pdf.' This gives clear sequential usage context. However, it does not discuss when to prefer this tool over alternatives like search_text_in_pdf or get_pdf_info, so it falls short of a full usage guideline.

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/marc-hanheide/pdf-redaction-mcp'

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