Skip to main content
Glama

fetch_invoices

Read-onlyIdempotent

Fetch a paginated list of invoices for the account, with optional filters by status and date range. Requires the Invoices module enabled on the account — on a 403 "module is not enabled" error, do NOT retry; tell the user to contact Sweeppea support. The Summary block (totals and counts) covers the ENTIRE filtered set, not just the current page. IsOverdue is derived at read time (stored status stays "pending"). Archived invoices are included with Archived: true. For full details of one invoice (line items, notes, QR) use get_invoice. DISPLAY RULE: never show InvoiceToken/PublicToken UUIDs — present InvoiceNumber, recipient, dates, totals and status instead.

fetch_invoices

When to use

Fetch a paginated list of invoices for the account, with optional filters by status and date range. Requires the Invoices module enabled on the account — on a 403 "module is not enabled" error, do NOT retry; tell the user to contact Sweeppea support. The Summary block (totals and counts) covers the ENTIRE filtered set, not just the current page. IsOverdue is derived at read time (stored status stays "pending"). Archived invoices are included with Archived: true. For full details of one invoice (line items, notes, QR) use get_invoice. DISPLAY RULE: never show InvoiceToken/PublicToken UUIDs — present InvoiceNumber, recipient, dates, totals and status instead.

Parameters to validate before calling

  • status (string, optional) — one of: draft, pending, paid, cancelled — Filter by invoice status (optional)

  • from_date (string, optional) — Inclusive start date in ISO format YYYY-MM-DD (optional)

  • to_date (string, optional) — Inclusive end date in ISO format YYYY-MM-DD (optional)

  • page (number, optional) — range: 1–+∞ — Page number (optional, default 1)

  • limit (number, optional) — range: 1–200 — Results per page (optional, default 50, max 200)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoPage number (optional, default 1)
limitNoResults per page (optional, default 50, max 200)
statusNoFilter by invoice status (optional)
to_dateNoInclusive end date in ISO format YYYY-MM-DD (optional)
from_dateNoInclusive start date in ISO format YYYY-MM-DD (optional)

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already declare readOnlyHint, idempotentHint, and non-destructive. The description adds substantial beyond annotations: Summary covers the entire filtered set (not just page), IsOverdue is computed at read time, archived invoices are included with Archived: true, a display rule for UUIDs, and module prerequisite with 403 handling. No contradiction with annotations.

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

Conciseness3/5

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

The first paragraph is duplicated verbatim in the Markdown section under '# fetch_invoices', making the description longer than necessary. However, the unique content is front-loaded and each distinct fact (module requirement, summary behavior, display rule, alternative tool) is meaningful and non-redundant.

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?

The description covers module prerequisite, error handling, pagination, archived inclusion, derived field, display rule, and alternative tool usage. It also hints at return fields via the display rule (InvoiceNumber, recipient, dates, totals, status). Without an output schema, a full field list is missing, but the provided context is strong for a list-fetch tool.

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 the baseline is 3. The description's parameter validation repeats schema constraints (enum values, min/max, defaults) with minimal added value. It adds 'range: 1–+∞' for page, but schema already has minimum 1. Overlapping content means no significant semantic enhancement beyond schema.

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 description opens with a specific verb and resource: 'Fetch a paginated list of invoices for the account, with optional filters by status and date range.' It clearly distinguishes from siblings like get_invoice (single invoice details) and mutation tools (create/delete/update_invoice), and even names the alternative get_invoice for full details.

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?

Explicit usage guidance is provided: 'For full details of one invoice (line items, notes, QR) use get_invoice.' It also gives error-handling instructions (403 module not enabled: do not retry, contact support) and clarifies summary/pagination behavior, which helps decide when to use this tool.

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.

TDQS

A3.6/5.0
Disambiguation4/5

Most tools follow a clear resource+action pattern (fetch_* for lists, get_* for single items, create/update/delete for writes), making them distinguishable. A few near-overlaps exist (fetch_billing_transactions vs fetch_wallet_transactions, draw_winners vs schedule_drawing) but the descriptions clarify the boundaries.

Naming Consistency4/5

Tool names consistently use snake_case verb_noun, with fetch_ for list operations and get_ for single-item retrieval. Some verb variation (add_participant, count_participants, draw_winners, schedule_drawing) deviates from the dominant create/fetch/update/delete pattern but remains predictable and readable.

Tool Count1/5

With 83 tools, this is far beyond a well-scoped server (typically 3-15, with 25+ considered too many). Even though the platform has broad functionality, the sheer number of tools creates significant agent confusion and selection overhead.

Completeness4/5

The sweepstakes domain is thoroughly covered: lifecycle management, participants, groups, rules, drawings, winners, calendar, notes, todos, tickets, surveys, invoices, billing, files, and entry settings. A few minor gaps exist (e.g., no general participant field update, no archive action) but the surface is remarkably complete for its scope.

Resources