Skip to main content
Glama

ocr_formula_xiaomi

Extract mathematical formulas from images and return them as LaTeX for equations, documents, or notes.

Instructions

Extract mathematical formulas from an image. Returns LaTeX.

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

Input Schema

NameRequiredDescriptionDefault
pathYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.2.2

TDQS

A3.5/5.0
Behavior3/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 add real context: local transformers inference on MPS/CUDA/CPU, a 0.8B model, and the LaTeX return. It omits operational behavior such as accepted image formats, failure modes for unreadable images, and latency/cost implications of local inference.

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 purpose sentence followed by a compact backend profile; both parts are informative. A few model-capability details (HTML tables, key-information extraction) are irrelevant to a formula-extraction tool and could be trimmed.

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 single-parameter tool the description covers purpose and return format, which is enough for correct invocation in broad strokes. The key gap is the meaning/constraints of the only parameter, which is unaddressed anywhere in the structured data.

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?

There is one parameter, 'path', with 0% schema description coverage, and the description never clarifies whether it is a local filesystem path or a URL, nor what image types or sizes are acceptable. The phrase 'from an image' only weakly implies the input is an image file.

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?

Specific verb and resource ('Extract mathematical formulas from an image') plus the output format ('Returns LaTeX'), which cleanly separates it from the text, table, layout, KIE and document siblings in the xiaomi family.

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?

No explicit when-to-use/when-not-to-use statement relative to alternatives like ocr_text_xiaomi or the paddle/vision variants. The backend note (local 0.8B VLM, strong Cyrillic/English/German/Japanese, weak Arabic/Korean) implicitly helps an agent pick among backends, but the agent must infer that itself.

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