Skip to main content
Glama

ocr_pdf_page

Extract text from a specified PDF page using local OCR, bypassing multi-step conversion workflows. Supports scanned and handwritten documents.

Instructions

OCR 提取 PDF 指定页文本。

节省 token 场景:绕过 PDF→截图→存文件→OCR 的多步工作流, 一步到位。对常见的高考真题 PDF、扫描版教辅尤为高效。

参数: pdf_path: PDF 文件绝对路径 page_number: 页码(1-based,默认第 1 页) is_handwritten: 是否手写笔记,默认 False dpi: 渲染分辨率,默认 200(OCR 精度与速度的平衡点) confidence_threshold: 置信度阈值,默认 0.85

返回: 识别文本或错误信息

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dpiNo
pdf_pathYes
page_numberNo
is_handwrittenNo
confidence_thresholdNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

No annotations provided, so description carries full burden. Describes core behavior, parameters affecting output (e.g., is_handwritten, confidence_threshold), and return type (text or error). Lacks mention of limitations like file size or language support, but sufficient for basic usage.

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?

Well-structured with a concise purpose statement, usage scenario, parameter list, and return info. Every sentence adds value; no redundancy.

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

Completeness5/5

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

Given 5 parameters (1 required), no annotations, and expected output, the description fully covers parameter semantics, usage context, and return values. No obvious gaps for a tool of this complexity.

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?

Schema description coverage is 0%, but description thoroughly explains each parameter: pdf_path, page_number, is_handwritten, dpi, and confidence_threshold, including defaults and rationale for dpi as a balance between accuracy and speed. Adds significant value beyond schema.

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?

Clearly states the tool's function: OCR extraction of text from a specified PDF page. Distinguishes from sibling tools by emphasizing direct PDF page OCR versus other OCR methods like image-based or batch processing.

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?

Provides explicit scenarios where the tool is beneficial (saving tokens by bypassing multi-step workflow, especially for exam PDFs and scanned textbooks). Does not specify when not to use, but context is clear.

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/QinLuza/Umi-OCR-MCP'

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