Skip to main content
Glama

Update draft invoice

update_draft_invoice
DestructiveIdempotent

Update editable fields on a DRAFT invoice (notes, internal notes, payment terms, payment instructions, due date, purchase order number). Only valid while the invoice is still a Draft. Only the fields you send change; an empty value counts as not sent, so a field can be replaced but not cleared here (blank payment terms would become "Net 30", and the due date can not be removed).

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": {
      "invoice_id": "<invoice_id>"
    },
    "name": "update_draft_invoice"
  }
}

Input Schema

NameRequiredDescriptionDefault
notesNoNotes to appear on the invoice.
due_dateNoDue date override (ISO 8601).
invoice_idYesId of the draft invoice to update.
payment_termsNoPayment terms, e.g. "Net 30".
internal_notesNoInternal notes (not on the printed invoice).
idempotency_keyNoOptional caller-supplied key; retrying with the same key returns the original result instead of acting twice.
payment_instructionsNoBank / payment instructions for the customer.
purchase_order_numberNoCustomer PO number to reference on the invoice.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations (destructiveHint=true, idempotentHint=true), the description discloses the partial-update model ('Only the fields you send change') and a non-obvious hazard: empty values count as not-sent, so fields cannot be cleared, blank payment terms default to "Net 30", and the due date cannot be removed. That is exactly the kind of silent-substitution behavior an agent must know before mutating.

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?

Three sentences, front-loaded with the verb, resource, and field list, then the precondition, then the edge-case semantics. Every clause carries information, and the parenthetical example about "Net 30" makes the abstract rule concrete without padding.

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 non-readonly mutation with no output schema and eight parameters, the description covers preconditions, field scope, and partial-update edge cases well. It omits what happens on a non-draft or otherwise invalid invoice (error vs. silent no-op) and the success response shape, both of which an agent would want before calling.

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 3, but the description adds real meaning the schema lacks: which fields are actually editable, how empty values are interpreted, and the specific consequence for payment_terms and due_date. It stops short of explaining invoice_id scope or idempotency_key, which the schema already covers.

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 states a specific verb (update) and resource (draft invoice), then enumerates exactly which fields are editable (notes, internal notes, payment terms, payment instructions, due date, PO number). The 'Only valid while the invoice is still a Draft' clause cleanly separates it from issue_invoice, void_invoice, and delete_draft_invoice.

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 an explicit precondition for use ('Only valid while the invoice is still a Draft'), which is the key routing signal for this operation. It does not, however, name which sibling to call instead once the invoice is issued (e.g., an amend/reissue path), leaving that inference to the agent.

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