Skip to main content
Glama

Calculate Invoice Due Date

calculate_invoice_due_date
Read-onlyIdempotent

Work out an invoice due date from its payment terms (due on receipt, Net 7/10/14/15/30/45/60/90, EOM, Net 30 EOM, or a custom number of days), and the date the cash actually lands after a late payment and the payment method clearing time (card 0, wire 1, ACH 2, check 7 business days). Weekend dates roll to Monday by default. Same math as revexos.com/invoice-due-date-calculator.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
termsYes
days_lateNoHow many days after the due date the client usually pays. Default 0.
custom_daysNocustom terms: days after the invoice date.
invoice_dateYesInvoice date, YYYY-MM-DD.
roll_weekendsNoMove weekend dates to Monday. Default true.
payment_methodNoDefault ach.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/closed-world, so the bar is lower, yet the description still discloses real behavior: weekend dates roll to Monday by default, clearing times per payment method, and the terms it accepts. It does not state what the response contains, which is the only notable omission.

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?

A single dense sentence, but it is front-loaded with the core purpose and the reference URL is a small, tolerable addition. No filler sentences, though the sentence is long enough to be slightly hard to parse.

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 6-parameter computation tool with no output schema, the description covers inputs, defaults, and the business rules that govern the computation well. It only omits what the returned values look like (due date vs. cash date fields), which is a minor gap.

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?

Schema coverage is already 83%, but the description meaningfully enriches several fields: it expands the terms enum into human phrasing (receipt, Net 7/10/.../90, EOM, Net 30 EOM, custom), supplies the payment-method clearing delays (card 0, wire 1, ACH 2, check 7 business days), and confirms the weekend-roll default.

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 and resource (calculate an invoice due date) and enumerates the exact terms it understands, which singles it out from siblings like calculate_late_payment_interest and calculate_proration. An agent can pick this tool without opening the schema.

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?

Gives clear context: compute the due date from payment terms and also the date cash lands after late payment and clearing time. It does not name an alternative or an explicit when-not condition, so it stops short of full routing guidance.

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