Skip to main content
Glama
marc-hanheide

PDF Redaction MCP Server

search_text_in_pdf

Search a loaded PDF document for specific text or regex patterns and get all occurrences with their page locations. Works only after loading a document with load_pdf.

Instructions

Search for text in a loaded PDF document and return all occurrences with their locations.

The document must be loaded first using load_pdf.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
use_regexNoWhether to treat search_string as a regex pattern
document_idYesIdentifier of the loaded document
page_numberNoSpecific page to search (0-indexed). If None, searches all pages
search_stringYesText or regex pattern to search for
case_sensitiveNoWhether search should be case sensitive

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses that the tool searches for text and returns locations, and notes the dependency on a prior load_pdf call. This goes beyond the schema by explaining the output content and a state requirement, though it could explicitly state non-destructive behavior.

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 sentences, front-loaded with the core action, and every sentence adds value. No wasted words.

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?

Given the presence of an output schema and full parameter descriptions, the description only needs to cover the tool's main behavior and prerequisites. It does that effectively, making the tool usable without missing critical context. A small gap is the lack of error-handling behavior (e.g., invalid document_id), but that is not essential.

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 coverage is 100%, with each parameter having a description. The tool description does not add parameter-specific meanings beyond what is already in the schema. According to the rubric, a baseline of 3 is appropriate when the schema provides full coverage.

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 with a specific verb ('Search') and resource ('loaded PDF document'), and specifies the output ('all occurrences with their locations'). This distinguishes it from sibling tools like extract_text_from_pdf or redact_text_by_search.

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 provides a clear prerequisite: 'The document must be loaded first using load_pdf.' This gives context on when the tool can be used. It does not explicitly mention alternatives or when not to use it, but the purpose is unambiguous enough that no exclusions are necessary.

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