Skip to main content
Glama

Read verification documents

check_verification_documents

Read the files of a number verification form, before the form is filled or submitted.

    This applies to a number offer, using the same quote and applicant type
    as the requirements. Known ``fields`` and ``address`` values can be partial.
    An AI model reads each file.
    Returns ``fields``, ``address`` and ``documents.<slot>.fields``: the values the
    files show, by the form's own keys, to fill the form after the user confirms
    them. ``documents.<slot>.option`` is the document type the file looks like.
    ``warnings`` (``field``, ``kind``, ``message``) lists what the carrier may
    refuse: an unreadable, upside-down or expired document, a file of another
    type than the chosen one, or a typed name that differs from the printed one.
    Each message names the fix. A submission with warnings is still accepted.
    A file nothing was read from has ``read`` false; an unclear file also has an
    ``unreadable`` warning, and a file past the daily reads has ``skipped``
    ``daily_limit``. Only the first 3 pages of a PDF are read; a PDF of more
    than 5 pages is not read.
    Each file read uses one of the workspace's daily document reads (30 per day);
    a file given for several slots uses one. Nothing is filed, saved, held or
    charged, and uploads stay usable.

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": {
      "country_code": "<country_code>",
      "number_type": "<number_type>",
      "fields": "<fields>",
      "documents": "<documents>",
      "files": "<files>"
    },
    "name": "check_verification_documents"
  }
}

Input Schema

NameRequiredDescriptionDefault
filesYesOne file per slot being filled, keyed by the matching slot in ``documents``. Upload IDs come from ``create_file_upload`` with purpose ``verification_document`` and last one hour. The inline form suits small files. Each file is at most 10 MiB.
fieldsYesApplicant answers as text, keyed by the field names in ``get_verification_requirements``. Choice fields take comma-separated option keys.
addressNoKnown parts of the applicant's address when the form requires one. The document check can suggest missing values and flag a mismatch in the name on the address.
quote_idNoRequired for reading documents. This is the ``quote_id`` from ``quote_numbers`` for the offer used to get the form requirements.
documentsYesMap from each document slot to ``{option, fields, covers}``. ``option`` may be empty while the type is not chosen. ``covers`` lists the other slots the same file stands for: the file is sent once, for this slot, and one read fills all of them.
llm_modelNoThe calling agent's provider model ID, as shown in the client's model configuration when available. Recorded for analytics.
number_typeYesThe kind of number this registration covers. Copy it from the offer in ``quote_numbers`` or the number in ``list_numbers``.
country_codeYesISO 3166-1 alpha-2 country code, such as ``US``.
subject_typeNoWho the registration is for, matching the requirements: the user (``person``) or their company (``business``). It has no default; without it, nothing is sent.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • changedInput schema / properties / address / anyOf
      Previous value: -[
      -  {
      -    "properties": {
      -      "city": {
      -        "description": "City or town of the street address, as written on mail sent there.",
      -        "title": "City",
      -        "type": "string"
      -      },
      -      "country_code": {
      -        "description": "ISO alpha-2 address country.",
      -        "title": "Country Code",
      -        "type": "string"
      -      },
      -      "customer_name": {
      -        "description": "Name associated with the address.",
      -        "title": "Customer Name",
      -        "type": "string"
      -      },
      -      "postal_code": {
      -        "description": "Postal or ZIP code of the street address, such as `94103`.",
      -        "title": "Postal Code",
      -        "type": "string"
      -      },
      -      "region": {
      -        "description": "State, province or region.",
      -        "title": "Region",
      -        "type": "string"
      -      },
      -      "street": {
      -        "description": "Street address.",
      -        "title": "Street",
      -        "type": "string"
      -      }
      -    },
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "properties": {
      +      "city": {
      +        "description": "City or town as it appears in the applicant's mailing address.",
      +        "title": "City",
      +        "type": "string"
      +      },
      +      "country_code": {
      +        "description": "ISO alpha-2 address country.",
      +        "title": "Country Code",
      +        "type": "string"
      +      },
      +      "customer_name": {
      +        "description": "Name associated with the address.",
      +        "title": "Customer Name",
      +        "type": "string"
      +      },
      +      "postal_code": {
      +        "description": "Postal or ZIP code of the street address, such as `94103`.",
      +        "title": "Postal Code",
      +        "type": "string"
      +      },
      +      "region": {
      +        "description": "State, province, or equivalent administrative area in the applicant's address.",
      +        "title": "Region",
      +        "type": "string"
      +      },
      +      "street": {
      +        "description": "Street address.",
      +        "title": "Street",
      +        "type": "string"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / address / description
      Previous value: -"The applicant's address. Give it when the requirements include one; otherwise leave it out."New value: +"Known parts of the applicant's address when the form requires one. The document check can suggest missing values and flag a mismatch in the name on the address."
    • changedInput schema / properties / files / description
      Previous value: -"The document files, one per slot named in ``documents``. Use an upload: the ``id`` from ``create_file_upload`` with purpose ``verification_document``, within an hour of uploading. A very small file can go inline as base64 instead. Each file is at most 10 MiB."New value: +"One file per slot being filled, keyed by the matching slot in ``documents``. Upload IDs come from ``create_file_upload`` with purpose ``verification_document`` and last one hour. The inline form suits small files. Each file is at most 10 MiB."
    • changedInput schema / properties / files / items / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "slot": {
      -        "description": "The key in ``documents`` that identifies what this file proves.",
      -        "pattern": "^[A-Za-z0-9_-]{1,64}$",
      -        "type": "string"
      -      },
      -      "upload_id": {
      -        "description": "The ``id`` from ``create_file_upload`` with purpose ``verification_document``.",
      -        "format": "uuid",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "slot",
      -      "upload_id"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "properties": {
      -      "content_base64": {
      -        "contentEncoding": "base64",
      -        "description": "The complete file for this document slot when supplied inline instead of by upload ID.",
      -        "type": "string"
      -      },
      -      "content_type": {
      -        "description": "File format used to read the document.",
      -        "enum": [
      -          "image/jpeg",
      -          "image/png",
      -          "application/pdf"
      -        ],
      -        "type": "string"
      -      },
      -      "slot": {
      -        "description": "The key in ``documents`` that identifies what this file proves.",
      -        "pattern": "^[A-Za-z0-9_-]{1,64}$",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "slot",
      -      "content_type",
      -      "content_base64"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "slot": {
      +        "description": "The key in ``documents`` that identifies what this file proves.",
      +        "pattern": "^[A-Za-z0-9_-]{1,64}$",
      +        "type": "string"
      +      },
      +      "upload_id": {
      +        "description": "The ``id`` from ``create_file_upload`` with purpose ``verification_document``.",
      +        "format": "uuid",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "slot",
      +      "upload_id"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "content_base64": {
      +        "contentEncoding": "base64",
      +        "description": "Bytes of the complete document for this slot, supplied directly in the tool call.",
      +        "type": "string"
      +      },
      +      "content_type": {
      +        "description": "Media type of the actual document. Hail checks it against the file bytes.",
      +        "enum": [
      +          "image/jpeg",
      +          "image/png",
      +          "application/pdf"
      +        ],
      +        "type": "string"
      +      },
      +      "slot": {
      +        "description": "The key in ``documents`` that identifies what this file proves.",
      +        "pattern": "^[A-Za-z0-9_-]{1,64}$",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "slot",
      +      "content_type",
      +      "content_base64"
      +    ],
      +    "type": "object"
      +  }
      +]
    • changedInput schema / properties / llm_model / description
      Previous value: -"Model ID of the calling agent. Optional. Recorded for analytics only."New value: +"The calling agent's provider model ID, as shown in the client's model configuration when available. Recorded for analytics."
  2. Changed7 schema fields changed
    • changedInput schema / properties / fields / description
      Previous value: -"Applicant answers keyed by the field names in ``get_verification_requirements``. Choice fields take comma-separated option keys."New value: +"Applicant answers as text, keyed by the field names in ``get_verification_requirements``. Choice fields take comma-separated option keys."
    • changedInput schema / properties / files / items / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "slot": {
      -        "description": "The document slot this file fills: a key in ``documents``.",
      -        "pattern": "^[A-Za-z0-9_-]{1,64}$",
      -        "type": "string"
      -      },
      -      "upload_id": {
      -        "description": "The ``id`` from ``create_file_upload`` with purpose ``verification_document``.",
      -        "format": "uuid",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "slot",
      -      "upload_id"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "properties": {
      -      "content_base64": {
      -        "contentEncoding": "base64",
      -        "description": "The whole file, base64-encoded.",
      -        "type": "string"
      -      },
      -      "content_type": {
      -        "description": "The file's format.",
      -        "enum": [
      -          "image/jpeg",
      -          "image/png",
      -          "application/pdf"
      -        ],
      -        "type": "string"
      -      },
      -      "slot": {
      -        "description": "The document slot this file fills: a key in ``documents``.",
      -        "pattern": "^[A-Za-z0-9_-]{1,64}$",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "slot",
      -      "content_type",
      -      "content_base64"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "slot": {
      +        "description": "The key in ``documents`` that identifies what this file proves.",
      +        "pattern": "^[A-Za-z0-9_-]{1,64}$",
      +        "type": "string"
      +      },
      +      "upload_id": {
      +        "description": "The ``id`` from ``create_file_upload`` with purpose ``verification_document``.",
      +        "format": "uuid",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "slot",
      +      "upload_id"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "content_base64": {
      +        "contentEncoding": "base64",
      +        "description": "The complete file for this document slot when supplied inline instead of by upload ID.",
      +        "type": "string"
      +      },
      +      "content_type": {
      +        "description": "File format used to read the document.",
      +        "enum": [
      +          "image/jpeg",
      +          "image/png",
      +          "application/pdf"
      +        ],
      +        "type": "string"
      +      },
      +      "slot": {
      +        "description": "The key in ``documents`` that identifies what this file proves.",
      +        "pattern": "^[A-Za-z0-9_-]{1,64}$",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "slot",
      +      "content_type",
      +      "content_base64"
      +    ],
      +    "type": "object"
      +  }
      +]
    • changedInput schema / properties / quote_id / description
      Previous value: -"The number offer this registration lets the user buy: the offer's ``quote_id`` from ``quote_numbers``, the same one used for the requirements. Give it when ``purpose`` is ``number``; leave it out for ``sms``."New value: +"Required for reading documents. This is the ``quote_id`` from ``quote_numbers`` for the offer used to get the form requirements."
    • addedOutput schema / $defs
      Added value: +{
      +  "VerificationDocumentRead": {
      +    "description": "What was read from one slot's file.",
      +    "properties": {
      +      "expiry_date": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "The expiry date printed on the file (YYYY-MM-DD), or null.",
      +        "title": "Expiry Date"
      +      },
      +      "fields": {
      +        "additionalProperties": {
      +          "type": "string"
      +        },
      +        "description": "Values for the fields of the slot's document types, by field name, as printed on the file.",
      +        "title": "Fields",
      +        "type": "object"
      +      },
      +      "file_slot": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "The slot whose file this was read from: this slot, or the slot whose file covers it. Slots with the same `file_slot` share one file. Null when not read.",
      +        "title": "File Slot"
      +      },
      +      "none_of_types": {
      +        "default": false,
      +        "description": "True when the file was read and looks like none of the slot's document types (`option` is then null).",
      +        "title": "None Of Types",
      +        "type": "boolean"
      +      },
      +      "option": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "The slot's document type the file looks like, as an option key, or null when none fits or it was not read.",
      +        "title": "Option"
      +      },
      +      "printed_name": {
      +        "anyOf": [
      +          {
      +            "$ref": "#/$defs/VerificationPrintedName"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "The name printed on the file, or null when not read."
      +      },
      +      "read": {
      +        "description": "False when nothing was read from the file: the reader is off, the file type is not supported, the read failed or took too long (no warning), or the file is unreadable (an 'unreadable' warning). The other values are then empty.",
      +        "title": "Read",
      +        "type": "boolean"
      +      },
      +      "skipped": {
      +        "anyOf": [
      +          {
      +            "const": "daily_limit",
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Why the file was not read, when Hail chose not to: 'daily_limit' when the workspace has used today's document reads. Null otherwise.",
      +        "title": "Skipped"
      +      }
      +    },
      +    "required": [
      +      "read",
      +      "option",
      +      "fields",
      +      "expiry_date",
      +      "printed_name",
      +      "skipped",
      +      "none_of_types",
      +      "file_slot"
      +    ],
      +    "title": "VerificationDocumentRead",
      +    "type": "object"
      +  },
      +  "VerificationDocumentWarning": {
      +    "description": "Something on an uploaded document the carrier may refuse. A warning\nonly: you can still submit.",
      +    "properties": {
      +      "field": {
      +        "description": "Where to show it: a slot name for the document itself, or the path of a typed value (`first_name`, `<slot>.<field>`, `address.customer_name`).",
      +        "title": "Field",
      +        "type": "string"
      +      },
      +      "kind": {
      +        "description": "'unreadable', 'rotated' (upside down or on its side), 'expired', 'document_type' (the file does not match the chosen type), or 'name' (the typed name differs from the printed one).",
      +        "enum": [
      +          "unreadable",
      +          "rotated",
      +          "expired",
      +          "document_type",
      +          "name"
      +        ],
      +        "title": "Kind",
      +        "type": "string"
      +      },
      +      "message": {
      +        "description": "What is wrong and how to fix it.",
      +        "title": "Message",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "field",
      +      "kind",
      +      "message"
      +    ],
      +    "title": "VerificationDocumentWarning",
      +    "type": "object"
      +  },
      +  "VerificationPrintedName": {
      +    "description": "The name printed on a document, as read. Empty strings when not printed.",
      +    "properties": {
      +      "business_name": {
      +        "description": "The name of the company the document is about or addressed to, never the company that issued it.",
      +        "title": "Business Name",
      +        "type": "string"
      +      },
      +      "given_names": {
      +        "description": "The given names of the person the document is about or addressed to, never a person who signs for the issuer.",
      +        "title": "Given Names",
      +        "type": "string"
      +      },
      +      "latin_given_names": {
      +        "default": "",
      +        "description": "The given names in Latin letters as the document prints them (its machine-readable zone or a transliteration), or empty.",
      +        "title": "Latin Given Names",
      +        "type": "string"
      +      },
      +      "latin_surnames": {
      +        "default": "",
      +        "description": "The surnames in Latin letters, the same way.",
      +        "title": "Latin Surnames",
      +        "type": "string"
      +      },
      +      "surnames": {
      +        "description": "That person's surnames.",
      +        "title": "Surnames",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "given_names",
      +      "surnames",
      +      "latin_given_names",
      +      "latin_surnames",
      +      "business_name"
      +    ],
      +    "title": "VerificationPrintedName",
      +    "type": "object"
      +  }
      +}
    • removedOutput schema / additionalProperties
      Removed value: -true
    • addedOutput schema / anyOf
      Added value: +[
      +  {
      +    "description": "Returned by ``POST /verifications/document-check``.",
      +    "properties": {
      +      "address": {
      +        "additionalProperties": {
      +          "type": "string"
      +        },
      +        "description": "Address parts read from the files (`customer_name`, `street`, `city`, `region`, `postal_code`, `country_code`). Only the parts found.",
      +        "title": "Address",
      +        "type": "object"
      +      },
      +      "documents": {
      +        "additionalProperties": {
      +          "$ref": "#/$defs/VerificationDocumentRead"
      +        },
      +        "description": "What was read from each slot that had a file, by slot name.",
      +        "title": "Documents",
      +        "type": "object"
      +      },
      +      "fields": {
      +        "additionalProperties": {
      +          "type": "string"
      +        },
      +        "description": "Values for the form's own `fields`, by field name, read from the files.",
      +        "title": "Fields",
      +        "type": "object"
      +      },
      +      "note": {
      +        "description": "What the check does not cover.",
      +        "title": "Note",
      +        "type": "string"
      +      },
      +      "warnings": {
      +        "description": "Things the carrier may refuse. Empty when nothing was found.",
      +        "items": {
      +          "$ref": "#/$defs/VerificationDocumentWarning"
      +        },
      +        "title": "Warnings",
      +        "type": "array"
      +      }
      +    },
      +    "required": [
      +      "fields",
      +      "address",
      +      "documents",
      +      "warnings",
      +      "note"
      +    ],
      +    "title": "VerificationDocumentCheckResponse",
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "error": {
      +        "type": "string"
      +      },
      +      "problems": {
      +        "description": "Validation issues with an input path and a message.",
      +        "items": {
      +          "properties": {
      +            "loc": {
      +              "items": {
      +                "type": [
      +                  "string",
      +                  "integer"
      +                ]
      +              },
      +              "type": "array"
      +            },
      +            "msg": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "loc",
      +            "msg"
      +          ],
      +          "type": "object"
      +        },
      +        "type": "array"
      +      }
      +    },
      +    "required": [
      +      "error"
      +    ],
      +    "type": "object"
      +  }
      +]
    • removedOutput schema / title
      Removed value: -"check_verification_documents_toolDictOutput"
  3. Added

TDQS

A4.1/5.0
Behavior5/5

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

With annotations only marking readOnlyHint=false, openWorldHint=true and idempotentHint=false, the description carries real weight: it discloses that an AI model reads each file, that each read consumes one of the workspace's 30 daily document reads, that a file shared across slots costs one read, that only the first 3 PDF pages are read and PDFs over 5 pages are not read, and that nothing is filed, saved or charged and uploads remain usable. It also explains the ``read``/``skipped: daily_limit``/``unreadable`` states, which is precisely the kind of limit behavior annotations cannot express.

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 purpose is front-loaded, followed by the return shape, then warnings, then quota and page limits, and every block is information-bearing. A few sentences are dense (the warnings clause packs four warning kinds into one sentence), but nothing reads as filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a nine-parameter, nested, file-upload tool with an output schema, the description covers the dimensions an agent most needs: preconditions, quota cost, page limits, warning semantics and non-destructive effects. Since an output schema exists, the detailed return-value walkthrough is somewhat redundant, but nothing critical (e.g., slot/file pairing rules or failure handling) is missing.

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 schema already documents all nine parameters and a 3 is the baseline. The description adds some meaning beyond the schema by noting that ``fields`` and ``address`` values may be partial and that the quote/applicant-type inputs must match the requirements, but it does not explain the slot/covers/option relationship or the ``subject_type`` no-default behavior those schema fields carry.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence gives a specific verb and resource ("Read the files of a number verification form") plus a temporal scope ("before the form is filled or submitted"), and the second sentence pins it to a number offer with the same quote and applicant type as the requirements. It does not explicitly contrast with near-siblings such as check_verification or submit_verification, so an agent must infer the boundary from timing alone.

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?

Usage context is clear: call it while the form is still unfilled/unsubmitted, on the same quote and applicant type as get_verification_requirements, and partial ``fields``/``address`` are acceptable. The line "A submission with warnings is still accepted" implicitly tells the agent it may proceed to submit, but no alternative tool is named and no explicit when-not condition is stated.

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.