Skip to main content
Glama

Change a draft invoice

update_invoice
DestructiveIdempotent

Change a DRAFT invoice in Invoices & tax (list_invoices, kind: "contractor", status draft). lines replaces every line; fields not sent are kept. It is re-priced by the tax engine. An issued invoice is never edited — a correction is a credit note a person makes in Seayora. Usually queued for the account holder to approve (read staged).

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_invoice"
  }
}

Input Schema

NameRequiredDescriptionDefault
memoNo
linesNo
termsNo
titleNo
job_idNo
job_siteNo
invoice_idYesFrom `list_invoices` (kind "contractor").
customer_idNo
customer_nameNo
customer_emailNo
property_classNo

Output Schema

NameRequiredDescriptionDefault
idNoThe created or updated record's id, when the write was applied rather than staged.
noteNoWhy the result was truncated, when it was.
stagedNoTRUE means nothing has changed yet — the write is queued in the account holder's Approvals queue in Seayora. Say it is waiting for approval; never report it as done.
draft_idNoThe staged proposal's id, when it was queued rather than performed.
truncatedNoPresent and true when the result was too large to return in full. Treat it as a partial answer.
total_availableNoHow many rows existed before truncation.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Adds substantial behavior beyond annotations: `lines` replaces every line while unsent fields are kept, the invoice is re-priced by the tax engine, draft-only restriction, and that changes are typically queued for account-holder approval readable via `staged`. This reconciles the destructiveHint=true (full line replacement) with idempotentHint=true (repeat calls converge) in a way an agent could not infer from the flags alone.

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?

Four dense sentences, front-loaded with scope and the destructive `lines` semantics, with no filler. Slightly telegraphic in places ("(read `staged`)"), but each sentence carries weight.

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 an 11-parameter mutation with nested line objects and an output schema, the description covers the critical risks: draft-only, whole-line replacement, re-pricing, and approval staging. Remaining gaps are per-field meaning for customer/terms/job fields, which is mitigated by an output schema and enums in the input schema.

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 coverage is only 9%, so the description carries most of the burden; it explains the one semantically dangerous parameter (`lines` replaces, unspecified fields kept) and how to obtain `invoice_id`. The other nine parameters (memo, terms, title, job_id, job_site, customer_*, property_class) are undocumented in both schema and description, which is a real gap, but the most consequential semantics are covered.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource+qualifier: change a DRAFT invoice, with a pointer to `list_invoices` (kind "contractor", status draft) for locating one. It is distinguishable from create_invoice and update_estimate by the draft-only scope. It does not explicitly name an alternative tool for editing issued invoices, but the credit-note answer covers the main ambiguity.

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?

Clear when-to-use (draft invoices only) and when-not (issued invoices are never edited; corrections are credit notes made by a person in the UI). It also hints at a downstream approval step to check via `staged`. No explicit pointer to a sibling update tool, but the excluded case is covered.

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