Skip to main content
Glama

Document Integrity Validator

Check Document Package Integrity

check_document_package
Read-only

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
documentsYesArray of 2 to 20 related documents to assess individually and cross-check against each other. Each document must have a unique label.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
verdictYes
documentsYes
checked_atYes
confidenceYes
_disclaimerYes
verdict_ttlYes
agent_actionYes
analysis_typeYes
calls_remainingYes
package_verdictYes
data_source_statusYes
package_agent_actionYes
cross_document_conflictsYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed4 schema fields changed
    • addedOutput schema / properties / calls_remaining
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "const": "unlimited",
      +      "type": "string"
      +    }
      +  ]
      +}
    • addedOutput schema / properties / data_source_status
      Added value: +{
      +  "enum": [
      +    "full",
      +    "degraded",
      +    "partial"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / verdict_ttl
      Added value: +{
      +  "type": "number"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "agent_action",
      -  "verdict",
      -  "confidence",
      -  "documents",
      -  "cross_document_conflicts",
      -  "package_verdict",
      -  "package_agent_action",
      -  "analysis_type",
      -  "checked_at",
      -  "_disclaimer"
      -]New value: +[
      +  "agent_action",
      +  "verdict",
      +  "confidence",
      +  "documents",
      +  "cross_document_conflicts",
      +  "package_verdict",
      +  "package_agent_action",
      +  "analysis_type",
      +  "checked_at",
      +  "_disclaimer",
      +  "calls_remaining",
      +  "verdict_ttl",
      +  "data_source_status"
      +]
  2. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "_disclaimer": {
      +      "type": "string"
      +    },
      +    "agent_action": {
      +      "enum": [
      +        "PROCEED",
      +        "VERIFY_MANUALLY",
      +        "HOLD",
      +        "REFER_TO_HUMAN",
      +        "UPGRADE_REQUIRED"
      +      ],
      +      "type": "string"
      +    },
      +    "analysis_type": {
      +      "type": "string"
      +    },
      +    "checked_at": {
      +      "type": "string"
      +    },
      +    "confidence": {
      +      "enum": [
      +        "HIGH",
      +        "MEDIUM",
      +        "LOW",
      +        "NONE"
      +      ],
      +      "type": "string"
      +    },
      +    "cross_document_conflicts": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "documents": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "agent_action": {
      +            "$ref": "#/properties/agent_action"
      +          },
      +          "assessed_against": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "confidence": {
      +            "$ref": "#/properties/confidence"
      +          },
      +          "document_type_identified": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "flags": {
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          },
      +          "known_issuing_standard": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "label": {
      +            "type": "string"
      +          },
      +          "reason": {
      +            "type": "string"
      +          },
      +          "verdict": {
      +            "$ref": "#/properties/verdict"
      +          }
      +        },
      +        "required": [
      +          "label",
      +          "agent_action",
      +          "verdict",
      +          "confidence",
      +          "document_type_identified",
      +          "assessed_against",
      +          "known_issuing_standard",
      +          "flags",
      +          "reason"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "package_agent_action": {
      +      "$ref": "#/properties/agent_action"
      +    },
      +    "package_verdict": {
      +      "$ref": "#/properties/verdict"
      +    },
      +    "verdict": {
      +      "enum": [
      +        "PASS",
      +        "FLAG",
      +        "FAIL",
      +        "UNKNOWN_DOCUMENT_TYPE"
      +      ],
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "agent_action",
      +    "verdict",
      +    "confidence",
      +    "documents",
      +    "cross_document_conflicts",
      +    "package_verdict",
      +    "package_agent_action",
      +    "analysis_type",
      +    "checked_at",
      +    "_disclaimer"
      +  ],
      +  "type": "object"
      +}
  3. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Beyond annotations (readOnlyHint=true, destructiveHint=false), the description discloses the exact return format ('Returns PASS/FLAG/FAIL verdict per document with mismatch details'), the fields cross-checked (numeric values, party names, reference numbers, dates, commodity descriptions), and the fraud consequence ('A single inconsistency... may indicate fraud -- funds released on a mismatched package have no recovery path'). No contradiction with annotations.

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 description is appropriately sized and front-loaded with the verb and resource. However, there is slight redundancy among the usage phrases ('Call this BEFORE approving...' and 'Use this when your agent has received...' and 'at the moment a set... arrives'), which could be tightened. Still, every sentence contributes meaningful guidance.

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 the tool's complexity, the description is complete: it covers scope (2-20 documents), trigger conditions, return values, cross-check fields, fraud context, and explicitly excludes single-document use. An output schema exists, so return-value details need not be fully repeated, but the description already summarizes them. The description is fully self-contained for correct selection and 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?

Schema description coverage is 100%, so the baseline is 3. The description does not add any parameter-level details beyond what the schema already provides for the 'documents' array and its properties. The schema descriptions already cover label, document_text, document_image, document_type_hint, and issuing_jurisdiction.

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?

The description opens with 'Validates a package of 2-20 related trade finance documents for cross-document consistency,' using a specific verb and resource. It explicitly distinguishes itself from the sibling tool check_document by stating 'Do not use as a substitute for check_document when only one document requires verification.'

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit when-to-use guidance: '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.' It also names the alternative (check_document) and states when not to use this tool, satisfying the when/when-not/alternatives requirement.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A4.5/5.0
Disambiguation5/5

The two tools have clearly distinct scopes: one validates a single document, the other validates a multi-document package. The descriptions explicitly cross-reference each other and state when to use which, leaving no ambiguity.

Naming Consistency5/5

Both tool names follow the same verb_noun pattern: 'check_document' and 'check_document_package'. The suffix '_package' clearly extends the base name without changing the verb style, resulting in a consistent, predictable naming scheme.

Tool Count3/5

With only two tools, the server feels thin for a domain that could include single-document validation, multi-document validation, and possibly standard lookup or generation. However, the two tools cover the two distinct input types, making the count borderline rather than clearly insufficient.

Completeness3/5

The tools cover single-document standard compliance and multi-document cross-checking, but the package tool only performs cross-document checks, not internal standard compliance. The description telling users to call check_document_package 'instead' of check_document is misleading—a full package validation would require running both tools sequentially, representing a notable gap.