Skip to main content
Glama

Reconcile B2B Wholesale Net-15/30/60 Deposits & Credit Notes

revclamp_reconcile_b2b_net_terms
Read-onlyIdempotent

Reconcile B2B wholesale Net-15, Net-30, and Net-60 invoice deposits, partial payments, and credit notes using exact integer minor-unit (EUR/USD cent) arithmetic with zero IEEE-754 floating-point drift. Executes as a pure, stateless, read-only financial reconciliation function. Returns structuredContent containing ok, mode, statelessEphemeralAudit, tenantId, and reconciliation (state, status, fulfillmentHold, releaseHoldAction, requiredDepositCents, remainingBalanceCents, creditDueCents, overpaidWarning, orderTag). Use this tool for B2B wholesale order deposit gating and Net-terms balance calculation; use revclamp_validate_eu_vat_vies for cross-border EU VAT number validation.

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": "revclamp_reconcile_b2b_net_terms"
  }
}

Input Schema

NameRequiredDescriptionDefault
demoNoOptional sandbox flag (boolean).
orderIdNoB2B wholesale order or invoice identifier (e.g. 'gid://shopify/Order/908812' or 'ORD-2026-9088', default: 'ord_local_b2b_01', max 64 chars).
toleranceCentsNoOptional rounding/FX reconciliation tolerance in integer cents (valid range: 0 to min(500, 1% of totalOrderCents), default: 0).
creditNoteCentsNoOptional post-invoice credit notes or return adjustments in integer cents (valid range: 0 to totalOrderCents, default: 0; singular alias for creditNotesCents).
orderTotalCentsNoAlias for totalOrderCents: gross invoice total in positive integer minor currency units / cents (must be > 0).
paidAmountCentsNoRequired cumulative amount collected from the buyer in non-negative integer cents (e.g. 75000 for 750.00 EUR; must be >= 0).
totalOrderCentsNoGross invoice total in positive integer minor currency units / cents (e.g. 250000 for 2,500.00 EUR; must be > 0).
creditNotesCentsNoOptional post-invoice credit notes or return adjustments in integer cents (valid range: 0 to totalOrderCents, default: 0; plural alias for creditNoteCents).
paymentTermsDaysNoOptional B2B net payment terms maturity window in integer days (valid range: 1 to 180, e.g. 15, 30, 45, 60, 90; default: 30).
invoiceIssuedAtSecNoOptional invoice issuance Unix epoch timestamp in seconds (positive integer; computes dueAtSec = invoiceIssuedAtSec + paymentTermsDays * 86400).
requiredDepositCentsNoOptional explicit upfront deposit threshold in integer cents (valid range: 0 to effectiveTotalCents). Overrides requiredDepositPercent when provided.
requiredDepositPercentNoOptional upfront deposit percentage required before releasing warehouse fulfillment hold (valid range: 0 to 100, default: 30 i.e. 30% upfront deposit).
daysElapsedSinceInvoiceNoOptional elapsed integer days since invoice issuance (valid range: 0 to 3650, default: 0).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • changedInput schema / properties / daysElapsedSinceInvoice / description
      Previous value: -"Optional elapsed integer days since invoice issuance (valid range: 0 to 3650, default: 5)."New value: +"Optional elapsed integer days since invoice issuance (valid range: 0 to 3650, default: 0)."
    • addedInput schema / properties / invoiceIssuedAtSec
      Added value: +{
      +  "description": "Optional invoice issuance Unix epoch timestamp in seconds (positive integer; computes dueAtSec = invoiceIssuedAtSec + paymentTermsDays * 86400).",
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • changedInput schema / properties / paymentTermsDays / description
      Previous value: -"Optional B2B net payment terms maturity window in integer days (allowed values: 15, 30, or 60 for Net-15, Net-30, or Net-60; default: 30)."New value: +"Optional B2B net payment terms maturity window in integer days (valid range: 1 to 180, e.g. 15, 30, 45, 60, 90; default: 30)."
    • removedInput schema / properties / paymentTermsDays / enum
      Removed value: -[
      -  15,
      -  30,
      -  60
      -]
    • addedInput schema / properties / paymentTermsDays / maximum
      Added value: +180
    • addedInput schema / properties / paymentTermsDays / minimum
      Added value: +1
  2. Changed1 schema field changed
    • removedInput schema / required
      Removed value: -[
      -  "paidAmountCents"
      -]
  3. Changed9 schema fields changed
    • addedInput schema / properties / creditNoteCents / minimum
      Added value: +0
    • addedInput schema / properties / creditNotesCents / minimum
      Added value: +0
    • addedInput schema / properties / orderTotalCents / minimum
      Added value: +1
    • addedInput schema / properties / paidAmountCents / minimum
      Added value: +0
    • addedInput schema / properties / paymentTermsDays / enum
      Added value: +[
      +  15,
      +  30,
      +  60
      +]
    • addedInput schema / properties / requiredDepositCents / minimum
      Added value: +0
    • addedInput schema / properties / requiredDepositPercent / maximum
      Added value: +100
    • addedInput schema / properties / requiredDepositPercent / minimum
      Added value: +0
    • addedInput schema / properties / totalOrderCents / minimum
      Added value: +1
  4. Changed8 schema fields changed
    • addedInput schema / properties / daysElapsedSinceInvoice
      Added value: +{
      +  "description": "Optional elapsed integer days since invoice issuance (valid range: 0 to 3650, default: 5).",
      +  "maximum": 3650,
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • addedInput schema / properties / demo
      Added value: +{
      +  "description": "Optional sandbox flag (boolean).",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / orderId / description
      Previous value: -"Required B2B wholesale order or invoice identifier (e.g. 'gid://shopify/Order/908812' or 'ORD-2026-9088', max 64 chars)."New value: +"B2B wholesale order or invoice identifier (e.g. 'gid://shopify/Order/908812' or 'ORD-2026-9088', default: 'ord_local_b2b_01', max 64 chars)."
    • addedInput schema / properties / orderTotalCents
      Added value: +{
      +  "description": "Alias for totalOrderCents: gross invoice total in positive integer minor currency units / cents (must be > 0).",
      +  "type": "integer"
      +}
    • changedInput schema / properties / requiredDepositCents / description
      Previous value: -"Optional explicit upfront deposit threshold in integer cents (valid range: 0 to totalOrderCents). Overrides requiredDepositPercent when provided."New value: +"Optional explicit upfront deposit threshold in integer cents (valid range: 0 to effectiveTotalCents). Overrides requiredDepositPercent when provided."
    • addedInput schema / properties / toleranceCents
      Added value: +{
      +  "description": "Optional rounding/FX reconciliation tolerance in integer cents (valid range: 0 to min(500, 1% of totalOrderCents), default: 0).",
      +  "maximum": 500,
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • changedInput schema / properties / totalOrderCents / description
      Previous value: -"Required gross invoice total in positive integer minor currency units / cents (e.g. 250000 for 2,500.00 EUR; must be > 0)."New value: +"Gross invoice total in positive integer minor currency units / cents (e.g. 250000 for 2,500.00 EUR; must be > 0)."
    • changedInput schema / required
      Previous value: -[
      -  "orderId",
      -  "totalOrderCents",
      -  "paidAmountCents"
      -]New value: +[
      +  "paidAmountCents"
      +]
  5. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description adds real value beyond them: pure stateless execution, zero IEEE-754 drift, and an enumeration of the structuredContent keys including fulfillmentHold and releaseHoldAction. It does not explain how those hold fields should be interpreted or when ok would be false, which keeps it below 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?

Three sentences, front-loaded with purpose, then behavior, then routing. The return-field enumeration is long but earns its place since there is no output schema; the only mild waste is the redundant 'exact integer minor-unit (EUR/USD cent) arithmetic with zero IEEE-754 floating-point drift' phrasing.

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 13-parameter, output-schema-less calculation tool it covers purpose, statelessness, and the return shape well enough to invoke correctly. What is missing is interpretation guidance for the returned status/hold fields and failure conditions, which is the main residual gap.

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?

Schema description coverage is 100%, so the schema documents every one of the 13 parameters including ranges, defaults, and alias relationships (creditNoteCents vs creditNotesCents, totalOrderCents vs orderTotalCents). The description correctly leaves parameter detail to the schema and instead frames the computation those parameters feed.

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 opening sentence names a specific verb (Reconcile) and a precise resource (B2B wholesale Net-15/30/60 invoice deposits, partial payments, credit notes), plus the mechanism (exact integer minor-unit arithmetic). It is immediately distinguishable from siblings like revclamp_lint_dispute_evidence or revclamp_audit_revenue_leakage.

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 states the use case explicitly ('B2B wholesale order deposit gating and Net-terms balance calculation') and routes one adjacent need to revclamp_validate_eu_vat_vies. It stops short of stating exclusions such as non-B2B or non-Net-terms cases, but the primary selection condition is unambiguous.

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