Skip to main content
Glama
Legacy Billing MCP Server
by besimademi

Calculate invoice

calculate_invoice
Read-onlyIdempotent

Calculate an order's subtotal, tier discount, 18% VAT, shipping, and total from customer ID and line items, routing through the legacy, shadow, or modern billing implementation.

Instructions

Calculate subtotal, tier discount, 18% VAT, shipping and total for an order. Routed through the strangler facade (legacy, shadow or modern implementation).

Input Schema

NameRequiredDescriptionDefault
itemsYesOrder lines
customerIdYesCustomer id from list_customers

Output Schema

NameRequiredDescriptionDefault
taxYes
totalYes
discountYes
shippingYes
subtotalYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint and idempotentHint true, so the safety profile is covered. The description adds genuine value by disclosing the calculation rules (18% VAT, tier discount, shipping), but the routing sentence leaves the agent unable to tell how the legacy/shadow/modern implementation is selected or whether the result could vary by route. Rounding and currency handling are also unstated.

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?

Two tight sentences, with the computed components front-loaded so the agent learns the output shape immediately. The trailing parenthetical about the strangler facade is slightly cryptic and could have been clearer or cut, but nothing is padded.

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?

With an output schema present and full parameter coverage, the description only needs to explain the domain logic, which it largely does via the VAT/discount/shipping list. The gap is the unexplained routing across legacy, shadow and modern implementations: an agent cannot know which one it hit or whether results should be compared, which is material for a money-calculation tool.

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%, and the schema itself documents customerId, items, sku, price in EUR, and the legacy negative-quantity behaviour. The description adds nothing about parameter meaning beyond that, so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb (calculate) and an explicit output set: subtotal, tier discount, 18% VAT, shipping, total for an order. That is far more than a restatement of the name. It does not, however, differentiate itself from siblings such as compare_implementations, which the mention of legacy/shadow/modern facades implicitly gestures at.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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

There is no statement of when to call this rather than compare_implementations, nor any prerequisite or exclusion. The 'strangler facade' sentence hints that an implementation is chosen somewhere, but it never tells the agent whether this call is the right one for comparing behaviour across implementations or is merely the production path.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.