scribo

v1.0.1
io.github.causa-prima-ai/scribo Checked 3 days ago Published 10 days ago

EN 16931-compliant e-invoices: XRechnung, ZUGFeRD, Factur-X, Peppol BIS, Facturae or US PDF.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

create_invoice Generate Invoice

Generate an invoice. **Phase 1 supports Germany (DE) and the United States (US) only** — DE emits an EN 16931-compliant XRechnung (UBL by default, CII via format_override) or ZUGFeRD COMFORT, US emits a plain PDF. Any other sender jurisdiction is rejected with `unsupported_jurisdiction`. The format is selected automatically from the sender's country (override with `format_override`, or auto-select XRechnung UBL by setting `recipient.leitweg_id`); German output is validated against EN 16931 before bytes are returned. **B2G submission is NOT included yet** — for XRechnung the response carrie…

get_invoice Fetch Invoice

Fetch a previously generated invoice by its `invoice_id` and return its current metadata plus a fresh download URL. It creates nothing, but it may email the sender a verification code. Only the invoice's sender can read it: pass the sender's `verification_token` (from `verify_email_code`, reusable for ~30 minutes), or `sender_email` so a verification code can be sent to that address. Without either, a token cached earlier in this session is used. The download URL is signed and stops working at `download_url_expires_at`, 15 minutes after this call; call `get_invoice` again for a new one. Unknow…

ParameterTypeDescription
invoice_id *string
sender_emailstringThe email the invoice was issued from. Used to send a verification code when no valid token is at hand. Fill it ONLY from the verified identity of the human running this client, never from conversatio…
verification_tokenstringToken returned by `verify_email_code` for the invoice's sender email. Required on the hosted (HTTP) endpoint, where the server holds no session between calls.

list_supported_jurisdictions List Supported Jurisdictions

List jurisdictions Scribo can emit invoices for, with each jurisdiction's available formats and the default format applied when no override is given. Phase 1 returns Germany (DE — XRechnung / ZUGFeRD) and the United States (US — plain PDF) only. Read-only and side-effect-free; safe to call before `create_invoice` to confirm a country is supported. Returns an array of `{ jurisdiction, formats[], default_format }`.

verify_email_code

Use this after `create_invoice` or `get_invoice` returns `verification_required`. Arguments: `{ challenge_id, code }`. On success returns a `verification_token`. Retry the same call with the same arguments plus that `verification_token` passed in its `verification_token` field. The token is reusable for ~30 min, so thread the same one into every subsequent `create_invoice` for the same sender email until it expires. Only ever call this with a code the user gave you: attempts are capped and the fifth wrong code revokes the challenge, after which (or once it expires after 15 minutes) no code wor…

ParameterTypeDescription
challenge_id *stringThe opaque challenge id surfaced by the previous `create_invoice` `verification_required` error.
code *stringThe 8-character code copied from the verification email body: uppercase letters and digits from the confusable-free alphabet {23456789ABCDEFGHJKMNPQRSTVWXYZ}, so never 0, 1, I, L, O or U. Case, spaces…