AI reasoning checks any document against known international standards before your agent acts on it.
Document Integrity Validator MCP
The io.github.OjasKord/document-integrity-validator-mcp server performs AI reasoning checks on a document received from an external party. Before an agent accepts, processes, or acts on the document, it verifies internal consistency and whether the document matches the known standard for its type.
🛠️ Key Features
Verifies internal consistency and document completeness
Checks for anomalies
Produces a machine-readable verdict
Supports “one call” verification of any document
🚀 Use Cases
Document validation prior to agent actions
Compliance checks against known standards for a document’s type
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.
Parameters4
document_text
string
optional
Extracted text content from the document. Provide this or document_image or both.
document_image
string
optional
Base64 encoded document image. Accepts raw base64 or a data URL (data:image/jpeg;base64,...). Supported types: JPEG, PNG, GIF, WEBP.
document_type_hint
string
optional
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
string
optional
Country or issuing body, e.g. "Singapore", "ICAO", "United Kingdom". Narrows jurisdiction-specific standard selection.
Raw schema
{
"type": "object",
"properties": {
"document_text": {
"type": "string",
"maxLength": 50000,
"description": "Extracted text content from the document. Provide this or document_image or both."
},
"document_image": {
"type": "string",
"maxLength": 10000000,
"description": "Base64 encoded document image. Accepts raw base64 or a data URL (data:image/jpeg;base64,...). Supported types: JPEG, PNG, GIF, WEBP."
},
"document_type_hint": {
"type": "string",
"maxLength": 200,
"description": "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": {
"type": "string",
"maxLength": 200,
"description": "Country or issuing body, e.g. \"Singapore\", \"ICAO\", \"United Kingdom\". Narrows jurisdiction-specific standard selection."
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
check_document_package
Validates a package of 2-20 related trade finance documents for cross-document consistency. Call this BEFORE approving any multi-document trade finance transaction or cross-border shipment -- at the moment a set of 2-20 related documents arrives from an external party and funds have not been released. Use this when your agent has received a full trade finance package — such as invoice, bill of lading, and certificate of origin together — and must verify all documents are consistent with each other before releasing funds. Returns PASS/FLAG/FAIL verdict per document with mismatch details. Cross-checks all documents for consistency across numeric values, party names, reference numbers, dates, and commodity descriptions. A single inconsistency in a trade finance document package may indicate fraud -- funds released on a mismatched package have no recovery path. Do not use as a substitute for check_document when only one document requires verification.
Parameters1
documents
array
required
Array of 2 to 20 related documents to assess individually and cross-check against each other. Each document must have a unique label.
Raw schema
{
"type": "object",
"properties": {
"documents": {
"type": "array",
"items": {
"type": "object",
"properties": {
"document_text": {
"type": "string",
"maxLength": 50000,
"description": "Extracted text content from this document."
},
"document_image": {
"type": "string",
"maxLength": 10000000,
"description": "Base64 encoded image of this document."
},
"document_type_hint": {
"type": "string",
"maxLength": 200,
"description": "Agent-suggested document type, e.g. \"commercial_invoice\"."
},
"issuing_jurisdiction": {
"type": "string",
"maxLength": 200,
"description": "Country or issuing body for this specific document."
},
"label": {
"type": "string",
"minLength": 1,
"maxLength": 100,
"description": "Agent-assigned identifier for this document in the package, e.g. \"packing_list\", \"certificate_of_origin\", \"commercial_invoice\". Used in cross-document conflict reporting."
}
},
"required": [
"label"
],
"additionalProperties": false
},
"minItems": 2,
"maxItems": 20,
"description": "Array of 2 to 20 related documents to assess individually and cross-check against each other. Each document must have a unique label."
}
},
"required": [
"documents"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
Before your agent accepts, processes, or acts on any document received from an external party -- verify it is internally consistent and matches the known standard for its type. One call. Any document. Machine-readable verdict.
What it does
Checks any document for internal consistency, completeness, and anomalies against the known international standard for that document type. Accepts base64 image or extracted text. Returns a structured verdict with a machine-readable agent_action field.
Supported standards include: ICAO Document 9303 (passports), Hague-Visby Rules 1968 (bills of lading), UCP 600 (trade finance documents), ISPM 12/IPPC/FAO (phytosanitary certificates), Vienna Convention on Road Traffic 1968 (driving licences), and more.
Returns UNKNOWN_DOCUMENT_TYPE rather than guessing on unfamiliar documents -- refusal is correct behaviour, not a failure.
AI-powered reasoning -- NOT a database lookup.
Tools
check_document (Free tier: 10 calls/month)
Checks a single document against its international standard.
Input:
document_text (string, optional) -- extracted text from the document
document_image (string, optional) -- base64 encoded image (raw base64 or data URL)
document_type_hint (string, optional) -- agent belief about document type
issuing_jurisdiction (string, optional) -- country or issuing body
At least one of document_text or document_image is required.
Response:
json
{"agent_action":"PROCEED","verdict":"PASS","confidence":"HIGH","document_type_identified":"Bill of Lading","assessed_against":"Hague-Visby Rules 1968","known_issuing_standard":"IMO","flags":[],"reason":"Document is internally consistent and compliant with Hague-Visby Rules 1968.","analysis_type":"AI-powered reasoning -- NOT a database lookup","checked_at":"2026-05-06T10:00:00.000Z","_disclaimer":"..."}
agent_action values:
PROCEED -- document passed
VERIFY_MANUALLY -- flags found, agent should flag for human review
HOLD -- document failed, do not proceed
REFER_TO_HUMAN -- document type unknown, refer for manual assessment
check_document_package (Paid tier only)
Checks 2-20 related documents individually then cross-checks all for consistency conflicts.
Input:
documents (array, min 2, max 20) -- each item has: label (required), document_text, document_image, document_type_hint, issuing_jurisdiction
Cross-checks performed: weights/quantities/amounts, party names, reference numbers, dates, commodity descriptions, port references.
AI-powered document consistency assessment. Results are for informational purposes only and do not constitute legal, compliance, or authentication advice. We do not log or store your document content. Full terms: kordagencies.com/terms.html