Skip to main content
Glama

List documents

list_documents
Read-only

List the business's documents — invoices, quotes, credit notes, recurring invoices, bills, purchase orders, debit notes and goods received notes. This is the complete, authoritative document surface: it reads both document stores. Rows are paginated (50 per page, 200 max), so a count or total is only safe when taken from meta.total or from every page — never by summing one page's rows while meta.truncated is true. Rows come newest first. Optionally filter by type (invoice, quote, bill, …), direction (in/out), status (e.g. overdue, due, paid, partiallypaid), a query substring (reference/number, name, notes — jump straight to one document by its reference), currency (ISO 4217, e.g. USD), a due-date range (from/to), unpaid (only rows with an outstanding balance), min_outstanding (minimum outstanding amount) and/or repeating (only live repeat series) — combine e.g. type=bill + unpaid + status=overdue to pull only overdue bills in one call, or type=invoice + query= to fetch a specific invoice. To find what repeats, or before stopping a repeat, use repeating=true (with contact for one customer): type=recurring is a document type, not whether a series is running. Each row carries totals, outstanding, status, type, type_label and contact. Use get_document for one document's full detail.

Input Schema

NameRequiredDescriptionDefault
toNoOnly documents with a due date on/before this date (inclusive, ISO 8601; e.g. today to isolate bills due by now). Documents with no due date are kept.
fromNoOnly documents with a due date on/after this date (inclusive, ISO 8601, e.g. "2026-01-01"). Documents with no due date are kept.
typeNoThe kind of document. One of: invoice — Bill a customer for goods or services. Money in.; quote — A pre-sale estimate for a customer; becomes money in once accepted.; recurring — An invoice that repeats on a schedule. Money in.; debit_note — Reduce what you owe a supplier (offsets a bill). Money in.; credit_note — Refund or reduce a customer's invoice. Money out.; purchase_order — Order goods or services from a supplier. Money out.; bill — A supplier's bill that you owe. Money out.; grn — Record stock received against a purchase order. Money out..
limitNoMax rows to return in this page (default 50). Responses include next_cursor / truncated / total; pass next_cursor back as `cursor` to fetch the next page. Never silently truncated.
queryNoCase-insensitive substring match over the document's text (reference/number, name, notes, purchase order, contact and line items). Combine with type to jump straight to one document by its reference number, e.g. type=bill, query="4B66E86E-0286".
cursorNoOpaque pagination cursor. Omit for the first page; pass the next_cursor from a previous response verbatim to fetch the next page.
statusNoFilter to documents whose computed status matches (case-insensitive), e.g. "overdue", "due", "paid", "partiallypaid", "sent", "draft". Combine with type=bill for overdue-bill analysis.
unpaidNoWhen true, return only documents with an outstanding balance (excludes fully paid / zero-outstanding rows).
contactNoFilter to documents for this contact id (a client or supplier).
currencyNoFilter to documents in this currency (ISO 4217 code, e.g. "USD", "ZAR"). Documents with no stored currency are excluded when set.
directionNoMoney direction filter: "in" for sales documents (invoices, quotes, debit notes), "out" for purchase documents (bills, POs, credit notes, GRNs).
repeatingNoWhen true, return only the documents whose repeat schedule is on: each live series' template. Generated copies and stopped series are left out. Pass a row's id to set_recurring_invoice to stop or change that series.
min_outstandingNoOnly documents whose outstanding balance is at least this amount (inclusive).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / repeating
      Added value: +{
      +  "description": "When true, return only the documents whose repeat schedule is on: each live series' template. Generated copies and stopped series are left out. Pass a row's id to set_recurring_invoice to stop or change that series.",
      +  "type": "boolean"
      +}
  2. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations only supply readOnlyHint=true, and the description adds substantial behavior beyond that: page size 50 with 200 max, newest-first ordering, an explicit warning against summing a single page while meta.truncated is true, and the fact that rows with no due date or no stored currency are kept/excluded. It does not discuss any auth or rate-limit constraints, but for a read-only list tool that is minor.

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 what the tool is and the pagination-count hazard before the filter enumeration, and every sentence is substantive. It is dense and long, but the length is driven by 13 parameters rather than padding; the filter list is a readable single sentence rather than a redundant restatement of the 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?

No output schema, yet the description covers the return surface itself — per-row fields (totals, outstanding, status, type, contact), meta.total/meta.truncated/next_cursor, and page ordering. Combined with 13 fully documented parameters, an agent has everything needed to call this correctly and interpret the result.

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 baseline is 3; the description still adds real value by explaining how filters compose, by demonstrating query as a reference-number jump, and by clarifying the recurring/repeating semantic trap that the enum description alone does not resolve. It does not add format details beyond the schema for from/to, limit or min_outstanding.

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?

Specific verb+resource with the full inventory of document kinds enumerated, plus the claim that it is 'the complete, authoritative document surface: it reads both document stores.' It explicitly contrasts with get_document, but does not address narrower siblings such as list_invoices or list_expenses, which an agent will see in the tool list and may pick instead.

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?

Gives concrete worked combinations (type=bill + unpaid + status=overdue; type=invoice + query=<ref>) and an explicit disambiguation warning: 'type=recurring is a document type, not whether a series is running' — use repeating=true instead. It also names the alternative for single-record retrieval ('Use get_document for one document's full detail').

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