Skip to main content
Glama

Create a draft invoice (preview, then confirm)

accounting_create_invoice_draft

Create a DRAFT customer invoice (never sent, not in the ledger until the business sends it from GetAccountED). VAT at 15% if the business is a VAT vendor. TWO STEPS: first call returns the totals + confirm_token; second call with confirm_token saves the draft. Changes the user's real books — only after they have seen the preview and agreed. Needs the user's GetAccountED sign-in (they are asked to sign in the first time).

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": {
      "lines": "<lines>"
    },
    "name": "accounting_create_invoice_draft"
  }
}

Input Schema

NameRequiredDescriptionDefault
linesYesInvoice lines
notesNoNote printed on the invoice (optional)
due_dateNoYYYY-MM-DD (default: the business's payment terms)
business_idNoAccounting practices only: which client's books (an id from accounting_list_my_businesses). Leave out to use the books chosen at sign-in.
customer_idNoExisting customer id
confirm_tokenNoSecond step only: the token from the preview
customer_nameNoOr the customer's name (must match one customer)
create_customerNoCreate the customer by customer_name if none matches
prices_include_vatNotrue = unit prices already include VAT; false = VAT added on top. Default: the business's invoice setting.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / lines / items / properties / description / description
      Added value: +"What is being invoiced on this line"
    • addedInput schema / properties / lines / items / properties / quantity / description
      Added value: +"Number of units (default 1)"
    • addedInput schema / properties / lines / items / properties / vat_category / description
      Added value: +"VAT treatment of this line (default standard)"
    • addedInput schema / properties / notes / description
      Added value: +"Note printed on the invoice (optional)"
  2. Added

TDQS

A4.4/5.0
Behavior5/5

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

Adds substantial context beyond the annotations: the output is a draft that is never sent and never hits the ledger, a confirm_token gates the write, VAT is applied at 15% for VAT vendors, and the user must sign in to GetAccountED. That reassures the agent about the state change implied by readOnlyHint=false while remaining consistent with destructiveHint=false (a draft is additive, not destructive).

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?

Compact and front-loaded: what it creates, what state it lands in, the VAT rule, the two-step flow, and the safety precondition. Minor redundancy between 'the user's real books' and the sign-in note, but nothing is wasted.

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 9-parameter mutation tool with no output schema, the definition covers the state change, the two-call protocol, the return of totals and confirm_token, tax treatment, and the sign-in prerequisite. An agent has everything needed to call it correctly and warn the user.

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 every parameter already carries meaning. The description only adds the VAT-vendor rule that contextualises vat_category and prices_include_vat, without explaining confirm_token, customer resolution, or business_id beyond what the schema says – baseline 3 is appropriate.

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 customer invoice') and immediately scopes it ('never sent, not in the ledger'), which clearly separates it from sending or listing invoices.

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?

Gives concrete usage conditions: only call the save step after the user has seen the preview and agreed, and the two-step sequence is spelled out. It doesn't name alternative tools (e.g. listing invoices) or say when a draft is unnecessary, so it falls short of a 5.

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.