Skip to main content
Glama

DeepSeek OCR

deepseek_ocr

Extract text from PDF, Word, PowerPoint, and image files sent as base64, returning page-by-page OCR results without storing the files.

Instructions

识别 PDF、Word、PowerPoint 文档或图片中的文字,按页返回识别结果。文件通过 base64 传入,不会存入 Files API。

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "fileBase64": "<fileBase64>",
      "fileName": "<fileName>"
    },
    "name": "deepseek_ocr"
  }
}

Input Schema

NameRequiredDescriptionDefault
purposeNotext_recognition:不含图片的 Word、PowerPoint 直接提取文字,其他文件逐页识别;rich_layout_recognition:所有文件都逐页识别。text_recognition
fileNameYes文件名,需保留扩展名,用于判断文件类型,例如 document.pdf、scan.png。
fileBase64Yes待识别文件的 base64 编码,支持 data URL 前缀。

Output Schema

NameRequiredDescriptionDefault
idYes本次识别的 ID
pagesYes逐页识别结果
purposeYes请求中的 purpose
page_countYes页数

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations at all, the description carries the full disclosure burden. It usefully adds two behavioral facts not present in structured fields: results come back page by page, and the file is sent as base64 and is NOT persisted to the Files API (a meaningful retention/privacy guarantee). It omits size limits, supported image formats, language coverage, and what happens on partially-scanned pages — all relevant for a base64 payload that could be very large.

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?

Two short sentences, each earning its place: first sentence = capability + accepted types + return granularity, second = transport and retention. Front-loaded with the capability and free of filler.

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?

An output schema exists, so return-value explanation is unnecessary, and all three parameters are fully described in the schema. What remains thin is operational context for a base64-based tool — maximum file size/encoding expectations and the practical effect of the purpose modes. Nearly complete, but an agent could still get burned by an oversized payload.

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%, so required params, the fileName extension rule, and the purpose enum are already fully documented in the schema; baseline 3 applies. The description does reinforce the base64 transport (including that no Files API upload is needed), which slightly aids the agent in constructing fileBase64, but it adds nothing about the purpose enum's trade-off.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (识别/OCR) plus the concrete resource set (PDF、Word、PowerPoint 文档或图片) and the output shape (按页返回识别结果). The resource named makes it clearly distinct from the sibling audio/web tools, but the description never explicitly differentiates itself from them or from the two recognition modes the tool actually supports.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied by the modality (documents/images → OCR), which is enough to rule out deepseek_asr/tts/web_search by subject matter. However there is no explicit when-to-use or when-not-to-use guidance, and nothing tells the agent when to prefer rich_layout_recognition over the default — that choice is left entirely to the schema.

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