# io.github.lonniev/roastify-mcp

> Roastify Developer API MCP Service — Tollbooth DPYC monetization

- name: io.github.lonniev/roastify-mcp
- version: 0.22.6
- connection class: R2 (oauth_consent_once)
- trust: 91/100
- quality: 70/100 (needs work)
- owner: not claimed
- descriptor: https://api.protogrid.dev/v1/servers/io.github.lonniev%2Froastify-mcp
- tools: https://api.protogrid.dev/v1/servers/io.github.lonniev%2Froastify-mcp/tools

**An agent can connect after a one-time OAuth consent by a human.** Remote endpoint behind OAuth 2. Tokens stay with the agent; the registry only exposes the authorization metadata.

## Connection (mcpServers)

```json
{
  "mcpServers": {
    "roastify-mcp": {
      "type": "http",
      "url": "https://roastify-mcp.fastmcp.app/mcp"
    }
  }
}
```


## Trust

- hygiene: 100
- liveness: 100
- freshness: 85
- provenance: 80
- drivers: +repository +namespace-matches-repo +reachable +uptime-100% ~updated-57d-ago
- Derived from observable signals (official registry feed and our own credential-free probes); no code audit performed.

## Quality 70/100 (needs work)

### protocol: n/a (weight 25)

- n/a `protocol.modern`, `protocol.stateless`, `protocol.transport`, `protocol.list_ttl`: no remote answered a protocol handshake (not probed yet, unreachable, or local-only)

### authorization: 83 (weight 15)

- pass `auth.prm`: Protected Resource Metadata (RFC 9728) published
- pass `auth.as_metadata`: authorization server metadata reachable
- warn `auth.cimd`: only Dynamic Client Registration, deprecated in 2026-07-28 in favour of CIMD
- n/a `auth.secret_in_url`: no templated URL

### tool hygiene: 86 (weight 30)

- pass `tools.descriptions`: every tool has a description
- warn `tools.description_length`: 5 tools have descriptions over 1,024 characters, which crowds the context
- pass `tools.schemas`: every tool has an object input schema
- pass `tools.annotations`: 70 of 70 tools declare readOnlyHint or destructiveHint
- pass `tools.directory_hints`: every tool declares readOnlyHint, destructiveHint, idempotentHint and openWorldHint
- warn `tools.token_cost`: about 19,519 tokens to load every tool
- pass `tools.api_dump`: tools are not a one-to-one API dump

### stability: 25 (weight 15)

- warn `stability.changes`: 78 tool changes in 30 days
- fail `stability.rug_pull`: 2 tools kept their name but changed most of their description in 30 days; review before trusting them

### dependencies: n/a (weight 15)

- n/a `deps.known_vulns`, `deps.mcp_sdk_version`, `deps.resolvable`: no npm or PyPI package

- tools: 70, about 19,519 tokens to load them all
- tool set hash: 17357983950e28d4623426836a6a80d0
- tools last changed: 2026-10-14T22:38:33.113Z
- badge: [![protogrid quality](https://protogrid.dev/badge/io.github.lonniev/roastify-mcp.svg)](https://protogrid.dev/servers/io.github.lonniev/roastify-mcp)
- Checks run on what our credential-free, read-only probes observe; tools are never called and no code audit is performed.

### Tool changes

- 2026-10-14 `roastify_set_product_description` changed (title, inputSchema, annotations)
- 2026-10-14 `roastify_move_elements` changed (title, inputSchema, annotations)
- 2026-10-14 `roastify_add_design_element` changed (title, inputSchema, annotations)
- 2026-10-14 `roastify_update_design_text` changed (title, inputSchema, annotations)
- 2026-10-14 `roastify_get_design_text` changed (title, inputSchema, annotations)
- 2026-10-14 `roastify_delete_design` changed (title, inputSchema, annotations)
- 2026-10-14 `roastify_list_designs` changed (title, inputSchema, annotations)
- 2026-10-14 `roastify_list_design_versions` changed (title, inputSchema, annotations)
- 2026-10-14 `roastify_fetch_design` changed (title, inputSchema, annotations)
- 2026-10-14 `roastify_stash_design` changed (title, inputSchema, annotations)

Full history: https://api.protogrid.dev/v1/servers/io.github.lonniev%2Froastify-mcp/changes

## Remotes

- https://roastify-mcp.fastmcp.app/mcp (streamable-http, auth oauth2, reachable true, uptime30d 1)

## Packages

_none_

## Tools (70)

- `roastify_account_statement`: Generate a patron's account statement at this operator.

Returns the patron's purchase history, active credit tranches,
per-tool usage breakdown, and recent daily usage logs. This is
the patron's spending account — not the operator's Authority
tax balance.

Free — no credits consumed. Proof of npub ownership is required
to prevent statement-scraping of arbitrary patrons.
- `roastify_account_statement_infographic`: Generate a visual SVG infographic of your account statement.

Returns the same data as account_statement, rendered as a dark-themed
SVG graphic with balance hero, metrics cards, health gauge, tranche
table, and tool usage breakdown. Costs 1 api_sat per call. Proof is
verified by ``debit_or_deny`` before any cost is incurred.
- `roastify_add_design_element`: Add a new element (text or image) to a design and commit a new version of it.

The store is configuration management: the element is committed back to the SAME
design_id (git tracks the diff). The new element's id comes back, so you can
immediately edit a text element by id with update_design_text, or move/reorder
either kind with move_elements.
Placement is validated server-side and REFUSED, not warned: the element must fall
inside the named panel (with a default margin — the dieline carries no real safe
area) — or, when the product has no panels (Tubes / continuous wrap), inside the
design sheet — and must not overlap any existing element (the collider's id is
named). Typography is inherited for text, so a new text element matches the
template. Image creation reuses a src already present in the design (no new asset
upload) — pass `kind="image"` with `src_from` (an existing image id) or `src` that
already appears on an image.
- `roastify_adoption_status`: Check this operator's adoption-request status at a chosen Authority.

Free. Polls the Authority MCP-to-MCP for the status of this operator's
request (pending / approved / rejected / provisioned).
- `roastify_artwork_status`: Check a Roastify artwork job. Free — polling never costs anything.

A finished job carries ``artwork_url``; a failed one carries ``error``.
- `roastify_browse_catalog`: Browse the Roastify catalog: products and coffee blends together.

Plan-gated items are returned with their tier marked, not hidden.

Note that Roastify's catalog carries no origin, altitude, processing, or
varietal data — those live only in the Merchant App UI. Roast level and
decaf status come from the blend.
- `roastify_check_authority_balance`: Check this operator's tax balance at the Authority.

Returns the sats available for certifying patron credit purchases.
When this balance reaches zero, patron top-ups cannot be certified
and the operator must call purchase_credits on the Authority.

This is the operator's own funding — not a patron balance. Free.
- `roastify_check_balance`: Check a patron's credit balance at this operator.

This is the patron's spending balance — credits purchased via
Lightning for tool calls at this operator. For the operator's
own balance at the Authority (needed to certify patron purchases),
use authority_check_balance instead.

Free — no credits required. Proof of npub ownership is required
to prevent anyone-with-the-registry from enumerating balances.
- `roastify_check_payment`: Check the payment status of a Lightning invoice.

Call after paying the invoice from purchase_credits.
Free — no credits required. Proof of npub ownership is required
to prevent credit-grant front-running by an observer of the
invoice ID.
- `roastify_check_price`: Preview the effective cost of a tool call.

Shows the base cost and any constraint effects (discounts, free
trials, surge pricing). Free — no credits required.
- `roastify_check_proof_status`: Check whether a proof grant is still valid.

Mirrors ``check_oauth_status`` for the npub-proof flow: a calling
agent can ask "will my next paid call accept this dpop_token?"
before burning credits on a guaranteed failure. Expiry is read from
the grant itself; the only store consulted is the patron's
revocation watermark.

Free, no side effects — touches no relay.
- `roastify_check_stock`: Check Roastify stock for one SKU, or the whole stock list.
- `roastify_delete_coupon`: Delete a coupon.  Cascades to all patron redemptions.

Any chain step referencing the deleted coupon_id becomes a
no-op (the constraint returns neutral on unknown ids) — the
Studio surfaces orphan references as warnings.

RESTRICTED to operator — requires proof.
- `roastify_delete_design`: Delete one of your stored designs.
- `roastify_delete_operator_credential`: Remove a single operator secret field.

Deletes one key from the operator's encrypted credential blob without
touching the others — the field-level counterpart to
``forget_credentials``, which wipes the whole row. Use it to retire a
leftover after an SDK cutover (a Prefect key after Modal, or a stored
but untemplated orphan like ``anthropic_api_key``) without taking the
operator down for a full re-delivery.

Stored-but-untemplated fields are first-class: the delete is keyed on
what is vaulted, not on what the current template declares. Idempotent
— already-absent fields report ``removed: false`` without rewriting
the vault. RESTRICTED to the operator — requires the operator's proof
(a kind-27235 event or a proof grant); patron proofs are rejected.
A deletion is as destructive as a write.
- `roastify_delete_patron_credential`: Remove a single patron credential field.

Deletes one field from stored credentials without affecting
other fields. Free. Proof of npub ownership is required —
this is a write to the patron's sensitive credential vault.
- `roastify_fetch_design`: Fetch one of your stored designs in full, with its images re-inlined.
- `roastify_forget_coupon`: Remove a coupon from this patron's redemption list.

Cosmetic only — the coupon itself still exists at the operator,
and the patron can re-redeem the same code later while the
window allows.  Free — requires proof of ``npub``.
- `roastify_forget_credentials`: Delete vaulted credentials for a specific service and npub.

For operator credentials, pass the operator's own npub. For patron
credentials, pass the patron's npub. Always requires proof of
npub ownership — a deletion is as destructive as a write.
- `roastify_generate_artwork`: Generate packaging artwork from one of your saved Design Studio designs.

This personalizes a template you already authored: it rewrites that design's
named text and image placeholders. It cannot author a design from scratch, and
the artwork it produces is NOT attached to a product — Roastify's API has no
product-create or storefront-sync surface. You get an artwork URL and carry it
onward yourself.

Roastify renders asynchronously, so this returns a job id straight away. Check
it with roastify_artwork_status, which is free.
- `roastify_get_blend`: Get one coffee blend: roast level, decaf status, and its variants.
- `roastify_get_catalog_product`: Get one catalog product with its variants, sizes, prices, and dieline.
- `roastify_get_design_text`: List the editable text layers of a stored design — the fields you can change.

Returns each text layer's id, current text, `chars` (its length), font, `align`,
box geometry (`fontSize`, `width`, `height`), and `z` (paint-order index in the
top-level `elements` array) — but NOT the design's images, so it stays small
enough to reason over in a conversation. Each layer's current text is its own
label: infer its role (product name, tagline, story, recipe, tasting notes, …)
from the words it holds. The same name often appears in several layers and
inside longer blurbs; change every id that should carry it.

Also returns `sheet` (the overall design extent), `panels` (the box's panel
columns — front/back/left/right — recovered from the dieline, each with bounds;
empty for single-face products like Tubes, where placement uses `sheet` instead),
and a real `face` per layer/element (which panel its x-centre sits on, not the
constant "sheet"; when panels is empty, layers keep their native faceId such as
"wrap"). And `elements` — the NON-text elements (images, shapes, rules), each with
id, type, name, bounds, `z`, and its `fill`/`stroke` colours — so a roast scale can
be audited (a filled dot has a dark `fill`, an empty one none) and set with
roastify_move_elements. `fonts` lists the families loaded on the design plus any
family a layer already uses — pick from it when setting `fontFamily` via move_elements.
Read those before judging the design: a header with no text value beneath it is
NOT necessarily a defect — the value may be a graphic in `elements` (e.g. a
five-dot roast scale under a ROAST header), and it tells you where NOT to place
new text. Roastify's migrated format carries no visibility flag, so a layer that
exists may still not print — do not report a missing value as a production error.

Geometry: each layer's `x`/`y` is its top-left corner in design units (the sheet
origin is its top-left). `width`/`height` are MEASURED text bounds, not fixed
frames — text does not clip, it grows, so a revision that holds the line count
and longest-line length keeps the footprint. `z` is paint order (lower draws
first / behind); change it with roastify_move_elements `{"id", "z": "front"|"back"|N}`.

Two things to respect:
- A stash label states INTENT, not content: a design labeled for one coffee may
  still hold a donor template's words. Trust these layers, not the label.
- `width` is the fixed wrap frame; `height` is the grown extent and re-measures
  when you edit the text. Keep each replacement within roughly ±10% of the
  layer's `chars`; longer copy grows the box downward and can overrun its
  neighbour, which the merchant then fixes by hand. `fontSize`/`width` gauge how
  tight a layer is; to change a label's `fontSize`, wrap frame, `align`, or
  `fontFamily`, use roastify_move_elements.

Also returns `description` — the product's store-page prose (outside the design,
syncs to Shopify), versioned with the design. Refine it and write it back with
roastify_set_product_description.

Pair with roastify_update_design_text to save text changes.
- `roastify_get_my_product`: Get one of your saved product designs in full, with all its variants.

The coffee's IDENTITY (which blend) is not a named field — it is encoded in the
variant SKU, e.g. `COF-WHB-12O-HGL-BOX` → `HGL` → the High Lakes blend. Decode
the SKU before writing origin/roast copy: a product's title can say one thing
while its SKU is really a different blend.
- `roastify_get_nostr_profile`: Read an npub's public Nostr profile (NIP-01 kind-0 metadata).

Free, no proof — the data is already public on relays. Returns the
latest metadata fields (name, display_name, about, picture, banner,
nip05, website, lud16) or an empty profile if none is published.
- `roastify_get_notarization_proof`: Generate a Merkle inclusion proof that a patron's balance was
included in a Bitcoin-notarized snapshot.
- `roastify_get_operator_onboarding_status`: Report this operator's configuration readiness.

Shows which operator settings are configured, which are missing,
and how to deliver each missing value. For patron-level credential
status, use get_patron_onboarding_status instead. Free.
- `roastify_get_patron_credential_fields`: List stored patron credential field names (not values).

Returns the names of fields stored for a patron, plus each
field's ``delivered_at`` ISO-8601 timestamp when known (null
for secrets vaulted before timestamps were recorded). Values
are never exposed — use this to verify which fields are
configured and how old each one is. Free. Proof of npub
ownership is required: the list of configured fields is itself
sensitive (reveals which integrations a patron has set up).
- `roastify_get_patron_onboarding_status`: Report a patron's credential readiness for this operator.

For set-once services (eXcalibur, TheBrain), shows which patron
secrets are configured and which are missing. For dynamic/OAuth2
services (Schwab), reports that no patron credentials are needed.
Free. Proof of npub ownership is required because credential
presence is sensitive information about the patron's setup.
- `roastify_get_pricing_model`: Get the active pricing model for this operator. Free.

If no model exists, self-initializes a scaffold with all
registered tools at 0 sats.  No economic data from code.
- `roastify_list_canonical_identities`: Return canonical (tool_id, mcp_name, …) for every tool the wheel exposes.

The authoritative source for any client (Studio, agents, FE)
that needs to know how this MCP identifies its tools.
Reconcile uses this output to UUID-join against the stored
pricing model — no name-based UUID derivation, no guessing.

Includes both ToolIdentity-seeded tools and any UUID recorded by
``@paid_tool`` that is missing from the registry. The latter appear
with ``registered: false`` (and in the top-level ``unregistered``
array) so Reconcile can flag deploy drift instead of silently
reporting clean when a live tool was never seeded (#174).

If the operator renames a function or rebrands a slug, the
mcp_name in this output changes but tool_id stays. That's the
whole point of the canonical-UUID design.

Also diffs the live FastMCP wire surface against the registry.
Tools exposed on the wire but absent from the registry appear in
``unregistered`` so Reconcile can flag deploy drift instead of
silently under-reporting (issue #175).

Free, no side effects.
- `roastify_list_constraint_types`: List all available constraint types and their parameter schemas.

Returns the type, category, description, and parameter specs for
every constraint that can be used in a pricing pipeline.
Free — no credits required.
- `roastify_list_coupons`: List every coupon this operator has minted (newest first).

Each row carries the current ``times_redeemed`` counter — the
Studio renders a progress bar from this against ``total_uses``.
RESTRICTED to operator — requires proof.
- `roastify_list_designs`: List your stored designs — metadata only, newest first.
- `roastify_list_design_versions`: List a stored design's committed versions, newest first — the git history.

Each version carries its `sha`, `short_sha`, `date`, commit `message`, `tag` (the
version tag if one was set at Commit), and `commit_url`. Pass a version's `sha` (or
`tag`) as the `ref` to roastify_fetch_design to fetch that exact version.
- `roastify_list_my_coupons`: List the coupons this patron has redeemed on this operator.

Returns both active and exhausted redemptions with a per-row
``status`` (``active`` / ``window_closed`` / ``patron_limit`` /
``total_limit``).  Free — requires proof of ``npub``.
- `roastify_list_my_products`: List your own saved Roastify product designs, one page at a time.

Returns has_next_page and end_cursor so you can tell a page from a
complete list.
- `roastify_list_notarizations`: List recent Bitcoin notarization records.
- `roastify_mint_coupon`: Create a new operator-owned discount coupon.

The coupon owns its binding: ``tool_ids`` names the tools it
discounts, and re-pricing a tool never touches it. A coupon bound
to no tool discounts nothing, however many patrons redeem it.
- `roastify_move_elements`: Move a group of elements together and/or resize elements; commit a new version.

The Designer can move only one layer at a time, so a block of layered content
(a spec panel, a logo lockup) drifts out of alignment when its backing shape is
moved alone. This relocks that block: name the ids and shift them as one rigid
object, and separately re-centre or resize individual rectangles. The store is
configuration management: the edit is committed back to the SAME design_id (git
tracks the diff). Apply it onto the product with the browser courier.

Nothing is validated against panel bounds here (unlike add_design_element): you
are re-aligning existing, deliberately-placed content, so the caller owns the
coordinates. The heavy background image is never moved unless you name its id.
- `roastify_notarize_ledger`: Build a Merkle tree of all patron balances and submit the root
to Bitcoin via OpenTimestamps.

Operator-only background task. Bitcoin confirmation takes 1-6 hours.
Free — no credits required.
- `roastify_oracle_about`: Describe the DPYC ecosystem via the Oracle. Free.
- `roastify_oracle_get_tax_rate`: Get the current DPYC certification tax rate. Free.
- `roastify_oracle_how_to_join`: Get DPYC onboarding instructions from the Oracle. Free.
- `roastify_oracle_lookup_member`: Look up a DPYC community member by npub. Free.
- `roastify_oracle_network_advisory`: Get active network advisories from the Oracle. Free.
- `roastify_publish_nostr_profile`: Publish a CLIENT-SIGNED kind-0 profile to relays for an npub.

The wheel never holds a patron nsec. The frontend signs the kind-0
metadata event with the patron's session key or a NIP-07 extension and
passes the signed event (JSON) here; the wheel verifies the signature
matches the npub, then relays it to public relays. The signature is the
authorization — no proof token, no key custody. Free.
- `roastify_purchase_credits`: Buy credits via Bitcoin Lightning.

Creates a Lightning invoice. Pay it with any Lightning wallet,
then call check_payment to confirm. Proof of npub ownership is
required so credits land in the correct ledger.

Free — no credits required to call.
- `roastify_receive_credentials`: Pick up credentials from the Secure Courier.

Completes the CREDENTIAL-DELIVERY flow (the ownership-proof
counterpart is ``receive_npub_proof``).

**Call this only after the user confirms they have replied.**
Deterministic, one-shot retrieval: name the response you want with
``(sender_npub, service, dpop_token)`` and the tool drains ONLY the
rendezvous relay that channel was pinned to. Every popped DM with the
wrong session phrase is deleted and its sender is NACK'd; the first DM
with the matching phrase is accepted (ACK'd) and the scan stops. If
none match, the queue is drained and a ``courier_not_found`` result is
returned. Do NOT poll, loop, or retry.

If a credential_card (ncred1...) is provided, it is redeemed directly
without any relay access (dpop_token not required for that path). On
success, the payment processor client is reinitialized from the new
credentials — no server restart needed.
- `roastify_receive_npub_proof`: Receive npub ownership confirmation from a patron.

Completes the npub-OWNERSHIP-PROOF flow (the credential-delivery
counterpart is ``receive_credentials``).

**Call this only after the user confirms they have replied.**
Deterministic, one-shot retrieval: name the response with
``(patron_npub, dpop_token)`` — the ``dpop_token`` being the value
returned by ``request_npub_proof``. The tool drains ONLY the pinned
rendezvous relay that challenge was published on, stopping at the DM
whose phrase matches. Mismatched DMs are deleted and NACK'd (without
revealing the expected phrase). If called before the user replies,
their message will never be found. Do NOT poll, loop, or retry.

The signed DM itself proves npub ownership (the patron's nsec
signed it). On success, returns a new ``dpop_token``: an
Operator-signed **proof grant envelope** ``{"grant": …, "nonce": …}``
bound to the patron, this challenge, and the duration the patron
named. The calling application MUST remember that whole string and
pass it as ``dpop_token`` on every subsequent paid tool call. The
grant is self-verifying; nothing about it is stored here. Free.
- `roastify_receive_patron_credentials`: Pick up patron credentials from the Secure Courier.

Deterministic, one-shot retrieval: name the response with
``(sender_npub, dpop_token)`` and the tool drains ONLY the pinned
rendezvous relay for that channel, stopping at the matching DM.
Provide an ncred1... credential_card to redeem directly instead
(dpop_token not required for that path). Do NOT poll or retry.
Free.
- `roastify_redeem_coupon`: Claim a coupon by its name (the code the operator shared).

Looks up the operator's coupon by ``code``, validates the window
and total cap, and records a per-patron redemption row.
Subsequent paid tool calls on this MCP auto-apply the discount
until ``uses_per_patron`` is exhausted.

Free — no credits required.  Requires proof of ``npub``.
Idempotent: redeeming the same code twice returns the existing
redemption.
- `roastify_report_issue`: File a field report about this service as a GitHub issue on the operator's repo.

Found a tool's metadata or response wrong or confusing? Report it where the tool
lives. The **author of record is your npub** — no npub / no proof, no issue — and it
is stamped into the issue so the report is attributed to you, not the operator. Costs
a small fee (a free write to an issue tracker would be abused). The report is PUBLIC
and goes to the maintainers' normal triage; nothing is verified here.

Returns the filed issue's repo, number, and url. If this operator has not enabled
field reports, returns an "issue reporting not configured" situation and you are not
charged.
- `roastify_request_adoption`: Ask a chosen Authority to adopt this operator (deferred courtship).

RESTRICTED to the operator — requires proof the caller controls this
operator's npub. Resolves the Authority's MCP endpoint from the
community registry, mints an inline ownership proof with this
operator's nsec, and delivers the request MCP-to-MCP. The Authority
records it as pending; its owner approves on their own time. Poll
``adoption_status`` for progress; the operator flips to ``ready``
once the Authority provisions it.
- `roastify_request_credential_channel`: Open a Secure Courier channel for credential delivery.

This is the CREDENTIAL-DELIVERY flow — use it to hand over a service
secret (API keys, tokens). To merely prove you control an npub (the
usual answer to a ``proof_required`` error), use ``request_npub_proof``
instead. Note: dynamic/OAuth2 services (e.g. Schwab) need NO couriered
secret — check ``service_status`` first.

Sends a welcome DM with a credential template. The recipient
must read the DM in their Nostr client, fill in the fields,
and reply manually. **This is a human-in-the-loop flow.**

After calling this tool, STOP and tell the user what to do.
Wait for the user to confirm they have replied before calling
``receive_credentials``. Do NOT poll or retry — each
``receive_credentials`` call destructively drains the relay
mailbox.
- `roastify_request_echo`: Echo what the client sent with this request. Free.

Reports the URL path and query, the headers, the cookies and the MCP
request ``_meta``. Values are SHA-256 fingerprints, so nothing a client
sends is repeated back; equal fingerprints mean equal values. Call it
from two conversations and compare: a value that stays the same within
one and changes between them identifies the conversation.
- `roastify_request_npub_proof`: Request npub ownership proof from a patron via Nostr DM.

This is the npub-OWNERSHIP-PROOF flow — use it when a call returns
``proof_required``. It proves the caller controls an npub; it does
NOT deliver any service secret. To hand an operator its API keys or
OAuth secrets, use ``request_credential_channel`` instead.

Sends a challenge DM that the patron must sign and reply to
using their Nostr client. **This is a human-in-the-loop flow.**

After calling this tool, STOP and tell the user to check their
Nostr client and reply to the challenge. Wait for the user to
confirm they have replied before calling ``receive_npub_proof``.
Do NOT poll or retry — each ``receive_npub_proof`` call
destructively drains the relay mailbox.

**Returns** a ``dpop_token`` — the one-time challenge nonce shown in
the DM. Pass it to ``receive_npub_proof`` to collect the reply. It
is a matching token, not a credential: on its own it authorizes
nothing.

**Lifecycle:** ``receive_npub_proof`` returns the proof grant, which
expires after the duration the patron named in their reply. When it
expires, call ``request_npub_proof`` again for a fresh challenge,
then wait for the user, then call ``receive_npub_proof``.

Free.
- `roastify_request_patron_credentials`: Open a Secure Courier channel for patron credential delivery.

Sends a welcome DM with a credential template to the patron.
Free.
- `roastify_reset_pricing_model`: Erase all pricing models and restore a viable default.

Deletes every stored model, then self-initializes a fresh one
from the tool registry — all tools at 0 sats with proper UUIDs.
Returns the new model.

RESTRICTED to operator — requires proof (nsec-signed).
- `roastify_restore_credits`: Credit a patron's ledger from a BTCPay-settled invoice.

**RESTRICTED to the operator** — the operator owns the books and is
the only party who can issue a manual credit grant. Patrons who
believe they paid but never got credits must escalate to the
operator's support, who then invokes this tool on their behalf.

Use cases: cold-start vault races during check_payment, ncred
delivery hiccups, patrons closing Top-Off sheets before settle,
any infrastructure incident that left an invoice settled at BTCPay
but uncredited on the operator's ledger.

Idempotent — if the invoice is already credited (in the patron's
``credited_invoices``), returns success with credits_granted=0.
- `roastify_restore_neon_schema`: Prepare this operator's database schema again, ignoring the breadcrumb.

Diagnostic / recovery tool for when Neon keeps answering 4xx and the
operator suspects a table or grant is missing. Every statement is
idempotent, so a clean re-run is harmless; the breadcrumb is rewritten
at the end. Returns one step per concern, with Neon's own error text
inline for any that failed.

RESTRICTED to operator — requires proof (nsec-signed).
- `roastify_service_status`: Check the health and configuration of this service. Free.
- `roastify_session_status`: Check operator readiness. Returns the operator lifecycle
state and clear guidance on what to do next. Free.

Lifecycle states:
- ready: Vault AND pricing model verified on this call. Proceed with
  tool calls — this is the answer the moment the vault is up.
- warming_up: Persistence could not be reached on this call (a
  transient failure, seen, not assumed). Retry; the next call
  completes the bootstrap. Never reported on a clock.
- misconfigured: Persistence rejected a query with a permanent SQL
  error (permission denied, missing relation). Paid tools will fail
  until the operator repairs the database — retrying does not help.
- quota_exceeded: The persistence provider (Neon) answered HTTP 402 —
  the operator's database has exhausted its compute/storage quota, so
  the books are locked for billing. Paid tools fail; retrying does NOT
  help. The operator's Authority must restore capacity (upgrade the
  plan or wait for the quota reset). Free tools remain available.
- not_registered: Operator has no Authority relationship yet. Call register_operator first.
- no_identity: Operator nsec is not configured. Deployment issue.
- `roastify_set_pricing_model`: Set the active pricing model. RESTRICTED to operator.

Requires a valid proof (Schnorr-signed kind-27235 event)
proving the caller holds the operator's nsec.
- `roastify_set_product_description`: Set the product's store-page DESCRIPTION on a stored design, committed in place.

The description is the product's store-page prose — it lives OUTSIDE the design
artwork and, on Roastify, syncs to Shopify. It is versioned WITH the design in your
git library: read the current one from `roastify_get_design_text` (its `description`
field — Roastify's own auto-generated copy is a helpful starting point), refine it,
and write it back here. This commits a new version of the SAME design_id (git tracks
the diff); it does NOT touch Roastify. The browser courier applies it onto the product
on the next Fetch (skipped there if Shopify has locked the field).
- `roastify_stash_design`: Store a Roastify design JSON in your library (a commit in your GitHub repo).

The browser courier reads a saved product's design and calls this to shuttle it
up. On the way in, the design's fonts[] is REPAIRED — Roastify's own schema
migration leaves a lossy fonts[] (a dropped family, a bad weight), so a stashed
design would otherwise carry that damage; the repair rebuilds fonts[] from the
families the text actually uses so it renders in its intended fonts. Only the
load list changes; the text and its fonts are untouched. Inline images are
de-duplicated. This does NOT touch Roastify.
- `roastify_update_coupon`: Patch a coupon's editable fields.

Pass only the fields you want to change.  To set a cap to
unlimited (NULL in the schema), pass ``clear_uses_per_patron=true``
or ``clear_total_uses=true``.  Renaming the code is allowed —
existing patron redemption rows survive (they key on coupon id).
``tool_ids`` replaces the coupon's binding — tool ids or MCP tool
names, ``["*"]`` for every paid tool, ``[]`` to unbind it.

RESTRICTED to operator — requires proof.
- `roastify_update_design_text`: Apply text edits to a stored design and commit a new version of it.

The store is configuration management: the edit is committed back to the SAME
design_id (git tracks the diff), not saved as a new file. Apply it onto a product
with the browser courier. Only the words change — fonts, layout, and images are
preserved, and the heavy image is never moved (the design keeps referencing the
same content-addressed assets).

The box does not resize, so keep each new text within roughly ±10% of the
character count of the layer it replaces (see `chars` from get_design_text);
longer copy overflows and the merchant fixes it by hand.
- `roastify_update_operator_credential`: Add or update a single operator secret field.

Merges into the operator's stored credentials without touching the
others — the field-level counterpart to re-delivering the whole
bundle over Secure Courier. Use it to rotate one secret (a reissued
``btcpay_api_key``, say) without restating the six you did not
change, where any field omitted from a courier reply is destroyed.

The value is never echoed back. RESTRICTED to the operator —
requires the operator's proof (a kind-27235 event or a proof grant);
patron proofs are rejected.
- `roastify_update_patron_credential`: Add or update a single patron credential field.

Merges into existing stored credentials without affecting
other fields. Useful for setting an account identifier
after OAuth, changing a default brain, etc. Free. Proof of
npub ownership is required — this is a write to the patron's
sensitive credential vault.
