Skip to main content
Glama

PaidPilot Invoice Tools

late_fee_calc

Read-onlyIdempotent

Calculate the late fee on one overdue invoice: flat fee, monthly % or annual %, simple or compounding, with optional grace days. Returns days late, the fee, the new total and a line to paste on the invoice. Use payment_terms_check instead to work out when an invoice is due. Not legal advice; it does not look up state caps. Pure calculation: no network request, nothing is sent or stored. Costs $0.01 USDC per call via x402 (payment goes in _meta["x402/payment"]); invalid input returns an error and is not charged.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
as_ofNoDate paid, or the date to calculate to, YYYY-MM-DD (default: today, UTC)
stateNoUS state (2-letter) for the legal note
amountYesUnpaid invoice amount
currencyNoISO-4217, default USDUSD
due_dateYesInvoice due date, YYYY-MM-DD
fee_typeYesflat = one fixed fee; monthly_percent e.g. 1.5; annual_percent e.g. 18
flat_feeNoFlat fee; required for fee_type=flat, optional one-time add-on otherwise
grace_daysNoDays after the due date before any fee applies
compoundingNofalse = simple interest (default); true = compounds (monthly: per 30 days; annual: daily)
rate_percentNoRate for monthly_percent / annual_percent

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?

Annotations already declare readOnly/idempotent/non-destructive/closed-world, and the description adds context those fields cannot carry: pure in-process calculation with no network request and nothing sent or stored, a $0.01 USDC x402 charge with the payment location (_meta["x402/payment"]), and the billing behavior on invalid input (error, not charged). This is exactly the kind of pricing and side-effect disclosure an agent needs before invoking.

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?

Front-loads what the tool does, then return values, then the sibling alternative, then caveats and cost. Every sentence carries distinct information (outputs, alternative, legal scope, purity, price); no filler or repetition.

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?

Even without an output schema, the description names the return payload (days late, fee, new total, invoice line), covers the payment requirement and error/billing behavior, and disclaims legal-cap lookup. Nothing needed to call a 10-parameter calculation tool correctly is missing.

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%, so the schema already documents all ten parameters including fee_type enum semantics, compounding behavior and grace_days. The description restates the fee-structure options but adds no syntax or format detail beyond what the schema provides; baseline 3 is appropriate when the schema does the heavy lifting.

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 (calculate) and resource (late fee on one overdue invoice) and enumerates the supported fee structures (flat, monthly %, annual %, simple/compounding, grace days). It explicitly differentiates from the sibling payment_terms_check, so an agent can route correctly 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 Guidelines5/5

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

Gives an explicit alternative and the condition that selects it: 'Use payment_terms_check instead to work out when an invoice is due.' It also adds a when-not caveat ('Not legal advice; it does not look up state caps'), which prevents misuse for statutory-cap questions.

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