Skip to main content
Glama
pdf4me
by pdf4me

convert_ocr_pdf

Convert scanned PDFs into searchable, editable documents using OCR. Choose quality, language, and skip OCR when text is already digital.

Instructions

Convert a PDF to a searchable, editable PDF using the PDF4me ConvertOcrPdf API (OCR). Provide the local path to the input PDF, quality (Draft or High), ocr_when_needed, and language (e.g. eng). The API request body only includes docContent, docName, qualityType, ocrWhenNeeded, and language. If the API returns 202, the tool polls the Location URL until the PDF is ready. Optional output directory and output file name.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
languageNoOCR language code (e.g. eng). Empty defaults to eng.eng
file_pathYesLocal path to the PDF to process.
output_dirNo
quality_typeNoDraft or High.Draft
ocr_when_neededNoWhen true, skip OCR if text is already searchable (sent as "true"/"false").
output_file_nameNo
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses key behaviors: the API request body composition, and that a 202 response triggers polling of the Location URL until the PDF is ready. However, it does not mention error handling, whether the original file is preserved, or authentication requirements, leaving some transparency gaps.

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?

The description is multi-sentence but each sentence contributes useful information: purpose, parameters, API details, and polling behavior. It is front-loaded with the main purpose and remains appropriately sized for the tool's complexity.

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?

The description covers purpose, parameters, API behavior, and polling, but lacks details on return values (no output schema) and default behavior for output file naming/directory when not provided. Given the tool's complexity (6 params, no annotations, no output schema), it is adequate but not fully complete.

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 67%, covering language, file_path, quality_type, and ocr_when_needed. The description adds 'local path' to file_path and identifies the optional output directory/file name, but provides no further detail on their behavior or defaults. It also maps parameters to API fields, adding some meaning beyond the schema, but not fully compensating for the missing output_dir/output_file_name docs.

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 converts a PDF to a searchable, editable PDF using OCR, which distinguishes it from sibling conversion tools like convert_to_pdf or convert_pdf_to_word. The verb 'convert' and specific resource (PDF via OCR) make the purpose unambiguous.

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 implies usage for PDFs that need OCR to become searchable/editable, but it does not explicitly mention alternatives or when not to use it. It provides clear context for its intended use case, though no exclusions are stated.

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/pdf4me/pdf4me-mcp'

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