draft_receiptuntrusted content
Replaces the whole receipt with a new one, composed from the block vocabulary. This is the main tool: one call turns a described situation into finished paper. Give it a short distinctive title — that name is how the…
title: string, blocks: array, expectedRevision: integer?, dryRun: boolean?
edit_receiptuntrusted content
Changes part of the receipt without rewriting it. Blocks are 1-based from get_receipt. setCopy changes the words on a heading, text, logo, countdown or groups block and keeps its style. Item ops touch one line on…
operations: array, expectedRevision: integer?, dryRun: boolean?
get_app_statusread-only
Reports the editor URL, whether setup is done, whether the printer bridge is reachable, the current print policy, and the last print result. Call this first when you are not sure the app is ready.
get_receiptread-onlyuntrusted content
Returns what is on the paper right now and its revision. Defaults to a compact outline with one line per block; pass detail=text for a plain-text stand-in of the print, or detail=json for the raw document. Read this…
detail: string?
list_receipt_blocksread-only
The vocabulary you can put on a receipt, with a note on when each one earns its place and what it needs. Blocks marked live fetch real data when you add them.
list_receipt_recipesread-only
Call this whenever someone describes a situation rather than naming blocks — travelling, a morning routine, a shopping trip, a meeting. Returns the blocks that belong on that receipt and the details worth confirming…
situation: string?
list_receipt_templatesread-only
The built-in templates and any the person has saved from a receipt. Use the id or name with load_receipt_template. A saved template is a starting point, not a trusted print path.
load_receipt_template
Replaces the current receipt with a template from list_receipt_templates. Built-in templates stamp a fresh copy; a saved template loads exactly as stored. It never prints. Pass dryRun to preview.
template: string, expectedRevision: integer?, dryRun: boolean?
open_receipt_editor
Brings up the visible receipt editor so the person can see and adjust the draft before it prints. Use this after drafting whenever they should look before you print.
highlight: array?
preview_receiptread-onlyuntrusted content
Shows what will actually come out of the printer as plain text, with the exact dot dimensions, the paper length in millimetres, and any warnings. In the browser this also scrolls the preview into view. Check this…
rename_receipt
Sets the receipt's title — the name in the editor header and the drafts list, not the heading printed on the paper. Use this whenever you draft something new or the current name is generic (Morning brief, Untitled). A…
title: string, expectedRevision: integer?
request_receipt_print
Prints the exact revision you name. On a connected printer this is irreversible and paper comes out. In the browser demo it opens a preview instead. May pause for approval. Preview first.
expectedRevision: integer, reason: string?
save_receipt_template
Saves the current receipt as a named template the person can reuse from Templates. If a saved template already has this name, it is updated rather than duplicated. Does not change the receipt on screen and does not…
name: string
undo_agent_edit
Steps the receipt back to how it was before the last change. Use this when someone says that was not what they meant, instead of rebuilding the previous version by hand.