Skip to main content
Glama

Get Invoice

get_invoice
Read-only

One invoice, quote or credit note as its page shows it: customer, store, the sales order it bills (or, for a quote, the order it was converted into), dates, totals, every line with quantity, price, discount and tax, and the payments recorded against it. nextStep says what the invoicing tools can do with it now.

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": {
      "invoiceId": "<invoiceId>"
    },
    "name": "get_invoice"
  }
}

Input Schema

NameRequiredDescriptionDefault
clientIdNoOptional client id (GUID) for operator (unpinned) credentials on 3PL tenants.
invoiceIdYesDocument id (GUID) or number from list_invoices.

Output Schema

NameRequiredDescriptionDefault
noteNo
dueAtNo
linesNo
numberNo
paidAtNo
statusNo
storeIdNo
currencyNo
nextStepNo
paymentsNo
subtotalNo
invoiceIdNo
storeNameNo
taxAmountNo
customerIdNo
invoiceDateNo
totalAmountNo
customerNameNo
documentKindNo
internalNoteNo
paymentTermsNo
salesOrderIdNo
paymentMethodNo
discountAmountNo
salesOrderNumberNo
sourceDocumentIdNo
sourceDocumentNumberNo
convertedSalesOrderIdNo
convertedSalesOrderNumberNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnly, non-destructive, closed-world behavior, so the descriptive bar is lower, and the description still adds real context: it discloses that the response mirrors the document's page view and that a nextStep field reports what invoicing actions are available on the document. Gaps remain around not-found behavior and any tenant/permission constraints.

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?

Two sentences with the purpose front-loaded and no filler; the long field enumeration is dense but each item aids recognition of the payload. Slightly over-long in the field list given an output schema exists.

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

Completeness4/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 full schema coverage, annotations, and an output schema, the description covers what it returns and what nextStep signals. Nothing essential to invoking it correctly is missing; the only shortfall is the absence of explicit when-to-use routing.

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 coverage is 100%, so both parameters are already documented, including clientId's 3PL/unpinned-credential caveat and invoiceId accepting a GUID or number. The description adds no parameter-level meaning, so the baseline of 3 applies.

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

Purpose4/5

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

The description states a specific resource and scope: a single invoice, quote, or credit note retrieved as its page presents it. The enumeration of what the page contains (customer, store, sales order link, dates, totals, lines, payments) makes it unmistakable this is a single-document fetch rather than a list. It stops short of naming sibling alternatives (e.g., list_invoices) as the contrast case, which keeps it at 4.

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

Usage Guidelines3/5

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

Usage is implied by 'One invoice' and the invoiceId reference to list_invoices, suggesting the list-then-fetch pattern, but there is no explicit 'use this when' or exclusion statement. The nextStep hint gestures at follow-on workflow without saying which tools to choose or when not to call this one.

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