Skip to main content
Glama
InvoicePDFs MCP Server

InvoicePDFs MCP Server

Official
by invoicepdfs

document_calculate

Compute invoice totals, discounts, tax, shipping and subtotal without rendering or storing the document, so checkout pages can display a final figure before commitment.

Instructions

Compute the totals for a document without storing or rendering it.

Returns the same breakdown — subtotal, discounts, tax, shipping, total — that a render would print, so a checkout page can show a figure before committing to one.

Input Schema

NameRequiredDescriptionDefault
dataYes
document_typeNoinvoice

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.2

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose one important trait: the operation neither persists nor renders (no side effects). It says nothing about error behavior on invalid tax data, whether a business profile is required, or whether validation rules (e-invoicing) are enforced during calculation — meaningful gaps for a compute tool with a compliance-heavy schema.

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?

Two sentences, zero waste, and the key constraint (no storage, no rendering) is front-loaded. The return-value summary arrives immediately after, in the order an agent needs it.

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?

There is no output schema, and the description compensates well by naming the returned breakdown (subtotal, discounts, tax, shipping, total). For a two-parameter tool it is nearly sufficient, but it omits the relationship between `document_type` and the computed figures and says nothing about failure modes.

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?

Top-level schema description coverage is reported at 0%: neither `data` nor `document_type` is documented at the top level, and the description adds no parameter guidance at all. It never mentions that `document_type` (invoice vs credit_note vs quote) affects how totals are computed, which is the single most important semantic the schema lacks.

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 states a specific verb and resource ("Compute the totals for a document") and immediately scopes it with "without storing or rendering it," which cleanly separates it from document_render and document_create. It does not explicitly name those siblings, nor does it clarify its relationship to document_validate, which is the nearest ambiguous alternative.

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?

Usage context is concrete: "so a checkout page can show a figure before committing to one" tells the agent this is a pre-commit preview path. There are no explicit exclusions or named alternatives (e.g., when to call document_validate or document_render instead), so it falls short of the 5 bar.

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