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.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "id": "<id>"
    },
    "name": "get_invoice"
  }
}

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. Changed6 schema fields changed
    • changedOutput schema / properties / data / properties / amountDue / description
      Previous value: -"Outstanding amount in the smallest currency unit. Non-zero only on \"open\" or \"uncollectible\" invoices."New value: +"The outstanding balance, in the smallest currency unit. A voided or partially refunded invoice can keep one too, so use `status` to tell whether it is still being collected."
    • changedOutput schema / properties / data / properties / amountRefunded / description
      Previous value: -"Amount refunded against this invoice in the smallest currency unit. Refund metadata lives on the originating Charge — query list_payments by chargeId for full refund history."New value: +"Total refunded against this invoice, in the smallest currency unit. A refund updates this invoice in place and is documented on a credit note numbered after it (e.g. \"2026-000010-CN-01\"). Refund details such as the reason live on the originating payment or booking (`chargeId`)."
    • changedOutput schema / properties / data / properties / chargeId / description
      Previous value: -"Originating payment (Charge) that generated this invoice. For refund details (amountRefunded, lastRefundAt, lastRefundReason) look up the Charge via list_payments — the invoice itself does not carry refund metadata."New value: +"Originating payment (Charge) that generated this invoice. Refund details beyond `amountRefunded`, such as `lastRefundAt` and `lastRefundReason`, are on that payment or booking (see `chargeType`)."
    • changedOutput schema / properties / data / properties / lineItems / anyOf
      Previous value: -[
      -  {
      -    "items": {
      -      "additionalProperties": false,
      -      "properties": {
      -        "amount": {
      -          "description": "Line total (quantity × unitPrice) in the smallest currency unit, before discount.",
      -          "type": [
      -            "number",
      -            "null"
      -          ]
      -        },
      -        "bulkDiscountAmount": {
      -          "description": "Bulk-discount amount applied to this line, in the smallest currency unit.",
      -          "type": [
      -            "number",
      -            "null"
      -          ]
      -        },
      -        "couponCode": {
      -          "description": "Code of the coupon that produced `couponDiscountAmount`, if any.",
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "couponDiscountAmount": {
      -          "description": "Coupon-discount amount applied to this line, in the smallest currency unit.",
      -          "type": [
      -            "number",
      -            "null"
      -          ]
      -        },
      -        "name": {
      -          "description": "Display name for the line item (typically the product title or variant label).",
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "quantity": {
      -          "description": "Quantity purchased for this line.",
      -          "type": [
      -            "number",
      -            "null"
      -          ]
      -        },
      -        "type": {
      -          "anyOf": [
      -            {
      -              "enum": [
      -                "product",
      -                "setupFee",
      -                "variantOption",
      -                "ticket",
      -                "ticketFee"
      -              ],
      -              "type": "string"
      -            },
      -            {
      -              "type": "null"
      -            }
      -          ],
      -          "description": "Line item type. \"product\": a product or variant. \"setupFee\": one-time setup fee on a subscription. \"variantOption\": line for a chosen variant option. \"ticket\": event ticket. \"ticketFee\": the per-ticket fee of the ticket line above it."
      -        },
      -        "unitPrice": {
      -          "description": "Per-unit price in the smallest currency unit, before discount.",
      -          "type": [
      -            "number",
      -            "null"
      -          ]
      -        }
      -      },
      -      "type": "object"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "items": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "amount": {
      +          "description": "Line total (quantity × unitPrice) in the smallest currency unit, before discount.",
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "bulkDiscountAmount": {
      +          "description": "Bulk-discount amount applied to this line, in the smallest currency unit.",
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "couponCode": {
      +          "description": "Code of the coupon that produced `couponDiscountAmount`, if any.",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "couponDiscountAmount": {
      +          "description": "Coupon-discount amount applied to this line, in the smallest currency unit.",
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "name": {
      +          "description": "Display name for the line item (typically the product title or variant label).",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "quantity": {
      +          "description": "Quantity purchased for this line.",
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "type": {
      +          "anyOf": [
      +            {
      +              "enum": [
      +                "product",
      +                "setupFee",
      +                "variantOption",
      +                "ticket",
      +                "ticketFee",
      +                "custom"
      +              ],
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "description": "Line item type. \"product\": a product or variant. \"setupFee\": one-time setup fee on a subscription. \"variantOption\": line for a chosen variant option. \"ticket\": event ticket. \"ticketFee\": the per-ticket fee of the ticket line above it."
      +        },
      +        "unitPrice": {
      +          "description": "Per-unit price in the smallest currency unit, before discount.",
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedOutput schema / properties / data / properties / sellerBilling / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "address": {
      -        "anyOf": [
      -          {
      -            "additionalProperties": false,
      -            "properties": {
      -              "city": {
      -                "type": "string"
      -              },
      -              "country": {
      -                "type": "string"
      -              },
      -              "line1": {
      -                "type": "string"
      -              },
      -              "line2": {
      -                "type": "string"
      -              },
      -              "postalCode": {
      -                "type": "string"
      -              },
      -              "state": {
      -                "type": "string"
      -              }
      -            },
      -            "type": "object"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "description": "Seller registration address printed on the invoice."
      -      },
      -      "email": {
      -        "description": "Seller support/billing email on the invoice.",
      -        "type": [
      -          "string",
      -          "null"
      -        ]
      -      },
      -      "name": {
      -        "description": "Seller legal/display name on the invoice.",
      -        "type": [
      -          "string",
      -          "null"
      -        ]
      -      },
      -      "taxId": {
      -        "description": "Seller tax registration ID printed on the invoice.",
      -        "type": [
      -          "string",
      -          "null"
      -        ]
      -      }
      -    },
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "address": {
      +        "anyOf": [
      +          {
      +            "additionalProperties": false,
      +            "properties": {
      +              "city": {
      +                "type": "string"
      +              },
      +              "country": {
      +                "description": "ISO 3166-1 alpha-2 country code (e.g. \"GB\"). Can instead be the country as the seller typed it, on older invoices or when that text named no known country.",
      +                "type": "string"
      +              },
      +              "line1": {
      +                "type": "string"
      +              },
      +              "line2": {
      +                "type": "string"
      +              },
      +              "postalCode": {
      +                "type": "string"
      +              },
      +              "state": {
      +                "type": "string"
      +              }
      +            },
      +            "type": "object"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "Seller registration address printed on the invoice."
      +      },
      +      "email": {
      +        "description": "Seller support/billing email on the invoice.",
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "name": {
      +        "description": "Seller legal/display name on the invoice.",
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "taxId": {
      +        "description": "Seller tax registration ID printed on the invoice.",
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      }
      +    },
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedOutput schema / properties / data / properties / status / description
      Previous value: -"Invoice status. \"paid\" — payment was collected. \"open\" — outstanding. \"uncollectible\" — payment failed and was abandoned. \"refunded\" — fully refunded. \"partially_refunded\" — partial refund issued. \"void\" — cancelled. \"draft\" — not yet finalised."New value: +"Invoice status. \"paid\": payment was collected. \"open\": outstanding. \"uncollectible\": the seller has written it off as a bill the customer is not expected to pay; the customer can still pay it, and it can still be voided. \"refunded\": fully refunded. \"partially_refunded\": partly refunded. \"void\": cancelled. \"draft\": not yet finalised. A payment or refund after the invoice was issued updates its status and amounts in place, so a payment keeps one invoice; each refund is also documented on a credit note numbered after the invoice (e.g. \"2026-000010-CN-01\")."
  2. 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`."
      +}
  3. 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"
      +  }
      +]
  4. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations cover the safety profile (readOnlyHint, destructiveHint false), and the description adds genuinely new behavior: each response issues a fresh signed link safe to share, expiring one hour after the response. That expiry and re-signing behavior is the kind of operational detail annotations cannot express.

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?

Front-loaded with the core action and efficient overall, with each sentence carrying useful information. Minor redundancy: the list_invoices discovery guidance appears both in the description and in the id parameter schema.

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?

An output schema exists, yet the description still clarifies the one return element agents most need (invoiceUrl as hosted PDF) and its expiry. For a two-parameter read tool, nothing required for correct invocation is missing.

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 both parameters are already documented, and the description's livemode guidance largely restates the schema. It does add the invoiceUrl output-field meaning and link semantics, but that is return-value context rather than parameter meaning, so 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?

Opens with a specific verb+resource and scope: 'Retrieve a single invoice by id.' This is immediately distinguishable from list_invoices, which the description itself positions as the discovery path.

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 the agent: use list_invoices first to discover an id by customer, invoice number, PO number, or chargeId. It also gives a concrete condition for the livemode: false flag, so both parameters have when-to-use guidance.

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