Skip to main content
Glama

Calculate an invoice due date

calculate_invoice_due_date
Read-only

Calculate the date an invoice is due from its date and the payment terms (on receipt, a number of days, end of month, days after month end, a day of the following month, or the statutory 30-day default), with the weekday and whether the terms exceed the statutory limit.

Input Schema

NameRequiredDescriptionDefault
daysNoDays, for net and net-end-of-month terms
termsYesThe payment terms
customerNo
dayOfMonthNoDay, for day-of-following-month terms
invoiceDateYesInvoice date, or the day the customer received it (YYYY-MM-DD)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, openWorldHint=false, and destructiveHint=false, so safety is covered. The description adds useful behavioral context by stating that the result includes the weekday and whether the terms exceed the statutory limit.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single front-loaded sentence with no filler. The parenthetical list of terms is dense but directly necessary for understanding the calculation inputs.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a calculator with no output schema, the description partially explains return values by mentioning the due date, weekday, and statutory-limit flag. However, it does not describe the output format or the effect of the customer parameter, leaving a meaningful gap in a 5-parameter tool.

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 description coverage is high at 80%, so a baseline of 3 applies. The description goes beyond the schema by mapping payment-term enum values to natural-language meanings and by noting the statutory 30-day default, though it does not explain the customer parameter.

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: 'Calculate the date an invoice is due from its date and the payment terms.' It clearly distinguishes this due-date calculation from sibling invoice tools such as create_invoice, send_invoice, and mark_invoice_paid.

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?

The purpose implies when the tool is useful, but there is no explicit when-to-use or when-not-to-use guidance. It does not name alternatives such as calculate_late_payment_interest or explain that this tool should be used before creating or sending an invoice.

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.