Skip to main content
Glama

ScorpTech x402 Tools

Invoice Total

invoice_total
Read-onlyIdempotent

Invoice math in exact cents. Each line is quantity × unit price, then an optional line discount, rounded half away from zero to the cent. An invoice-level discount comes off the subtotal, then tax is that percent of the discounted subtotal, rounded the same way. Returns every line, the subtotal, discount, tax, and total. A discount larger than the amount it applies to is rejected. Price: $0.002 USDC per successful call (x402, Solana). Same tool over HTTPS: POST https://scorptech.it.com/api/x402/v1/invoice-total

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": {
      "lines": "<lines>"
    },
    "name": "invoice_total"
  }
}

Input Schema

NameRequiredDescriptionDefault
linesYesEach line: qty, unitPrice, optional description and discountPct
taxPctNoTax percent of the discounted subtotal, default 0
discountPctNoInvoice discount percent off the subtotal, default 0
discountAmountNoInvoice discount as money, instead of discountPct

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.7/5.0
Behavior5/5

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

Annotations declare a safe, idempotent read, and the description goes well beyond them: exact rounding rule (half away from zero to the cent), validation behavior (discount larger than the amount it applies to is rejected), full return shape (every line, subtotal, discount, tax, total), and even the x402 pricing and HTTPS endpoint. That is unusually complete behavioral disclosure for a mutation-free calculator.

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?

Front-loaded with the core purpose, then computation rules, then return values, then the rejection edge case, then pricing/endpoint. Every sentence carries information an agent would otherwise have to guess; nothing is repeated from the schema or annotations.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/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 supplies the return payload explicitly, plus rounding, error conditions, and cost per call. Nothing material is missing for an agent to call this correctly and interpret the result.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds real semantic value by specifying the order of operations — line discount before invoice-level discount, tax applied to the discounted subtotal — which the schema alone does not convey. It does not clarify the interplay between discountPct and discountAmount or field units, keeping it below a 5.

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 — computing invoice totals in exact cents — and immediately details the computation model (line qty × unit price, line discount, subtotal discount, tax). An agent can distinguish it from the surrounding arithmetic and financial siblings (loan_amortization, npv_irr, markup_margin) without opening the 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 use case is unmistakable from the description (totaling invoices with discounts and tax), and the explicit rejection rule for oversized discounts gives a boundary condition. It doesn't name an alternative tool or say when to prefer another, but within this sibling set there is no close competitor to route against.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources