Skip to main content
Glama

ocr_directory

Scan a directory and OCR all images in one step, eliminating the need to manually list files. Configure extensions, recursion, and confidence threshold for tailored extraction.

Instructions

批量 OCR 目录下所有图片。

节省 token 场景:无需先列出目录再构建文件列表,一步完成 目录扫描 + 批量 OCR。适合整本扫描版教辅的批量提取。

参数: directory_path: 目录绝对路径 extensions: 逗号分隔的扩展名(不含点),默认 png,jpg,jpeg,bmp,webp recursive: 是否递归子目录,默认 False is_handwritten: 是否手写笔记,默认 False confidence_threshold: 置信度阈值,默认 0.85

返回: 按文件名排序的识别结果,紧凑格式(总数 + 文件名 + 文本)。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
recursiveNo
extensionsNopng,jpg,jpeg,bmp,webp
directory_pathYes
is_handwrittenNo
confidence_thresholdNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

With no annotations, the description partially covers behavior: it mentions sorting by filename, compact format, and parameter defaults. However, it does not disclose side effects (e.g., file modification), error handling, or performance characteristics for large directories.

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 well-structured: a one-line summary, a brief use-case note, and a clean parameter list. Every sentence adds value, no redundant 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 5 parameters, 1 required, and an output schema, the description covers purpose, parameters, and return format (sorted, compact). It lacks details on permissions, file size limits, or error scenarios, but is adequate for a typical agent.

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 coverage is 0%, but the description fully explains all 5 parameters: directory_path, extensions with default, recursive, is_handwritten (handwritten notes), and confidence_threshold. This adds clear meaning beyond the schema's type/default fields.

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 verb and resource: '批量 OCR 目录下所有图片' (batch OCR all images in a directory). It highlights the one-step nature (directory scan + batch OCR) and distinguishes from siblings like ocr_batch and ocr_image_base64 by focusing on directory-level input.

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 suggests a use case: saving tokens by avoiding separate directory listing, and indicates suitability for batch extraction from scanned books. However, it does not explicitly compare with sibling tools or state when not to use.

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