Skip to main content
Glama
japan-ai-tools

jp-ocr-date-fix

Repair Japanese dates in OCR text

jp_ocr_fix_dates
Read-onlyIdempotent

Repair OCR-mangled Japanese dates by correcting look-alike characters and validating fixes against the calendar and era ranges. Returns repaired text and change details for scanned invoices and forms.

Instructions

Find Japanese dates in OCR output (e.g. '今和6年3月15曰', '2O24年l月5日') and repair OCR look-alike characters. A fix is applied only when the repaired date exists on the calendar and inside the era (令和/平成/昭和/大正/明治). Returns the repaired text, every change with its ISO date, and flags for spans that look like dates but cannot be confirmed. Use it before extracting dates from scanned Japanese invoices, forms or PDFs. OCRで崩れた和暦・日付を暦で確かめて直す。

Input Schema

NameRequiredDescriptionDefault
textYesOCR text (Japanese)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior5/5

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

Beyond the annotations, the description discloses important behavior: repairs are applied only when the date is calendar-valid and within the era, and the tool returns repaired text, each change with ISO date, and flags for unconfirmed date-like spans. This gives the agent much more than the readOnly/idempotent safety profile.

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?

The definition is front-loaded and appropriately sized for a specialized OCR repair tool. The final Japanese sentence largely restates the English description, which is a minor redundancy, but the overall structure remains efficient.

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?

Given that there is no output schema, the description compensates by explaining the return payload: repaired text, per-change ISO dates, and flags for uncertain spans. It also covers the key validation rule, making the definition complete enough for correct 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?

There is only one parameter and schema description coverage is 100%, so the schema already documents the input adequately. The description's examples clarify the kind of OCR text expected, but they do not add parameter-level semantics beyond what the schema provides.

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 description states a specific verb and resource: finding and repairing Japanese dates in OCR text, with concrete corrupted examples. It is clear what the tool does, but it does not explicitly differentiate itself from the sibling jp_ocr_check_date, so it falls short of a 5.

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?

It gives a clear usage context: use before extracting dates from scanned Japanese invoices, forms, or PDFs. However, it does not explicitly state when to use jp_ocr_check_date instead, so the alternative-routing guidance expected for a 5 is missing.

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

Deploy Server

Other Tools