Skip to main content
Glama

get_invoice

Read-only

Retrieve a single invoice by id. Pass livemode: false to read test-mode records. invoiceUrl links to the hosted PDF, the document customers usually ask for. Each response signs a new link, safe to share with the buyer, that expires 1 hour after the response. Use list_invoices first to discover an id by customer, invoice number, PO number, or the payment it belongs to (chargeId). Read-only; use regenerate_invoice to rebuild the PDF.

Input Schema

NameRequiredDescriptionDefault
idYesThe ID of the invoice to retrieve. Use `list_invoices` first if you need to discover the invoice ID by customer email, customer name, invoice number, PO number, or the payment it belongs to (`chargeId`).
livemodeNoSet to false to read test-mode records (created while a page was in test mode). Defaults to live records.

Output Schema

NameRequiredDescriptionDefault
dataYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / properties / data / properties / processingFeeContribution
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": false,
      +      "properties": {
      +        "amount": {
      +          "description": "Contribution in the smallest currency unit.",
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "name": {
      +          "description": "Name shown on the invoice, frozen at payment.",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        }
      +      },
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "What the customer chose to add to cover the processing fee, added after tax and never taxed. Not one of `fees`."
      +}
  2. Changed1 schema field changed
    • changedOutput schema / properties / data / properties / fees / anyOf
      Previous value: -[
      -  {
      -    "items": {
      -      "additionalProperties": false,
      -      "properties": {
      -        "amount": {
      -          "description": "Fee amount in the smallest currency unit.",
      -          "type": [
      -            "number",
      -            "null"
      -          ]
      -        },
      -        "name": {
      -          "description": "Display name for the fee (e.g. \"Shipping\", \"Processing\").",
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "percentage": {
      -          "description": "Fee as a percentage of the subtotal (0-100), when defined that way.",
      -          "type": [
      -            "number",
      -            "null"
      -          ]
      -        }
      -      },
      -      "type": "object"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "items": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "amount": {
      +          "description": "Fee amount in the smallest currency unit. For a fee with both a percentage and a fixed amount, the sum of `percentageAmount` and `fixedAmount`.",
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "fixedAmount": {
      +          "description": "The fixed part of `amount`, in the smallest currency unit, already multiplied by quantity or tickets when the fee multiplies. Only set on a fee with both a percentage and a fixed amount.",
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "name": {
      +          "description": "Display name for the fee (e.g. \"Shipping\", \"Processing\").",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "percentage": {
      +          "description": "Fee as a percentage of the subtotal (0-100), when defined that way.",
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "percentageAmount": {
      +          "description": "The part of `amount` from the percentage, in the smallest currency unit. Only set on a fee with both a percentage and a fixed amount. Can be 0, e.g. when a 100% coupon leaves nothing for the percentage to apply to.",
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  3. First observed

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only cover the read-only safety profile; the description goes further, disclosing that responses carry a freshly signed link, that the link expires one hour after the response, that it is safe to share with the buyer, and how to reach test-mode records. That is substantive behavioral context the annotations do not provide.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four tight sentences, front-loaded with the core action and ending with the sibling routing. The `livemode` sentence mildly duplicates the schema description, but nothing is padded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With only two params, full schema coverage, an output schema, and annotations, the description supplies exactly the missing pieces: link freshness/expiry and sharing safety. Nothing an agent needs to call or interpret this tool is absent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so `id` and `livemode` are already fully documented. The description's `livemode: false` note and id-discovery hint restate the schema rather than adding syntax or format meaning, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ("Retrieve a single invoice by id") and immediately contrasts with list_invoices for discovery. An agent can distinguish it from get_payment, get_customer, and list_invoices without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly routes: use `list_invoices` first to discover an id by customer, invoice number, PO number, or chargeId, and names `regenerate_invoice` for rebuilding the PDF. Both the when-to-use and the alternative are stated rather than inferred.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources