Skip to main content
Glama
bookkeeping-mcp

bookkeeping-mcp

by mubasher1111

Calculate invoice totals

calculate_invoice
Read-onlyIdempotent

Computes every amount on an invoice without saving it: line and invoice discounts before tax, sales tax by rate, delivery charges, amount paid, balance due, and total in words.

Instructions

Works out every amount on an invoice without saving anything: line and invoice discounts (applied before tax), sales tax by rate, delivery charges, amount paid, balance due, and the total in words (English and Urdu for PKR).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "invoice": "<invoice>"
    },
    "name": "calculate_invoice"
  }
}

Input Schema

NameRequiredDescriptionDefault
invoiceYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, and closed-world, so the safety profile is covered. The description still adds real value beyond that: the computation ordering (discounts applied before tax), the currency-dependent words rendering (English and Urdu for PKR), and the fact that nothing is persisted. Rounding and validation-error behavior remain undisclosed.

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?

A single front-loaded sentence with the non-persistence guarantee first and the computed-fields list after; every clause carries information and nothing is repeated from the title or schema.

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?

With no output schema, the description usefully enumerates the return values an agent will receive, which is the main thing it must do for a pure computation tool. Minor gaps remain around rounding/precision, currency conversion, and how invalid input (e.g. zero items) is reported.

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?

Reported schema description coverage is 0%, so the description must carry the burden; it does explain the calculation-relevant inputs (line vs invoice discounts, tax by rate, delivery charges, amount paid) and their ordering, which is genuinely useful. However, it says nothing about the many identity/metadata fields (seller, buyer, payment, notes, dueDate, accentColor) or the invoice-level discount type enum, so it only partially compensates.

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 and resource ('works out every amount on an invoice') and enumerates exactly which figures are computed (line/invoice discounts, tax, delivery, amount paid, balance due, total in words). The phrase 'without saving anything' separates it from the persistence-oriented siblings like create_invoice, so an agent can route without opening either schema.

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 'without saving anything' clause makes the use context clear: previewing or computing totals without committing an invoice. It does not explicitly name create_invoice as the alternative when the agent does want to persist, so the routing guidance is implied rather than spelled out.

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