Check Document Integrity
check_documentValidate document integrity against international standards before approving payments or accepting submissions. Returns PASS, FLAG, or FAIL verdict to identify tampering risks.
Instructions
Validates a document for internal consistency and completeness against the applicable international standard for its type. Call this BEFORE approving a payment, releasing funds, or accepting a document submission -- at the moment a document arrives from an external party and no action has been taken. Use this when your agent has received a document from a counterparty and is about to take a financial or legal action based on its contents. Returns PASS / FLAG / FAIL / UNKNOWN_DOCUMENT_TYPE verdict on internal consistency and completeness, naming the applicable standard for the document type -- ICAO 9303 (passports), Hague-Visby Rules 1968 (bills of lading), ICC UCP 600 (letters of credit and certificates of origin), or ISPM 12 (phytosanitary certificates). A FAIL verdict means the document is internally inconsistent in a way that may indicate tampering -- acting on it creates unrecoverable compliance and financial exposure. Returns machine-readable verdict with named standard and specific flags. When you have 2-20 related documents (e.g. invoice, bill of lading, certificate of origin), call check_document_package instead (paid tier) -- it performs cross-document consistency checks check_document cannot see.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| document_text | No | Extracted text content from the document. Provide this or document_image or both. | |
| document_image | No | Base64 encoded document image. Accepts raw base64 or a data URL (data:image/jpeg;base64,...). Supported types: JPEG, PNG, GIF, WEBP. | |
| document_type_hint | No | What the calling agent believes the document type is, e.g. "bill_of_lading", "passport", "certificate_of_origin". Optional -- the validator identifies the type independently. | |
| issuing_jurisdiction | No | Country or issuing body, e.g. "Singapore", "ICAO", "United Kingdom". Narrows jurisdiction-specific standard selection. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| flags | Yes | ||
| reason | Yes | ||
| verdict | Yes | ||
| checked_at | Yes | ||
| confidence | Yes | ||
| _disclaimer | Yes | ||
| hold_reason | No | ||
| retry_after | No | ||
| verdict_ttl | Yes | ||
| agent_action | Yes | ||
| analysis_type | Yes | ||
| _upgrade_notice | No | ||
| calls_remaining | Yes | ||
| escalation_path | No | ||
| assessed_against | Yes | Named standard, e.g. "ICAO Document 9303" -- null for UNKNOWN_DOCUMENT_TYPE | |
| data_source_status | Yes | ||
| known_issuing_standard | Yes | ||
| document_type_identified | Yes |