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) and/or min_outstanding (minimum outstanding amount) — 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. Each row carries totals, outstanding, status, type, type_label and contact. Use get_document for one document's full detail.

Input Schema

TableJSON 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).
min_outstandingNoOnly documents whose outstanding balance is at least this amount (inclusive).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the readOnlyHint annotation, it discloses pagination behavior (50 per page, 200 max), newest-first ordering, the meta.total/truncated pitfall, and that it reads both document stores. It also explains that rows carry totals/outstanding/status fields, which matters because there is no output schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Although long, every clause earns its place: purpose first, then the pagination warning, filters with examples, row fields, and the handoff to get_document. The potential wall-of-text is justified by a 12-parameter tool and is front-loaded with the most important caveat.

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 list tool with no output schema, it covers pagination, filter combinations, ordering, row contents, and the alternative for full detail. Nothing needed to call the tool correctly or interpret the response 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 already strong. The description adds value by grouping the filters, clarifying the query substring semantics, and giving ready-made combinations. It doesn't go deep on every parameter, but the schema already handles those details.

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?

The opening sentence names the verb ('List') and the exact resource ('the business's documents'), enumerates every document type, and asserts it is the complete authoritative surface reading both document stores. This also distinguishes it from narrower list tools such as list_invoices and from get_document.

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 explicit routing guidance ('Use get_document for one document's full detail') and concrete composition examples (type=bill + unpaid + status=overdue, or type=invoice + query=<ref>). It does not explicitly name the 'when not to use' cases for sibling list tools like list_invoices or search_combined, but the context is clear.

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