Skip to main content
Glama

getInvoiceItems

Read-only

List invoice items. Pass customerRef, locationRef, or invoiceRef for the items of one invoice; without any of them it lists the items of every location in the network. All of them page with nextPageToken. pending=true returns items not on an invoice and not part of a subscription yet (bookings and purchases paid with the Invoice payment method that are waiting to be billed), pending=false the rest, and omitting it returns both. createDate filters by when the item was created; status and issueDate filter by the invoice the item is on. Get invoiceRef from getInvoices. Call getLocations to list locations, or getLocation to fetch one by locationId. Call getCustomers to list valid customerRef values. Never invent UUIDs; only use values from prior tool responses.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

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

Input Schema

NameRequiredDescriptionDefault
typeNoFilter by invoice item type. Comma-separated, one or more of: creditPackage, custom, booking, eventTicket, subscription, order.
limitNoMaximum number of invoice items per page. Defaults to 25 when omitted or invalid; values above 100 are capped at 100.
statusNoFilter by the status of the invoice the item is on: draft (created but not sent), issued (sent to the customer but unpaid), paid (fully paid) or voided (cancelled and no longer valid). Items not on an invoice are excluded. Comma-separated, one or more of: draft, issued, paid, voided.
pendingNoFilter by whether the item is pending: not on an invoice and not part of a subscription. Pass true or false.
issueDateNoFilter by issue date (issueDate). Provide gte, lte ISO datetimes.
createDateNoFilter by create date (createDate). Provide gte, lte ISO datetimes.
invoiceRefNoUUID of the invoice whose items to list, in place of customerRef or locationRef or with them. Pages and sorts like the rest of the list, and the other filters still apply.
customerRefNoUUID of the customer whose invoice items to list.
locationRefNoUUID of the location whose invoice items to list. Without customerRef, invoiceRef or locationRef, lists the invoice items of the whole network.
nextPageTokenNoPagination token from nextPageToken in a previous response. Keep the same filters when fetching the next page.

Output Schema

NameRequiredDescriptionDefault
invoiceItemsYes
nextPageTokenNoPass it back as nextPageToken, with the same filters, to get the next page. Absent on the last page.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnly, non-destructive and closed-world, so the safety profile is covered. The description adds genuine behavior beyond that: the default scope is the entire network (a potentially large result set), every mode pages via nextPageToken, and pending=true specifically covers bookings and Invoice-payment-method purchases awaiting billing. It does not describe sort order or result volume, which would be the remaining behavioral gaps.

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 scope rule, then filter semantics, then ref-sourcing guidance and the UUID warning — a sensible ordering with little waste. Slightly dense at five sentences, and the pagination sentence partially restates what nextPageToken's schema description already implies.

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 an output schema present, return values need not be explained, and the description covers everything else an agent needs: default scope, scoping alternatives and their combination, pagination, filter targets, and where to obtain each UUID. Nothing required to invoke it correctly is missing.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds cross-parameter meaning the schema does not: status/issueDate are attributes of the parent invoice rather than the item, createDate is an item attribute, and invoiceRef may be combined with customerRef/locationRef or used in place of them. It also enriches the pending semantics beyond the schema's terse definition.

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 opening verb+resource ('List invoice items') is specific, and the description immediately clarifies the two scoping modes: scoped by customerRef/locationRef/invoiceRef versus network-wide when none are supplied. It does not explicitly contrast with the singular sibling getInvoiceItem, so an agent must infer that distinction from the plural name alone.

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?

It gives explicit conditions for each mode (refs for one invoice, no refs for the whole network), spells out the pending tri-state (true/false/omit) with the exact meaning of each, and states which filter targets which date (createDate = item creation, status/issueDate = the parent invoice). It also routes the agent to the correct source tools for valid refs (getInvoices, getLocations, getLocation, getCustomers) and warns against inventing UUIDs.

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