Skip to main content
Glama

Show invoice design

well_show_invoice_design
Read-only

Draw the invoice-design card so the USER picks the layout an invoice prints in and sets what it prints: the ink, the language, whether a customer-portal address is printed, and which note, tax rate and payment means back the payment-terms, tax-regime, legal-mentions and payment-means rows.

REQUIRED: invoice_id, or template_build_id for the capture mode below. Never both.

Every field's options are read off this workspace's OWN records — its notes, its tax rates, its payment means — never a fixture. The payment-means field's mint verdict on each option is the REAL capability read off workspace_connectors.installed_capabilities, never a guess from a connector's name: a connector can be fully connected and still refuse, and the verdict names the registry reason (no committed tool, not installed, capability capture never ran, or installed without the minting scope).

Draws the card and waits for the user's "Use this design", which calls well_update_invoice_design. Do not read this and then decide whether to draw — drawing IS the step.

customer_id: the invoice's customer, for saving their default design.

CAPTURE MODE: pass template_build_id instead of invoice_id, the enrichment_task_id that well_create_invoice_template or well_create_invoice_template_revision returned. On a host that draws cards, the card waits for the build and then shows the dropped invoice beside the rebuilt design, with the logo and the legal mentions it would reuse, each one kept or removed by the person, and Keep, Ask for changes and Not now. The card asks for its two pictures itself and gets them in the result's _meta, which the host hands to the card, not to you. Keep saves the design itself through well_create_workspace_invoice_design. A host that draws no card cannot show the rebuilt design, and no link opens it: reference_url opens the dropped invoice, never the design. The result's capture says where the build stands (building, built, not_built), what the design would reuse (offer) and the link to the dropped invoice (reference_url). Draw it once, right after the build starts, and end the turn: the card follows the build by itself. Leave include_pictures unset: the card asks for its pictures.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
invoice_idNoThe UUID of the invoice whose design to draw.
workspace_idNoTarget workspace. Omit when the token authorizes one workspace. Required when it authorizes several: this read reports one workspace's own figures and will not choose which.
conversation_idNoThe conversation id returned by the previous Well result, in its meta under well/conversation_id, in its structuredContent, or in its JSON text block. Pass it back on every call in the same conversation, including a call a card makes, so the chosen workspace and the earlier answers still apply. It decides the conversation on its own: nothing the host states about the session replaces it. Omit it only on the first call of a conversation.
workspace_scopeNoRestrict this call to the family: the token's primary workspace plus the company workspaces under it that you are a member of. Unrelated authorized workspaces drop out of the read; row reads merge across the family, while a per-workspace figure still reports exactly one workspace.
include_picturesNoSet by the capture card to draw its two pictures. The pictures reach the card only, never your copy of the result; leave unset.
template_build_idNoCapture mode: the enrichment_task_id of the build that rebuilt a design from a dropped invoice. Replaces invoice_id.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNo
errorNo
captureNoCapture mode only: the build, the design it rebuilt and what the design would reuse.
successYes
can_applyNoWhether the card may save on this turn: a pick on the design chooser, or Keep on the capture card. False in an Ask-mode turn of Well's chat: the card shows the designs with its save button off, and saving runs in Agent mode.
refusal_reasonNoThe WellError code when the read is refused.
conversation_idNoThe conversation this result belongs to. Pass it back as the conversation_id argument on every later Well call in the same conversation.
newly_connectedNoTools that connected to this workspace since the last result and that no session was told about yet, oldest first. Present only when at least one tool is new. The connected-line rule says when to tell an entry; when it does, one line per entry, in the person's language: "<name> is connected.". Never fold several entries into one sentence. Each entry comes back once, on one result only: never repeat its line later.
resolved_workspaceNoThe workspace that answered, when the caller named none and the token authorizes several.
conversation_id_noteNoPresent only when the server opened a fresh lane, stating that no choice recorded earlier was read.
conversation_id_sourceNoWhere the conversation id came from: the host's own request meta, the caller's argument, or a fresh lane the server opened.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / properties / can_apply
      Added value: +{
      +  "description": "Whether the card may save on this turn: a pick on the design chooser, or Keep on the capture card. False in an Ask-mode turn of Well's chat: the card shows the designs with its save button off, and saving runs in Agent mode.",
      +  "type": "boolean"
      +}
  2. Changed2 schema fields changed
    • removedOutput schema / properties / data / properties / trigger
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "string"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ]
      -}
    • changedOutput schema / properties / data / required
      Previous value: -[
      -  "invoice_id",
      -  "customer_id",
      -  "trigger",
      -  "layouts",
      -  "fields",
      -  "settings",
      -  "payment_link_options"
      -]New value: +[
      +  "invoice_id",
      +  "customer_id",
      +  "layouts",
      +  "fields",
      +  "settings",
      +  "payment_link_options"
      +]
  3. Changed1 schema field changed
    • changedOutput schema / properties / newly_connected / description
      Previous value: -"Tools that connected to this workspace since the last result and that no session was told about yet, oldest first. Present only when at least one tool is new. Start the reply with one line per entry, in the person's language: \"<name> is connected.\". Never fold several entries into one sentence. Each entry comes back once, on one result only: never repeat its line later."New value: +"Tools that connected to this workspace since the last result and that no session was told about yet, oldest first. Present only when at least one tool is new. The connected-line rule says when to tell an entry; when it does, one line per entry, in the person's language: \"<name> is connected.\". Never fold several entries into one sentence. Each entry comes back once, on one result only: never repeat its line later."
  4. Changed2 schema fields changed
    • removedOutput schema / properties / data / properties / fields / items / properties / options / items / properties / mint / properties / exclusion
      Removed value: -{
      -  "enum": [
      -    "operation_not_requested"
      -  ],
      -  "type": "string"
      -}
    • removedOutput schema / properties / data / properties / payment_link_options / items / properties / exclusion
      Removed value: -{
      -  "enum": [
      -    "operation_not_requested"
      -  ],
      -  "type": "string"
      -}
  5. Changed1 schema field changed
    • addedInput schema / properties / workspace_scope
      Added value: +{
      +  "description": "Restrict this call to the family: the token's primary workspace plus the company workspaces under it that you are a member of. Unrelated authorized workspaces drop out of the read; row reads merge across the family, while a per-workspace figure still reports exactly one workspace.",
      +  "enum": [
      +    "family"
      +  ],
      +  "type": "string"
      +}
  6. Changed6 schema fields changed
    • addedInput schema / properties / include_pictures
      Added value: +{
      +  "description": "Set by the capture card to draw its two pictures. The pictures reach the card only, never your copy of the result; leave unset.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / template_build_id
      Added value: +{
      +  "description": "Capture mode: the enrichment_task_id of the build that rebuilt a design from a dropped invoice. Replaces invoice_id.",
      +  "format": "uuid",
      +  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      +  "type": "string"
      +}
    • removedInput schema / required
      Removed value: -[
      -  "invoice_id"
      -]
    • addedOutput schema / properties / capture
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Capture mode only: the build, the design it rebuilt and what the design would reuse.",
      +  "properties": {
      +    "build_id": {
      +      "type": "string"
      +    },
      +    "not_built_reason": {
      +      "anyOf": [
      +        {
      +          "enum": [
      +            "attempts_exhausted",
      +            "cost_cap_reached",
      +            "deadline_reached",
      +            "render_unavailable",
      +            "content_already_stored",
      +            "revision_unchanged",
      +            "build_failed"
      +          ],
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "offer": {
      +      "anyOf": [
      +        {
      +          "additionalProperties": false,
      +          "properties": {
      +            "issuer_name": {
      +              "anyOf": [
      +                {
      +                  "type": "string"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ],
      +              "description": "The company that issued the dropped invoice, as the page names it."
      +            },
      +            "issuer_relation": {
      +              "enum": [
      +                "own_company",
      +                "other_company",
      +                "unknown"
      +              ],
      +              "type": "string"
      +            },
      +            "legal_mentions": {
      +              "anyOf": [
      +                {
      +                  "type": "string"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ],
      +              "description": "The legal mentions printed on the dropped invoice, or null."
      +            },
      +            "legal_mentions_unverified": {
      +              "description": "True when the invoice is not the workspace's own and the reading found no mentions on it.",
      +              "type": "boolean"
      +            },
      +            "logo_present": {
      +              "description": "Whether a logo was cut from the dropped invoice.",
      +              "type": "boolean"
      +            },
      +            "offer_token": {
      +              "description": "Pass it unchanged to well_create_workspace_invoice_design.",
      +              "type": "string"
      +            },
      +            "starts_kept": {
      +              "description": "Whether the logo and the mentions start as kept: only for the workspace's own invoice.",
      +              "type": "boolean"
      +            }
      +          },
      +          "required": [
      +            "logo_present",
      +            "legal_mentions",
      +            "legal_mentions_unverified",
      +            "issuer_name",
      +            "issuer_relation",
      +            "starts_kept",
      +            "offer_token"
      +          ],
      +          "type": "object"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "pictures": {
      +      "additionalProperties": false,
      +      "description": "The two pictures, only when Well's chat card asked for them. An MCP host gets them in _meta instead.",
      +      "properties": {
      +        "reference_png": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        },
      +        "template_png": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        }
      +      },
      +      "required": [
      +        "reference_png",
      +        "template_png"
      +      ],
      +      "type": "object"
      +    },
      +    "reference_document_id": {
      +      "description": "The dropped invoice the design was rebuilt from.",
      +      "type": "string"
      +    },
      +    "reference_url": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "A link that opens the dropped invoice in Well, for a host that draws no card."
      +    },
      +    "review_status": {
      +      "anyOf": [
      +        {
      +          "enum": [
      +            "pending",
      +            "approved",
      +            "rejected"
      +          ],
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "approved once the person kept the template."
      +    },
      +    "revises_template_id": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "The template this revision replaces once kept; null for a first build."
      +    },
      +    "state": {
      +      "description": "building: still running. built: a template to show. not_built: ended with none.",
      +      "enum": [
      +        "building",
      +        "built",
      +        "not_built"
      +      ],
      +      "type": "string"
      +    },
      +    "template_document_id": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "The built template, once the build stored one."
      +    }
      +  },
      +  "required": [
      +    "build_id",
      +    "state",
      +    "not_built_reason",
      +    "reference_document_id",
      +    "reference_url",
      +    "template_document_id",
      +    "revises_template_id",
      +    "review_status",
      +    "offer"
      +  ],
      +  "type": "object"
      +}
    • addedOutput schema / properties / newly_connected
      Added value: +{
      +  "description": "Tools that connected to this workspace since the last result and that no session was told about yet, oldest first. Present only when at least one tool is new. Start the reply with one line per entry, in the person's language: \"<name> is connected.\". Never fold several entries into one sentence. Each entry comes back once, on one result only: never repeat its line later.",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "name": {
      +        "type": "string"
      +      },
      +      "service_id": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "name",
      +      "service_id"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / refusal_reason
      Added value: +{
      +  "description": "The WellError code when the read is refused.",
      +  "type": "string"
      +}
  7. Changed7 schema fields changed
    • addedOutput schema / properties / data / properties / customer_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "The invoice's customer, for saving their default design."
      +}
    • changedOutput schema / properties / data / properties / fields / items / properties / id / enum
      Previous value: -[
      -  "theme",
      -  "language",
      -  "payment-terms",
      -  "tax-regime",
      -  "legal-mentions",
      -  "payment-means",
      -  "customer-portal"
      -]New value: +[
      +  "theme",
      +  "language",
      +  "payment-terms",
      +  "tax-regime",
      +  "legal-mentions",
      +  "payment-means",
      +  "customer-portal",
      +  "accent"
      +]
    • addedOutput schema / properties / data / properties / layouts / items / properties / thumbnail_url
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "A picture of the design's first page; null when the design has none."
      +}
    • addedOutput schema / properties / data / properties / layouts / items / properties / tier
      Added value: +{
      +  "description": "Official designs ship with Well; every other design is a community layout.",
      +  "enum": [
      +    "official",
      +    "community"
      +  ],
      +  "type": "string"
      +}
    • changedOutput schema / properties / data / properties / layouts / items / required
      Previous value: -[
      -  "id",
      -  "name",
      -  "character",
      -  "font",
      -  "paper"
      -]New value: +[
      +  "id",
      +  "name",
      +  "character",
      +  "font",
      +  "paper",
      +  "tier",
      +  "thumbnail_url"
      +]
    • addedOutput schema / properties / data / properties / settings / description
      Added value: +"The design the card opens on, under the design_* names: each setting the invoice saved, else the customer's saved design, else the last invoice designed for this customer, else the house design, else the default."
    • changedOutput schema / properties / data / required
      Previous value: -[
      -  "invoice_id",
      -  "trigger",
      -  "layouts",
      -  "fields",
      -  "settings",
      -  "payment_link_options"
      -]New value: +[
      +  "invoice_id",
      +  "customer_id",
      +  "trigger",
      +  "layouts",
      +  "fields",
      +  "settings",
      +  "payment_link_options"
      +]
  8. Added

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources