Skip to main content
Glama
twoer

pdf-toolbox-mcp

by twoer

Tool Ocr Pdf

tool_ocr_pdf

Perform OCR on scanned PDFs and write a text layer back, turning image-only files into searchable PDFs. Skips pages that already have text and supports Chinese and English.

Instructions

对扫描件 OCR 并把文本层写回,产出可搜索 PDF(输出 _ocr.pdf)——本工具箱的核心差异化能力。

默认跳过已有文本层的页;默认语言 chi_sim+eng(缺语言包时自动降级并在结果中说明)。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
langNo
pathYes
deskewNo
outputNo
redo_ocrNo
overwriteNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.1.1

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It clearly states the output artifact and naming convention, the default behavior of skipping existing text layers, language defaults (chi_sim+eng), and language-pack fallback behavior. These are meaningful behavioral traits beyond the schema. It doesn't mention performance expectations, side effects on the original file, or what happens when OCR is impossible, but it discloses more than most.

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 concise and information-dense, with the primary purpose front-loaded in the first sentence and the key defaults and special behaviors in the second. Every sentence adds value, and there is no repetition of the tool name or schema details.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an OCR tool with a single required parameter (path), the description provides usable defaults and output expectations. But it omits the meaning and valid ranges of the optional parameters (e.g., what 'deskew' does, how 'output' interacts with the naming convention, what 'redo_ocr' affects), and there is no annotation layer to fill that gap. The output schema exists but is not shown here, so return-structure clarification would be needed for a fully confident invocation.

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?

Schema description coverage is 0%, so every parameter lacks schema doc. The description does not explain individual parameters, so the agent must infer the effect of 'lang', 'deskew', 'redo_ocr', 'overwrite', and 'output'. However, the description's behavioral details (e.g., 'redo_ocr' likely relates to re-OCRing pages with existing text layers, 'overwrite' likely controls whether an existing output file is replaced) provide some implicit context. Since the tool has 6 parameters and 0% schema coverage, the description does not fully compensate for the gap.

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 immediately identifies the tool's core function: OCR scanned PDFs and write the text layer back, producing a searchable PDF. It also specifies the output naming convention (<stem>_ocr.pdf), which is concrete and actionable. The claim that it is a core differentiating capability of the toolbox distinguishes it from sibling PDF tools.

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 explains the default behavior when to use this tool: it is for scanned documents and searchable PDF output. It also mentions when it will skip pages (those already having text layers), which helps the agent understand when the tool is still useful. However, it doesn't explicitly name sibling alternatives such as tool_extract_text or tool_is_searchable for non-OCR workflows, so the when-not-to-use guidance is only partially explicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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/twoer/pdf-toolbox-mcp'

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