Certified Purchase Order Service — institutional backbone of the Tollbooth ecosystem. Registers MCP operators, collects certification fees via Bitcoin Lightning, and issues Schnorr-signed Nostr event certificates.
Tollbooth Authority is a domain-specific financial/cryptographic service with 6 tools. Most tools have descriptions and are registered via fastmcp, but the definitions lack rigor in several areas: (1) Input schemas are not visible in the provided code, tool registration is delegated to external wheel modules (tollbooth.authority and tollbooth.runtime), making schema validation impossible. (2) Tool names are verb-noun style (register_operator, purchase_credits, check_payment, check_balance, operator_status, certify_credits) which is acceptable, but descriptions vary widely in depth and actionability. (3) Parameter descriptions are minimal or absent in the visible code. (4) Output schemas are undocumented, no indication of what fields or structure each tool returns. (5) Error handling is not visible; recovery guidance is absent. The instructions in the FastMCP definition are comprehensive and educational, but tool-level definitions are thin. Since tool registration happens inside imported modules (AUTHORITY_TOOL_REGISTRY, register_authority_tools), the actual parameter schemas and return types are not visible in the provided source, forcing conservative scoring.
Core machine-to-machine tool. Deducts fee based on amount and TAX_RATE_PERCENT (default 2% with 10 sat minimum), returns Schnorr-signed Nostr event certificate.
Read-only balance check. No side effects.
Polls an invoice. Call after payment; safe to call multiple times. On settlement, credit balance is funded.
Registration info + Authority npub for certificate verification.
Creates a Lightning invoice. Call whenever balance is low. Returns invoice with checkoutLink for payment.
First step. Idempotent; safe to call again. Creates ledger entry with operator's Nostr npub.
Tool definitions are not visible in provided source code. Tool registration is delegated to external wheel modules (tollbooth.authority.register_authority_tools, tollbooth.runtime.register_standard_tools). Input schemas, parameter types, and return types cannot be verified.
Output schemas are completely undocumented. Tool descriptions in server.py do not specify what each tool returns (structure, field names, types). LLMs cannot plan downstream tool calls or extract referenced data without knowing the response format. Example: register_operator description says 'Returns your npub and a zero balance' but no schema is visible; purchase_credits says 'Returns a Lightning invoice with a checkoutLink' but field names and types are not defined.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | F | 27 | 2026-07-28+ | v2 |
| 2026-03-09 | D | 55 | - | v1 |
Parameter descriptions are minimal or missing in visible code. The inline parameter descriptions shown (e.g., 'Nostr public key (npub) for operator registration', 'Number of satoshis to pre-fund (e.g., 1000)') are adequate but brief. However, since actual tool registration is in external modules, parameter constraints (min/max, regex, enums) cannot be verified. Example: amount_sats has no documented range or constraints, LLMs could pass negative, zero, or arbitrarily large values without knowing valid bounds.
Error handling and recovery guidance are not visible. No indication of how tools fail, what error messages are returned, or what the LLM should do next. Example: certify_credits can fail with 'Insufficient credit balance' (mentioned in instructions) but no error schema or recovery tool guidance is documented. check_payment polling behavior is mentioned in instructions but not in tool definition.
Irreversible operations (certify_credits, register_operator) lack confirmation or dry-run support. certify_credits is marked as IRREVERSIBLE and deducts fees from balance on every call. No indication of a dry-run mode, confirmation step, or ability to preview the fee before committing. This violates pattern:confirmation-request for irreversible operations.
Cryptographic secrets (Nostr nsec) are mentioned as required environment variables (TOLLBOOTH_NOSTR_OPERATOR_NSEC) in instructions, but no details on how to validate that the secret is injected safely or how tool implementations protect against accidental exposure. Instructions say 'The nsec goes in TOLLBOOTH_NOSTR_OPERATOR_NSEC' but no pattern enforcement is visible.