Skip to main content
Glama

Calculate invoice

calculate_invoice
Read-onlyIdempotent

Compute invoice totals from line items in JPY, USD, or EUR, applying floored tax per rate and returning JSON without creating files.

Instructions

Calculate an invoice using integer minor units. Tax is floored once per rate. Returns JSON; creates no files.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemsYes
notesNo
issuerYesInvoice issuer; registrationNumber is an optional Japanese registration number.
dueDateYes
currencyYes
customerYesThe customer receiving the invoice.
issueDateYes
invoiceNumberYes
outputFilenameNoOptional .xlsx filename, never a path. Defaults to invoice.xlsx.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.5/5.0
Behavior4/5

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

Annotations already cover readOnly/idempotent/non-destructive/closed-world, yet the description still adds real behavioral value: results are computed 'using integer minor units', tax is 'floored once per rate', output is JSON, and no files are written. That rounding rule and the side-effect disclaimer go beyond the annotations, though it never resolves what outputFilename does if no file is created.

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?

Three short sentences, front-loaded with the core action and the computation model, then the return/side-effect facts. Every clause carries information and 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?

For a calculation tool with no output schema, the description should at least sketch the returned JSON (totals, tax breakdown, per-item figures); instead it says only 'Returns JSON'. Combined with the 33% parameter coverage and the unexplained outputFilename, an agent knows how to invoke it but not confidently what it receives back.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is only 33% across 9 parameters (7 required, nested objects, one enum), so the description carries a heavy burden it does not meet. It mentions no parameter names; 'integer minor units' is ambiguous and arguably tensions with the schema's unitPrice note ('Price in major units'), and the currency enum, date formats, item limits, and outputFilename semantics are left entirely to the schema.

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?

States a specific verb+resource ('Calculate an invoice') and adds differentiating scope in 'creates no files'/'Returns JSON', which implicitly separates it from the create_invoice sibling that presumably writes output. It stops short of naming the sibling or stating the contrast explicitly, so the differentiation is inferred rather than declared.

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?

There is no explicit when-to-use or when-not-to-use guidance, and the sibling create_invoice is never named. The clause 'creates no files' implies this is the pure-computation option versus a file-producing one, but the agent must infer that routing decision itself.

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

Deploy Server

Other Tools