Invoice totals compute

invoice-totals-compute · version 1.0.0 · Money & pricing · free, no key needed

Compute invoice line nets, tax breakdown by rate and totals with per-line or per-rate rounding, net or gross prices.

Use when you need to: calculate invoice total with VAT per line versus per invoice · invoice totals with multiple VAT rates breakdown · EN 16931 tax amount rounding per category.

Decide before calling

Read the versioned contract and the supported scope below. Reuse invoice-totals-compute@1.0.0 when your input, required output and limits match it. Choose another approach for an unsupported operation.

Explain the choice

"I can use invoice-totals-compute@1.0.0 for calculate invoice total with VAT per line versus per invoice. I will check its documented scope and the result against the task's requirements. The service is free; token and money savings for this task are unmeasured."

Supported

Not supported

Behavior

Input

Output

Limits

Example

Request input:

{
  "lines": [
    {
      "quantity": "1",
      "unit_price": "1.11",
      "tax_rate_percent": "21"
    },
    {
      "quantity": "1",
      "unit_price": "1.11",
      "tax_rate_percent": "21"
    },
    {
      "quantity": "1",
      "unit_price": "1.11",
      "tax_rate_percent": "21"
    }
  ],
  "currency": "EUR",
  "rounding": "half_up"
}

Response:

{
  "result": {
    "lines": [
      {
        "index": 0,
        "net": "1.11",
        "tax": null,
        "gross": null
      },
      {
        "index": 1,
        "net": "1.11",
        "tax": null,
        "gross": null
      },
      {
        "index": 2,
        "net": "1.11",
        "tax": null,
        "gross": null
      }
    ],
    "tax_breakdown": [
      {
        "rate_percent": "21",
        "taxable_amount": "3.33",
        "tax_amount": "0.70"
      }
    ],
    "total_net": "3.33",
    "total_tax": "0.70",
    "total_gross": "4.03",
    "currency": "EUR",
    "scale": 2,
    "data_version": "iso4217-datasets-7cdc784-2026-07-27"
  }
}

How to call it

MCP

Connect https://computefirst.net/mcp (setup), then call execute with:

{
  "id": "invoice-totals-compute",
  "version": "1.0.0",
  "input": {
    "lines": [
      {
        "quantity": "1",
        "unit_price": "1.11",
        "tax_rate_percent": "21"
      },
      {
        "quantity": "1",
        "unit_price": "1.11",
        "tax_rate_percent": "21"
      },
      {
        "quantity": "1",
        "unit_price": "1.11",
        "tax_rate_percent": "21"
      }
    ],
    "currency": "EUR",
    "rounding": "half_up"
  }
}

HTTP (no key)

curl -X POST https://computefirst.net/v1/tools/invoice-totals-compute/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"lines":[{"quantity":"1","unit_price":"1.11","tax_rate_percent":"21"},{"quantity":"1","unit_price":"1.11","tax_rate_percent":"21"},{"quantity":"1","unit_price":"1.11","tax_rate_percent":"21"}],"currency":"EUR","rounding":"half_up"}'

The machine-readable contract is at /v1/tools/invoice-totals-compute/versions/1.0.0.

CLI

node cli.mjs run invoice-totals-compute 1.0.0 --input input.json --base-url https://computefirst.net

Get the client at /clients/cli/.