Skip to main content
Glama

getInvoices

Read-only

List invoices. Pass customerRef or locationRef to scope the list; without either it lists the invoices of every location in the network. Call getLocations to list locations, or getLocation to fetch one by locationId. Call getCustomers to list valid customerRef values. Use issueDate to filter by issue date. Use createDate to filter by invoice creation date. Filter by status, issueDate, or createDate. Search by invoice code or number with q.

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": "getInvoices"
  }
}

Input Schema

NameRequiredDescriptionDefault
qNoCase-insensitive search by invoice code or number.
limitNoMaximum number of invoices per page. Defaults to 25 when omitted or invalid; values above 100 are capped at 100.
statusNoFilter by invoice status: draft (created but not sent), issued (sent to the customer but unpaid), paid (fully paid) or voided (cancelled and no longer valid). Comma-separated, one or more of: draft, issued, paid, voided.
issueDateNoFilter by issue date (issueDate). Provide gte, lte ISO datetimes.
createDateNoFilter by create date (createDate). Provide gte, lte ISO datetimes.
customerRefNoUUID of the customer whose invoices to list. Without customerRef or locationRef, lists the invoices of the whole network.
locationRefNoUUID of the location whose invoices to list.
nextPageTokenNoPagination token from nextPageToken in a previous response. Keep the same filters when fetching the next page.

Output Schema

NameRequiredDescriptionDefault
invoicesYes
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

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description's one real behavioral contribution is the warning that an unscoped call returns invoices for every location in the network, which matters for result size, but it says nothing about ordering, result volume, or rate limits, and the same network-wide default is already spelled out in the customerRef schema description.

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?

The scoping rule is front-loaded where an agent needs it, which is good structure. However, the definition is padded by redundancy: "Use issueDate to filter by issue date," "Use createDate to filter by invoice creation date," and then a further "Filter by status, issueDate, or createDate" convey nothing the schema does not already state.

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?

With a full output schema, complete annotation coverage and 100% parameter description coverage, the description only needs to supply selection logic and scoping context, which it largely does. The gap is minor: it never mentions paginating via nextPageToken in prose, leaving the agent to discover paging purely from the schema.

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 every one of the eight parameters, including the nested gte/lte date bounds and nextPageToken, is already documented in the schema. The description restates the meaning of q, status, issueDate and createDate without adding any syntax, format, or interaction detail the schema lacks, so the baseline of 3 is correct.

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 definition opens with a specific verb plus resource ("List invoices") and immediately defines scope semantics: customerRef or locationRef narrows the result set, and omitting both falls back to the entire network. An agent can tell exactly what this tool returns without consulting the schema, though the phrasing is plain rather than sharply differentiating it from a hypothetical search variant.

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

Usage Guidelines4/5

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

It gives concrete when-to-use guidance for the scoping parameters and routes the agent to the right helper tools for obtaining valid values (getLocations, getLocation, getCustomers). It stops short of explicit exclusions or of saying when not to use this tool, and the later sentence "Filter by status, issueDate, or createDate" is a flat restatement rather than new 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