Skip to main content
Glama

Create invoice

crunch_create_invoice

Create a draft sales invoice for a client with dated line items, VAT rates, payment terms and bank account details. The invoice stays a draft until you issue it.

Instructions

Create a draft sales invoice for a client: date, lines (description, unit price excluding VAT, quantity, VAT rate), payment terms and the bank account to be paid into. Crunch's API only supports GBP. The invoice stays a draft until crunch_issue_invoice. Look up the client (crunch_list_clients), VAT rates (crunch_list_vat_types for=invoices) and bank account first.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "client_id": "<client_id>",
      "issued_date": "<issued_date>",
      "items": "<items>"
    },
    "name": "crunch_create_invoice"
  }
}

Input Schema

NameRequiredDescriptionDefault
noteNoNote printed on the invoice (see crunch_get_default_invoice_note)
extraNoAdditional raw SalesInvoiceDto fields, using Crunch's own field names (advanced). Merged last.
itemsYesInvoice lines
dry_runNoPreview: return the request that would be sent (for an update, the fields that would change) without sending it
due_dateNoDue date (YYYY-MM-DD); worked out from the payment terms when omitted
client_idYesCustomer to invoice (see crunch_list_clients; create one with crunch_create_client)
referenceNoYour reference
attachmentsNoUp to 5 files to attach
issued_dateYesInvoice date (YYYY-MM-DD)
line_item_typeNoSIMPLE (default) or DETAILED lines
purchase_orderNoThe customer's purchase order number
send_remindersNoHave Crunch email the customer payment reminders (true needs CRUNCH_ALLOW_EMAIL=true)
bank_account_idNoBank account the customer should pay into, shown on the invoice (see crunch_list_bank_accounts)
payment_terms_daysNoPayment terms in days, for example 28

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.7.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare a non-read-only, non-destructive, non-idempotent write, so the description's job is to add context — and it does: the record stays a draft until crunch_issue_invoice, and the API only supports GBP, which is a real constraint not present in the schema or annotations. It does not warn that repeated calls create duplicate invoices (relevant given idempotentHint=false), leaving one meaningful behavioral gap.

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?

Three front-loaded sentences: purpose, constraints, then prerequisites. The parenthetical enumeration of line fields is partly redundant against a 100%-covered schema, but it reads as a quick mental model rather than filler, so the cost is minor.

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?

For a 14-parameter tool with nested line and attachment objects and no output schema, the description covers the critical unknowns: draft lifecycle, currency limitation, and the lookup sequence needed to satisfy client_id, vat_rate and bank_account_id. It does not describe what the call returns or how the created invoice is identified, which is the main remaining gap given there is no output schema.

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 would be 3; the description adds value by naming the line composition (description, unit price excluding VAT, quantity, VAT rate), pointing to payment terms and bank account, and clarifying that VAT rates come from crunch_list_vat_types with for=invoices. It also adds the GBP-only constraint that no parameter expresses. It stops short of explaining attachments, dry_run, extra, or send_reminders, which remain schema-only.

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?

States a specific verb and resource ('Create a draft sales invoice for a client') and immediately scopes it as a draft, which separates it from crunch_issue_invoice and crunch_update_invoice in the sibling list. An agent can identify the operation without opening the schema.

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 an explicit prerequisite workflow ('Look up the client (crunch_list_clients), VAT rates (crunch_list_vat_types for=invoices) and bank account first') and names the follow-up tool that turns the draft into a live invoice (crunch_issue_invoice). This is when-to-use guidance plus alternatives, not just a restatement of purpose.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools