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

TableJSON 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

TableJSON Schema
NameRequiredDescriptionDefault
dataYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false. The description goes beyond them by disclosing that each response signs a new invoiceUrl, that the link expires 1 hour after the response, and that it is safe to share with the buyer, plus livemode test-record behavior. It does not cover error modes or rate limits, but the added behavioral context is substantial.

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-loads the core action, then layers usage routing and behavioral detail in short, purposeful sentences. Slightly dense with the URL-expiry tangent, but no sentence is wasted.

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?

For a two-parameter read tool with a full output schema, the description covers routing, mode selection, and the key return field's behavior. An agent has everything needed to call it correctly; output-schema details need not be restated.

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 the schema already documents both id and livemode. The description's mention of livemode: false for test-mode records largely duplicates the schema, so it sits at the baseline of 3.

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 clearly scopes it as a single-record fetch, distinguishing it from list_invoices and regenerate_invoice by name. An agent can route to it 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 tells the agent to use list_invoices first to discover an id (by customer, invoice number, PO number, or chargeId), and names regenerate_invoice as the alternative for rebuilding the PDF. Both the when-to-use and the when-to-use-something-else conditions are provided.

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