Skip to main content
Glama

create_invoice

Create a new invoice. Requires the Invoices module enabled on the account (disabled by default) — if the API returns 403 "module is not enabled", do NOT retry; tell the user to contact Sweeppea support to request access. Subtotal, TaxAmount and Total are ALWAYS computed server-side from items, discount_amount and tax_rate — never calculate or promise totals yourself; report what the API returns. The computed total must be between $1 and $1,000,000. Creating an invoice NEVER notifies the recipient automatically — sharing the PublicLink is up to the user. DISPLAY RULE: never show InvoiceToken/PublicToken UUIDs to the user; the PublicLink URL and InvoiceNumber ARE meant to be shared.

create_invoice

When to use

Create a new invoice. Requires the Invoices module enabled on the account (disabled by default) — if the API returns 403 "module is not enabled", do NOT retry; tell the user to contact Sweeppea support to request access. Subtotal, TaxAmount and Total are ALWAYS computed server-side from items, discount_amount and tax_rate — never calculate or promise totals yourself; report what the API returns. The computed total must be between $1 and $1,000,000. Creating an invoice NEVER notifies the recipient automatically — sharing the PublicLink is up to the user. DISPLAY RULE: never show InvoiceToken/PublicToken UUIDs to the user; the PublicLink URL and InvoiceNumber ARE meant to be shared.

Parameters to validate before calling

  • bill_to (object, required) — Recipient object with PascalCase keys exactly as the API expects: {"Name": "...", "Email": "..."} required; optional keys: Company, Phone, Address, City, State, ZipCode, Country, TaxId

  • items (array, required) — Line items array (min 1, max 60) with PascalCase keys: [{"Description": "..." (required), "Quantity": number (max 100), "Rate": number (max 1000000)}]. Amount per line is computed server-side

  • title (string, optional) — Invoice title/concept (max 200 characters, optional)

  • issue_date (string, optional) — Issue date in ISO format YYYY-MM-DD (optional, defaults to today)

  • due_date (string, optional) — Due date in ISO format YYYY-MM-DD (optional, defaults to account setting)

  • discount_amount (number, optional) — Flat discount amount, capped at the subtotal (optional)

  • tax_enabled (boolean, optional) — Apply tax to the invoice (optional, default false)

  • tax_label (string, optional) — Tax label shown on the invoice (optional, default "Tax")

  • tax_rate (number, optional) — range: 0–100 — Tax percentage 0-100 (optional)

  • payment_method (string, optional) — one of: card, check, transfer — Payment method (optional, default "card")

  • payment_instructions (string, optional) — Offline payment instructions — only for "check" or "transfer" methods (optional)

  • notes_to_recipient (string, optional) — Notes shown to the recipient (max 3000 characters, optional)

  • terms (string, optional) — Terms and conditions text (max 3000 characters, optional)

  • status (string, optional) — one of: draft, pending — Initial status (optional, default "draft"). "pending" publishes immediately

Notes

  • Requires the Invoices module enabled on the account — on 403 "module is not enabled", do NOT retry; tell the user to contact Sweeppea support

  • Subtotal, TaxAmount and Total are computed server-side from Items, DiscountAmount and TaxRate — never calculate totals yourself; report what the API returns

  • Computed total must be between $1 and $1,000,000; max 60 line items

  • Creating an invoice NEVER notifies the recipient — sharing the PublicLink is up to the user

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemsYesLine items array (min 1, max 60) with PascalCase keys: [{"Description": "..." (required), "Quantity": number (max 100), "Rate": number (max 1000000)}]. Amount per line is computed server-side
termsNoTerms and conditions text (max 3000 characters, optional)
titleNoInvoice title/concept (max 200 characters, optional)
statusNoInitial status (optional, default "draft"). "pending" publishes immediately
bill_toYesRecipient object with PascalCase keys exactly as the API expects: {"Name": "...", "Email": "..."} required; optional keys: Company, Phone, Address, City, State, ZipCode, Country, TaxId
due_dateNoDue date in ISO format YYYY-MM-DD (optional, defaults to account setting)
tax_rateNoTax percentage 0-100 (optional)
tax_labelNoTax label shown on the invoice (optional, default "Tax")
issue_dateNoIssue date in ISO format YYYY-MM-DD (optional, defaults to today)
tax_enabledNoApply tax to the invoice (optional, default false)
payment_methodNoPayment method (optional, default "card")
discount_amountNoFlat discount amount, capped at the subtotal (optional)
notes_to_recipientNoNotes shown to the recipient (max 3000 characters, optional)
payment_instructionsNoOffline payment instructions — only for "check" or "transfer" methods (optional)

TDQS

A4.5/5.0
Behavior5/5

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

The description extensively discloses behavioral traits beyond annotations: the 403 error handling instruction, server-side total computation, total amount limits, no automatic recipient notification, and token display rules. These details provide genuinely useful operational guidance that annotations alone do not convey.

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 description is logically structured with clear sections, but it is repetitive: the opening paragraph is duplicated in the 'When to use' section and again in the Notes section. This redundancy inflates the length without adding new information, making it less concise than it could be.

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?

Despite having no output schema and minimal annotations, the description compensates by covering error handling, response reporting ('report what the API returns'), public link sharing, and display restrictions. It provides nearly all necessary context for correct invocation and result interpretation.

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%, but the description adds extra constraints not present in the schema, such as max lengths for title (200), notes/terms (3000), and reiterates PascalCase key requirements. While much of the parameter section mirrors the schema, the additional validation details add value.

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 'Create a new invoice,' which is a specific verb+resource statement that clearly distinguishes this tool from siblings like fetch_invoices or update_invoice. It also adds scope details like requiring the Invoices module and server-side total computation, reinforcing the action and context.

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?

The 'When to use' section clearly states the tool's purpose and prerequisites, including the Invoices module requirement. However, it does not explicitly mention alternatives or when not to use this tool, so it lacks explicit exclusions but provides clear context.

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