Skip to main content
Glama

ocr_kie_xiaomi

Extract key information from document images into JSON, with optional field names to narrow the output schema.

Instructions

Extract key information from a document image as a JSON object. Pass 'fields' (list of names) to narrow the output schema.

Backend: xiaomi. Xiaomi-OCR-0 — local 0.8B document-parsing VLM (transformers; Apple Silicon MPS, CUDA or CPU). Best structure fidelity: Markdown output, HTML tables, LaTeX formulas, key-information extraction. Strong on Cyrillic, English, German and Japanese; Arabic/Korean are weak.

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": {
      "path": "<path>"
    },
    "name": "ocr_kie_xiaomi"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
fieldsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.2.2

TDQS

A3.6/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses that this is a local 0.8B VLM requiring transformers and MPS/CUDA/CPU, which implies resource and latency characteristics, and it flags language weaknesses (Arabic/Korean) that directly affect output quality. Gaps remain around error behavior, supported image formats, and how the result is structured beyond 'a JSON object'.

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?

Front-loaded with the action and the fields tip, followed by backend characteristics. The hardware note (Apple Silicon MPS, CUDA or CPU) is slightly verbose but operationally relevant for a local model; otherwise there is little waste.

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 a tool with no annotations and no output schema, the description covers purpose, model provenance, and language fitness, but omits the required 'path' parameter's meaning, accepted image formats, and any sense of the returned JSON structure. It is adequate but leaves real gaps an agent may hit on first invocation.

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 0%, so the description must compensate, and it partially does: 'fields' is explained as a list of names that narrows the output schema. The required 'path' parameter is never mentioned, so the agent gets no explanation of what path refers to (local file? URL?) or its format constraints.

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 and resource: 'Extract key information from a document image as a JSON object', which is distinct from text/layout/table/formula siblings through the key-information-extraction framing. However, it never names a sibling explicitly, and the mention of 'Markdown output, HTML tables, LaTeX formulas' overlaps with the table/formula/document siblings, so an agent must infer the boundary.

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?

The description gives useful selection hints (strong on Cyrillic/English/German/Japanese, weak on Arabic/Korean), which implicitly tells the agent when this backend is a good fit. It does not state when to prefer it over ocr_text_xiaomi or ocr_document_xiaomi, nor does it give prerequisites.

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