Skip to main content
Glama

BRAINIAC Trade Finance & Receivables Intelligence

Match trade finance documents

trade-finance_document-match
Read-onlyIdempotent

Match supplied invoices to contracts, letters of credit, and trade documents by id, amount, and parties without inventing missing links. Price $0.05 USDC. POST /api/v1/trade-finance/document-match. An unpaid call returns the x402 payment terms and does not run.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "trade-finance_document-match"
  }
}

Input Schema

NameRequiredDescriptionDefault
csvNocsv, string, length 0 to 200000. Optional.
asOfNoasOf, string, length 0 to 40. Optional.
fileNofile, object. Optional.
jsonNojson, string, length 0 to 200000. Optional.
textNotext, string, length 0 to 200000. Optional.
partiesNoparties, array. Optional.
invoicesNoinvoices, array. Optional.
contractsNocontracts, array. Optional.
documentsNodocuments, array. Optional.
worldBankNoworldBank, object. Optional.
assignmentsNoassignments, array. Optional.
discountRatePctNodiscountRatePct, number, from 0 to 100. Optional.
lettersOfCreditNolettersOfCredit, array. Optional.

Output Schema

NameRequiredDescriptionDefault
itemsNoitems. Array.
statusNostatus. String.
findingsNofindings. Array.
checkedAtNocheckedAt. String.
limitationsNolimitations. Array.
invoiceCountNoinvoiceCount. Number.
matchedCountNomatchedCount. Number.
publicSourcesNopublicSources. Array.
amountInventedNoamountInvented. Boolean.
apiKeyRequiredNoapiKeyRequired. Boolean.
creditDecisionNocreditDecision. Boolean.
paidProviderUsedNopaidProviderUsed. Boolean.
financingApprovedNofinancingApproved. Boolean.
discrepancyInventedNodiscrepancyInvented. Boolean.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, non-destructive, open-world behavior, so the safety profile is covered. The description adds genuinely new context not in annotations: a $0.05 USDC price, the POST endpoint, and the x402 gating rule that an unpaid call returns payment terms and does not execute. The 'without inventing missing links' clause also sets expectations about conservative output, though result shape and partial-match handling are left to the output schema.

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?

Three short sentences, with the core matching behavior front-loaded before pricing and transport details. Every sentence carries information (capability, cost, payment gate), though the raw endpoint path is somewhat mechanical filler for an agent.

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 a rich output schema that documents return values, the description's job is to explain capability, cost, and invocation prerequisites, all of which it does. The missing detail about how optional arrays combine is a modest gap against 13 nested, all-optional parameters, but the essentials for correct invocation are present.

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% and all 13 parameters are individually documented, so the schema carries the burden. The description only gestures at the inputs by naming id, amount, and parties as matching dimensions, without explaining the roles of asOf, discountRatePct, worldBank, or which arrays must be supplied together. Baseline 3 is appropriate.

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?

States a specific verb (match) plus the exact resources it correlates (invoices, contracts, letters of credit, trade documents) and the matching keys (id, amount, parties). It also adds a scope constraint, 'without inventing missing links', which separates it from loose-consistency siblings. It stops short of naming any sibling tool explicitly, so it lands at 4 rather than 5.

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

Usage Guidelines3/5

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

Usage is only implied: an agent can infer it should call this when it has a set of invoices and counterparty documents to reconcile. There is no explicit when-to-use versus when-not guidance and no pointer to the many sibling analysis tools (discrepancy-detect, party-consistency, assignment-conflict). The only hard rule given is the payment condition.

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