Skip to main content
Glama

Triplicate – export documents

Check a B/L or AWB draft

check_transport_document_draft
Read-only

Use when the user has the text of a B/L or AWB draft from the forwarder or carrier and the order data, before the original is issued. Compare the text of a bill of lading or air waybill draft from the forwarder or carrier with the order data (same fields as create_trade_documents): shipper, consignee (to-order drafts noted), notify party, ports, vessel and voyage, number of packages, gross weight, measurement (CBM), freight prepaid or collect against the Incoterms rule, shipping marks, goods description, container and seal numbers (shipment.containers) and the L/C number. Returns each field as ok, warning, mismatch or info with a short reason. Nothing is stored.

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": {
      "draft_text": "<draft_text>"
    },
    "name": "check_transport_document_draft"
  }
}

Input Schema

NameRequiredDescriptionDefault
bankNo
buyerNoBuyer / consignee / importer
itemsNo
termsNo
notifyNoNotify party, if different from the buyer
sellerNoSeller / shipper / exporter
signerNo
chargesNo
remarksNoOptional remarks printed on the documents, e.g. 'SAMPLES OF NO COMMERCIAL VALUE, NOT FOR RESALE. VALUE FOR CUSTOMS PURPOSES ONLY.'
sold_toNoOnly if the buyer (sold to) is a different company from the consignee in 'buyer', e.g. a trading company buying for a factory: printed as BUYER (SOLD TO) on the invoice, the buyer on the proforma and sales contract
documentNo
languageNoLanguage of the generator page the link opens (documents are in English)en
shipmentNo
hs_totalsNoAlso print totals by HS code (quantity, value, cartons, weights) on the invoice and packing list, for the customs broker's entry lines
lc_numberNoOptional letter of credit number that should appear on the draft
open_formNoAlso open one of the generator's extra forms with this data: VGM declaration (SOLAS, needs shipment.containers), ISF (10+2) data for a US buyer, USMCA/CUSMA certification of origin, packing declaration for sea containers to Australia, draft (bill of exchange), beneficiary's certificate, credit/debit note, shipping advice e-mail, or a return/repair invoice made from this invoice (the original invoice number, date and waybill as reference; the buyer as shipper when goods come back). Each has 3 free uses (the shipping advice has no limit).
draft_textYesText of the bill of lading or air waybill draft from the forwarder or carrier (copied from its PDF or e-mail), up to 20,000 characters
manufacturerNoWho made the goods, printed on the commercial invoice with its MID code (US shipments: carriers and CBP ask for it; textile and apparel entries must show it). The generator suggests the MID from 19 CFR Part 102 if mid is empty
open_documentNopi proforma invoice, ci commercial invoice, pl packing list, si shipping instruction, sc sales contract (seller and buyer sign; the remarks become its other terms), co certificate of origin (non-preferential: the exporter's declaration, with space for a chamber of commerce to certify it), po purchase order (the buyer's order to the supplier: buyer = issuer, seller = supplier)ci
imperial_unitsNoAlso show weights in pounds and volume in cubic feet on the packing list and shipping instruction (for US buyers)
shipping_marksNoOptional; generated from buyer, destination and carton count if empty
letter_of_creditNoTerms of the letter of credit (from MT700: 20, 31C, 32B, 39A, 44C, 31D, 48, 43P, 45A); the generator checks the documents against them (not among the free features)
origin_statementNoPreferential origin statement printed on the commercial invoice in the agreement's exact wording (3 free uses). Only for goods that meet the agreement's rules of origin.
destination_countryNoISO 3166-1 alpha-2 code of the importing country (optional; otherwise taken from the port of discharge): adds that country's invoice rules to the checks

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / items / items / properties / unit / enum
      Previous value: -[
      -  "PCS",
      -  "SETS",
      -  "BOXES",
      -  "PAIRS",
      -  "KG",
      -  "M"
      -]New value: +[
      +  "PCS",
      +  "SETS",
      +  "BOXES",
      +  "PAIRS",
      +  "DOZ",
      +  "KG",
      +  "MT",
      +  "M",
      +  "SQM",
      +  "CBM",
      +  "L",
      +  "ROLLS",
      +  "BAGS"
      +]
  2. Changed23 schema fields changed
    • addedInput schema / properties / destination_country
      Added value: +{
      +  "description": "ISO 3166-1 alpha-2 code of the importing country (optional; otherwise taken from the port of discharge): adds that country's invoice rules to the checks",
      +  "type": "string"
      +}
    • addedInput schema / properties / hs_totals
      Added value: +{
      +  "default": false,
      +  "description": "Also print totals by HS code (quantity, value, cartons, weights) on the invoice and packing list, for the customs broker's entry lines",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / items / items / properties / free_of_charge
      Added value: +{
      +  "description": "Sent free (samples, gifts): the value stays on the documents for customs and is taken off the amount payable",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / items / items / properties / gtin
      Added value: +{
      +  "description": "GTIN / EAN / UPC barcode number, if the product has one",
      +  "type": "string"
      +}
    • addedInput schema / properties / items / items / properties / manufacturer_product_code
      Added value: +{
      +  "description": "Manufacturer's own product code (part number)",
      +  "type": "string"
      +}
    • addedInput schema / properties / items / items / properties / not_originating
      Added value: +{
      +  "description": "With origin_statement: this item does not qualify and is marked as not covered by the statement",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / items / items / properties / packed_with_previous
      Added value: +{
      +  "description": "Assorted cartons: packed in the same cartons as the item before it, whose carton weights include this item; leave its carton fields empty",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / items / items / properties / section_232_metal_origin
      Added value: +{
      +  "description": "US shipments of steel or aluminium articles: the countries where the steel was melted and poured or the aluminium smelted and cast, e.g. 'STEEL MELT AND POUR: KR'; printed under the description",
      +  "type": "string"
      +}
    • addedInput schema / properties / items / items / properties / sku
      Added value: +{
      +  "description": "Seller's product code, printed under the description (EU import declarations for distance sales need it from 1 November 2026)",
      +  "type": "string"
      +}
    • addedInput schema / properties / letter_of_credit
      Added value: +{
      +  "description": "Terms of the letter of credit (from MT700: 20, 31C, 32B, 39A, 44C, 31D, 48, 43P, 45A); the generator checks the documents against them (not among the free features)",
      +  "properties": {
      +    "amount": {
      +      "type": "number"
      +    },
      +    "expiry_date": {
      +      "description": "YYYY-MM-DD",
      +      "type": "string"
      +    },
      +    "goods_description": {
      +      "type": "string"
      +    },
      +    "issue_date": {
      +      "description": "YYYY-MM-DD",
      +      "type": "string"
      +    },
      +    "latest_shipment_date": {
      +      "description": "YYYY-MM-DD",
      +      "type": "string"
      +    },
      +    "number": {
      +      "type": "string"
      +    },
      +    "partial_shipments": {
      +      "enum": [
      +        "allowed",
      +        "not_allowed"
      +      ],
      +      "type": "string"
      +    },
      +    "presentation_days": {
      +      "type": "number"
      +    },
      +    "show_on_documents": {
      +      "description": "Print the L/C number and date on the documents",
      +      "type": "boolean"
      +    },
      +    "tolerance_percent": {
      +      "type": "number"
      +    }
      +  },
      +  "required": [
      +    "number"
      +  ],
      +  "type": "object"
      +}
    • addedInput schema / properties / manufacturer
      Added value: +{
      +  "description": "Who made the goods, printed on the commercial invoice with its MID code (US shipments: carriers and CBP ask for it; textile and apparel entries must show it). The generator suggests the MID from 19 CFR Part 102 if mid is empty",
      +  "properties": {
      +    "city": {
      +      "type": "string"
      +    },
      +    "country_code": {
      +      "description": "ISO 3166-1 alpha-2",
      +      "type": "string"
      +    },
      +    "mid": {
      +      "type": "string"
      +    },
      +    "name": {
      +      "type": "string"
      +    },
      +    "province": {
      +      "description": "Canada only, e.g. ON",
      +      "type": "string"
      +    },
      +    "same_as_seller": {
      +      "type": "boolean"
      +    },
      +    "street": {
      +      "description": "Street address line with the building number",
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
    • addedInput schema / properties / open_form
      Added value: +{
      +  "description": "Also open one of the generator's extra forms with this data: VGM declaration (SOLAS, needs shipment.containers), ISF (10+2) data for a US buyer, USMCA/CUSMA certification of origin, packing declaration for sea containers to Australia, draft (bill of exchange), beneficiary's certificate, credit/debit note, shipping advice e-mail, or a return/repair invoice made from this invoice (the original invoice number, date and waybill as reference; the buyer as shipper when goods come back). Each has 3 free uses (the shipping advice has no limit).",
      +  "enum": [
      +    "vgm_declaration",
      +    "isf_data",
      +    "usmca_certification",
      +    "packing_declaration_australia",
      +    "bill_of_exchange",
      +    "beneficiary_certificate",
      +    "credit_note",
      +    "shipping_advice",
      +    "return_invoice"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / origin_statement
      Added value: +{
      +  "description": "Preferential origin statement printed on the commercial invoice in the agreement's exact wording (3 free uses). Only for goods that meet the agreement's rules of origin.",
      +  "properties": {
      +    "agreement": {
      +      "enum": [
      +        "eu_korea",
      +        "uk_korea",
      +        "eu_vietnam",
      +        "eu_singapore",
      +        "eu_japan",
      +        "uk_japan",
      +        "eu_uk",
      +        "eu_canada",
      +        "korea_efta",
      +        "eu_gsp",
      +        "uk_dcts"
      +      ],
      +      "type": "string"
      +    },
      +    "number": {
      +      "description": "Approved exporter's authorisation number (EU-Korea, UK-Korea, EU-Vietnam; may be empty up to EUR 6,000 per consignment), REX number (EU GSP, EU-Canada, EU-Singapore; EU exporters), UEN (Singapore exporters, EU-Singapore), Exporter Reference No. (EU-Japan, UK-Japan, EU-UK: REX or GB EORI), Business Number (Canadian exporters) or customs identification number (UK DCTS)",
      +      "type": "string"
      +    },
      +    "origin": {
      +      "description": "Origin as written in the statement, e.g. Korea, EU, Japan, European Union",
      +      "type": "string"
      +    },
      +    "origin_criterion": {
      +      "description": "EU-Japan and UK-Japan: A, B, C1-C4, D or E. EU GSP and UK DCTS: P, or W followed by the HS heading (e.g. W 9618). Not used by the other agreements",
      +      "type": "string"
      +    },
      +    "period_from": {
      +      "description": "YYYY-MM-DD; EU-Japan, UK-Japan, EU-UK, CETA: one statement for several shipments of identical products (12 months at most)",
      +      "type": "string"
      +    },
      +    "period_to": {
      +      "description": "YYYY-MM-DD",
      +      "type": "string"
      +    },
      +    "place": {
      +      "description": "Place printed with the date, e.g. Seoul (default: the port of loading's city)",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "agreement"
      +  ],
      +  "type": "object"
      +}
    • addedInput schema / properties / shipment / properties / containers
      Added value: +{
      +  "description": "Sea containers (FCL): printed as CONTAINER / SEAL NO. on the invoice, packing list and shipping instruction; the numbers are checked against their ISO 6346 check digit. In the generator, More > VGM declaration (3 free uses) makes the SOLAS VGM form from them",
      +  "items": {
      +    "properties": {
      +      "carton_numbers": {
      +        "description": "Cartons in this container, e.g. '1-500': the packing list then shows each container's cartons, weights and CBM",
      +        "type": "string"
      +      },
      +      "number": {
      +        "description": "e.g. MSKU1234565",
      +        "type": "string"
      +      },
      +      "seal": {
      +        "type": "string"
      +      },
      +      "size_type": {
      +        "description": "e.g. 20GP, 40HC, 45G1",
      +        "type": "string"
      +      },
      +      "tare_kg": {
      +        "type": "number"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  "maxItems": 40,
      +  "type": "array"
      +}
    • addedInput schema / properties / shipment / properties / duties_paid_by
      Added value: +{
      +  "description": "Courier invoices: who pays the import duties and taxes (DDP: sender)",
      +  "enum": [
      +    "receiver",
      +    "sender",
      +    "third_party"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / shipment / properties / export_declaration_number
      Added value: +{
      +  "description": "Export declaration, shipping bill or AES ITN number, printed in the remarks box",
      +  "type": "string"
      +}
    • addedInput schema / properties / shipment / properties / original_invoice_date
      Added value: +{
      +  "description": "YYYY-MM-DD",
      +  "type": "string"
      +}
    • addedInput schema / properties / shipment / properties / original_invoice_number
      Added value: +{
      +  "description": "Goods going back (reason_for_export repair_and_return, returned_goods or temporary_export): the original shipment's invoice number, printed as ORIGINAL SHIPMENT",
      +  "type": "string"
      +}
    • addedInput schema / properties / shipment / properties / original_waybill_number
      Added value: +{
      +  "description": "The original shipment's AWB or B/L number",
      +  "type": "string"
      +}
    • addedInput schema / properties / shipment / properties / pallets
      Added value: +{
      +  "description": "If the cartons are palletized: the documents then show e.g. 4 PLTS (101 CTNS), gross weight with the empty pallets and the loaded pallets' volume",
      +  "properties": {
      +    "count": {
      +      "type": "number"
      +    },
      +    "empty_pallet_weight_kg": {
      +      "type": "number"
      +    },
      +    "height_cm": {
      +      "description": "Loaded height",
      +      "type": "number"
      +    },
      +    "length_cm": {
      +      "type": "number"
      +    },
      +    "width_cm": {
      +      "type": "number"
      +    }
      +  },
      +  "type": "object"
      +}
    • addedInput schema / properties / shipment / properties / reason_for_export
      Added value: +{
      +  "description": "Printed on courier invoices (box 10)",
      +  "enum": [
      +    "sale",
      +    "sample",
      +    "gift",
      +    "repair_and_return",
      +    "returned_goods",
      +    "temporary_export"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / shipment / properties / waybill_number
      Added value: +{
      +  "description": "Air waybill or courier tracking number, printed in box 6",
      +  "type": "string"
      +}
    • addedInput schema / properties / sold_to
      Added value: +{
      +  "description": "Only if the buyer (sold to) is a different company from the consignee in 'buyer', e.g. a trading company buying for a factory: printed as BUYER (SOLD TO) on the invoice, the buyer on the proforma and sales contract",
      +  "properties": {
      +    "address": {
      +      "description": "Full address, lines separated by \\n",
      +      "type": "string"
      +    },
      +    "email": {
      +      "type": "string"
      +    },
      +    "name": {
      +      "type": "string"
      +    },
      +    "tax_id": {
      +      "description": "Tax / VAT / business registration number",
      +      "type": "string"
      +    },
      +    "tel": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "name"
      +  ],
      +  "type": "object"
      +}
  3. Added

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and non-destructive, so the description adds real value by stating 'Nothing is stored' and describing the return shape (each field as ok/warning/mismatch/info with a short reason). It does not say what happens with unparseable or empty draft text, which keeps it short of a 5.

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?

Front-loaded with the usage condition, and every sentence carries information. The long mid-sentence field enumeration is dense and reads as a run-on, but it is not padding.

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?

The output format, the no-storage guarantee, and the comparison source are all covered, which is the core of what an agent needs. Given 24 parameters including document-generation options, the description would be stronger if it noted that the generator-only parameters are optional context rather than inputs to the comparison.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Adds meaning beyond the 71%-covered schema by naming the concrete things compared (shipper, consignee to-order handling, notify, ports, vessel/voyage, packages, gross weight, CBM, freight prepaid/collect vs. Incoterm, marks, HS goods description, containers/seals, L/C number). It does not explain why unrelated parameters such as open_form, open_document, or language are present, leaving an agent to guess which of the 24 parameters actually matter here.

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?

States a specific verb (compare) and resource (B/L or AWB draft text vs. order data) with scope made explicit. It also anchors the field set to create_trade_documents, which distinguishes it from sibling document generators.

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 trigger is stated precisely: when the user has the draft text from forwarder/carrier plus order data, and before the original is issued. That timing constraint is exactly the kind of when-to-use guidance an agent needs.

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.

Resources