qr_repair
Recover text and a clean image from damaged QR codes caused by glare, blur, low resolution, or partial occlusion; also verifies a suspected payload hint with a score. Supports versions 1–4.
Instructions
Recover a damaged QR code (glare, blur, low resolution, partial occlusion). Fits the module grid from the finder patterns, decodes format information via BCH, then applies Reed-Solomon erasure/Chase correction. Returns the recovered text, a verification score and a rebuilt clean QR image. Supports QR versions 1-4; larger versions are reported as unsupported. hint= accepts a suspected full text to verify against the damaged modules.
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": {
"image": "<image>"
},
"name": "qr_repair"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ec | No | Force error-correction level | |
| hint | No | Suspected complete payload; verified by regenerating the QR | |
| mask | No | Force mask 0-7 | |
| image | Yes | Local path, base64, data URI or http(s) URL | |
| version | No | Force QR version 1-4, or auto-detect | |
| save_clean | No | Write the rebuilt QR PNG to the output directory | |
| max_attempts | No | Cap on Reed-Solomon attempts |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||