Check a public tariff receipt
Quote published telecom prices and verify the first two bills against a pinned tariff using billd’s anonymous MCP endpoint.
A comparison service can quote a published plan for a particular start date. A customer can check the quoted line amounts, net, VAT and gross using the same price book. Both tools work without an account or token.
Publish a tariff
Set TELCO_PUBLIC_PLANS on billd to a comma-separated list of exact plan references from TELCO_PRICEBOOKS, then restart billd. For example, TELCO_PUBLIC_PLANS=example-fibre@2026-11/glasfaser-1000 publishes one fibre plan. The default list is empty. A reference to an unloaded plan fails startup. Plans in the same book each require an explicit entry.
Connect a server-side MCP client to http://127.0.0.1:9402/mcp/public. Initialization lists the published references. To serve remote clients, route the exact path through HTTPS with the upstream Host set to localhost. The service accepts requests without an Origin header and rejects browser origins. Keep private MCP and billing routes on the operator network. The Desk proxy blocks this path. MCP Streamable HTTP transport
For a dedicated Caddy hostname, point DNS at the proxy and use the following site block. Replace the hostname and upstream service address to match the deployment. Caddy terminates TLS and routes only the public checker. Leave the Origin header intact.
checks.example.net {
handle /mcp/public {
reverse_proxy billd:9402 {
header_up Host localhost
}
}
handle {
respond 404
}
}A remote MCP client connects to https://checks.example.net/mcp/public. Keep request-body logging disabled on the proxy. billd suppresses the SDK’s raw request traces, including when service debug logging is enabled.
Replay the figures
- Call
quote_public_planwith{"plan":"example-fibre@2026-11/glasfaser-1000","start":"2026-11-15"}. The quote explains each charge and follows discounts through their end dates. - Save
receipts.firstorreceipts.next. Each receipt pins the tariff reference and book hash and carries the start date, billing cycle, ordered line amounts and totals. Amounts are EUR strings with two decimal places. - Pass that object as the arguments to
check_public_receipt. A match returns{"scope":"published_tariff_arithmetic","matches":true,"mismatches":[]}. A difference identifies the field with a JSON Pointer such as/lines/0and gives the expected value. A line-count difference gives the expected count.
The result covers the first or following month of a standard tariff quote. An issued invoice with usage, individual discounts or adjustments needs its own authenticated billing replay. Submit just the receipt fields. The checker accepts 16 KiB per request, runs up to two calculations at once and returns the tool error quote.busy when both slots are occupied. Each check uses the published book currently loaded by billd. Preserve the book version when sharing a receipt.