Skip to main content
Glama

correct_ocr

Replace a stored capture's incorrect OCR transcription with corrected text, then re-run parsing, tag extraction, and connection detection so search uses the fixed version.

Instructions

Replace a stored capture's transcription with corrected text.

Use this when a capture's OCR came out wrong — for example a Tesseract
read of handwriting, or a transcription typo. The original OCR text is
preserved in the database; the corrected text becomes what search, tag
extraction, and connection detection use from now on.

Re-runs template parsing, tag extraction, and connection detection on the
corrected text.

Args:
    capture_id: The numeric capture ID (shown as #N in upload output and
                search results). Not the template ID.
    text:       The full corrected transcription of the page, including
                field labels and all schema tags.

Returns a summary of the re-parsed capture and rebuilt connections.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYes
capture_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv3.9.0

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations, the description carries full burden and delivers: it discloses that original OCR text is preserved (non-destructive), that corrected text becomes the new source for search/tag/connection logic, and that it re-runs parsing, tag extraction, and connection detection. This is rich behavioral context beyond a simple 'update'.

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 purpose, then when-to-use, then side effects, then parameter notes. Sentences are tight and each earns its place. Slightly long but justified by the parameter explanations and behavioral details. Could be marginally tighter but no waste.

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?

With an output schema present, return values needn't be detailed further. The description covers non-destructive behavior, downstream effects, re-processing, and both parameters thoroughly. An agent has everything needed to call this correctly.

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

Parameters5/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. It does: 'capture_id' is explained as the numeric capture ID (shown as #N in upload output and search results) and explicitly distinguished from the template ID; 'text' is described as the full corrected transcription including field labels and all schema tags. This adds meaning beyond the bare schema types.

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?

States a specific verb ('correct') and resource ('OCR transcription'), and immediately clarifies the scope: replacing stored transcription with corrected text. The verb is precise and distinguishable from siblings like rebuild_connections (which rebuilds rather than corrects). No ambiguity about what the tool does.

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?

Provides a concrete when-to-use scenario: 'when a capture's OCR came out wrong — for example a Tesseract read of handwriting, or a transcription typo.' This gives clear context. However, it doesn't explicitly state when NOT to use this tool or name alternatives (e.g., manual_capture vs. correction). Still, the scenario is specific enough for confident selection.

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