Skip to main content
Glama

Build a days-to-pay and dispute-rate table from your own invoices

chemical_trade_credit_payment_days
Read-onlyIdempotent

Build a days-to-pay and dispute-rate table from YOUR OWN trade-credit invoices, by customer type and by freight-surcharge line (made for small chemical makers and distributors; works for any seller). Send up to 400 invoice rows: customer_type and surcharge_line (your own short labels, e.g. 'distributor', 'fuel'), invoice_date, paid_date (leave out if still open), optional terms_days, disputed true/false. Get back, per customer type, per surcharge line and per pair: invoices, paid, open, median and 90th-percentile days to pay, mean, how many paid or are now past their terms, and the dispute rate with a 95% range, plus the sources (your rows, with the label and as-of date you gave), the rule used, and a signed record. Free. Arithmetic only: no model, no outside lookup, nothing stored. Do NOT send customer names, invoice numbers or amounts: those fields are refused, and keep names out of the labels too (labels are your responsibility). There is NO pooled industry benchmark yet (nothing is stored, so nothing is pooled). It does not give credit, legal, tax or collections advice and cannot say why an invoice was paid late or disputed.

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": {
      "invoices": "<invoices>"
    },
    "name": "chemical_trade_credit_payment_days"
  }
}

Input Schema

NameRequiredDescriptionDefault
as_ofNoDate the rows were taken (YYYY-MM-DD). Open invoices are aged to this date. Default today (UTC).
labelNoOptional name of this set of rows (e.g. 'Q3 invoices'), echoed back as a source.
invoicesYes
terms_daysNoDefault payment terms for rows that have none.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the annotations, the description discloses that the tool is free, uses arithmetic only, performs no model call or outside lookup, stores nothing, and refuses sensitive invoice fields. It also explains that labels are the user's responsibility and that no pooled industry benchmark exists because nothing is stored.

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 front-loaded with the core action and data shape, then moves into output details and constraints. It is appropriately detailed for a complex analytical tool, though some points such as 'nothing stored' and the lack of a pooled benchmark are repeated.

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?

For a tool with no output schema and multiple input fields, the description explains what goes in, what comes back, grouping dimensions, derived metrics, sources, rules, and limitations. It is complete enough for an agent to call it correctly without needing the output schema.

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

Parameters5/5

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

The description adds substantial meaning beyond the schema: it explains that customer_type and surcharge_line are the user's own short labels, that paid_date should be omitted for open invoices, that terms_days is optional, and that disputed is true/false. It also reinforces privacy constraints by saying names and amounts are refused and should not appear in labels.

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 states a specific verb and resource: build a days-to-pay and dispute-rate table from the user's own trade-credit invoices, grouped by customer type and surcharge line. It clearly scopes the tool to arithmetic summarization of invoice rows rather than credit advice or pooled benchmarking.

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?

It gives clear usage context, including the target audience, acceptable invoice fields, the 400-row limit, and explicit prohibitions on customer names, invoice numbers, and amounts. It does not name alternative tools or provide explicit when-not-to-use guidance beyond the data and advice limitations.

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