Skip to main content
Glama

Invoice totals calculator

tradepilot_service_invoice_totals_calculate
Destructive

Calculate subtotal, per-line tax, discount and deposit from supplied invoice line items. Per-line tax percent (not a single flat rate), discount applied to the pre-tax subtotal, deposit as a percent-of-total or fixed amount clamped to the total. Pure arithmetic; does not create, store or send an invoice. Price: 0.01 USD. Payment requires explicit wallet authorization.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputYes
result_expiresNo
idempotency_keyNo
result_signatureNo
payment_signatureNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

The description goes well beyond the annotations: it discloses the arithmetic-only nature, the per-line tax semantics, discount-before-tax ordering, deposit clamping, the 0.01 USD price, and the requirement for explicit wallet authorization. This is far richer behavioral context than the raw annotations provide.

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 compact and front-loaded: the core purpose appears in the first sentence, followed by precise calculation rules and side-effect/payment disclosure. Every sentence adds distinct value, with no filler or repetition.

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 tool with no output schema, the description adequately indicates the calculated outputs (subtotal, per-line tax, discount, deposit) and discloses pricing/authorization. It could be more complete by describing the return structure or clarifying the generic protocol parameters, but the essential invocation context is present.

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?

With 0% schema description coverage, the description carries the burden of explaining parameters. It effectively explains line_items, tax_percent, discount_percent, deposit_type, and deposit_value semantics. However, it does not clarify the protocol parameters (result_expires, idempotency_key, result_signature, payment_signature), though their names are partially self-explanatory.

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 opens with a specific verb and resource: 'Calculate subtotal, per-line tax, discount and deposit from supplied invoice line items.' It clearly distinguishes this from invoice creation/extraction siblings by explicitly stating it 'does not create, store or send an invoice.' The formula details further remove ambiguity about what the tool does.

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?

The description makes clear this is for calculating totals from supplied line items, and explicitly excludes invoice creation/storage/sending. It does not name an alternative sibling, but the context is strong enough for an agent to know when this tool is appropriate.

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