Skip to main content
Glama

ocr_layout_xiaomi

Extract text and document layout locally with Xiaomi OCR, returning content blocks with bounding boxes, Markdown, HTML tables, and LaTeX formulas.

Instructions

Extract text with layout analysis. Returns blocks with bounding boxes.

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_layout_xiaomi"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes

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 behavioral burden and does reasonably well: it discloses the output format (Markdown, HTML tables, LaTeX), the local-model/hardware footprint, and even language strengths and weaknesses. Gaps remain around runtime cost for a local 0.8B VLM, input format limits, and failure behavior.

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 return shape, then backend and capability detail. Dense but nearly every clause contributes; the hardware parenthetical is marginally less essential than the rest.

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?

For a one-parameter tool with no output schema, the description covers return format, capability profile, and language coverage, which is what an agent needs to pick and call it. The only real omission is the meaning of 'path', which is captured in the parameter dimension.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% for the single required 'path' parameter, and the description says nothing about what path should point to (local file? image or PDF? supported formats). The one parameter the agent must supply is left entirely unexplained.

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?

The first sentence gives a specific verb and resource ('Extract text with layout analysis') plus the return shape ('blocks with bounding boxes'), which distinguishes it from the plain text and table siblings. It never names a sibling outright, so the differentiation is inferred rather than stated.

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 'layout analysis' and 'best structure fidelity', which signals this is the choice when layout/structure matters, but there is no explicit when-to-use or when-not guidance against ocr_layout_paddle/ocr_layout_vision or ocr_document_xiaomi. The agent must infer routing from the backend blurb.

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