Skip to main content
Glama

Update document item salestax

update_document_item_salestax

Update the sales-tax (VAT) on a single line item of a document (invoice, quote, credit note, debit note) — change the rate or amount. Identify the item by its id. To add a new sales-tax line use add_document_item_salestax.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoSales-tax line id. On update, identifies which sales-tax to change (or pass :salestaxid); omit on add.
nameNoSales-tax name (e.g. "VAT").
rateNoSales tax rate as a DECIMAL FRACTION, e.g. 0.15 = 15% (NOT 15). A rate of 1.0 (100%) or higher is rejected.
amountNoFixed sales-tax amount, used instead of :rate when :useamount is true.
itemidNoId of the document line item this sales-tax attaches to. On update, if :id/:salestaxid are omitted and the item has exactly one sales-tax, it is resolved from here.
invoiceNoAlias for the parent document id (see :quinvoice).
parentidNoId of the business's own sales-tax definition this line applies (see get_business_profile salestaxes). On add, when omitted, the definition is matched by name, then by rate when exactly one definition has that rate. If several match, the call is refused and lists their ids; pass one as parentid. A 0 rate with no name match stays unlinked.
exclusiveNoWhether the tax is exclusive (added on top of the line amount) rather than inclusive (already contained in it).
invoiceidNoAlias for the parent document id (see :quinvoice); takes precedence when several are supplied.
quinvoiceNoId of the parent document (invoice, quote, credit/debit note). Used to reindex the correct document; aliased by :invoice / :invoiceid.
useamountNoUse the fixed :amount instead of computing tax from :rate.
responseidNoInternal: correlation id used to return the updated entity to the frontend; omit.
salestaxidNoId of the sales-tax to update (alternative to :id).
recoverableNoWhether this input sales tax / VAT is recoverable.
referencenumberNoSales-tax registration / reference number.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / parentid
      Added value: +{
      +  "description": "Id of the business's own sales-tax definition this line applies (see get_business_profile salestaxes). On add, when omitted, the definition is matched by name, then by rate when exactly one definition has that rate. If several match, the call is refused and lists their ids; pass one as parentid. A 0 rate with no name match stays unlinked.",
      +  "type": "string"
      +}
  2. Changed13 schema fields changed
    • addedInput schema / properties / amount / description
      Added value: +"Fixed sales-tax amount, used instead of :rate when :useamount is true."
    • addedInput schema / properties / exclusive / description
      Added value: +"Whether the tax is exclusive (added on top of the line amount) rather than inclusive (already contained in it)."
    • addedInput schema / properties / id / description
      Added value: +"Sales-tax line id. On update, identifies which sales-tax to change (or pass :salestaxid); omit on add."
    • addedInput schema / properties / invoice / description
      Added value: +"Alias for the parent document id (see :quinvoice)."
    • addedInput schema / properties / invoiceid / description
      Added value: +"Alias for the parent document id (see :quinvoice); takes precedence when several are supplied."
    • addedInput schema / properties / itemid / description
      Added value: +"Id of the document line item this sales-tax attaches to. On update, if :id/:salestaxid are omitted and the item has exactly one sales-tax, it is resolved from here."
    • addedInput schema / properties / name / description
      Added value: +"Sales-tax name (e.g. \"VAT\")."
    • addedInput schema / properties / quinvoice / description
      Added value: +"Id of the parent document (invoice, quote, credit/debit note). Used to reindex the correct document; aliased by :invoice / :invoiceid."
    • addedInput schema / properties / recoverable / description
      Added value: +"Whether this input sales tax / VAT is recoverable."
    • addedInput schema / properties / referencenumber / description
      Added value: +"Sales-tax registration / reference number."
    • addedInput schema / properties / responseid / description
      Added value: +"Internal: correlation id used to return the updated entity to the frontend; omit."
    • addedInput schema / properties / salestaxid / description
      Added value: +"Id of the sales-tax to update (alternative to :id)."
    • addedInput schema / properties / useamount / description
      Added value: +"Use the fixed :amount instead of computing tax from :rate."
  3. First observed

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false and destructiveHint=false, so the write/safe-mutation profile is covered. The description adds only that rate or amount may change; it does not disclose side effects such as reindexing the parent document, whether document totals are recomputed, or the rejection/refusal behavior on ambiguous matches (all of which only appear in the schema text).

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?

Two tight sentences, front-loaded with the operation and scope, followed by the sibling routing. The middle clause 'Identify the item by its id' is the weakest sentence — vague and partially at odds with the schema — but it costs little.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 15-parameter mutation with four overlapping document-id aliases (invoice, invoiceid, quinvoice) and an internal responseid, the description says nothing about which identifiers matter or that only one line is affected per call. Annotations cover the safety profile and the schema covers the parameters, but the description adds little orientation for such a wide signature.

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 the schema already documents all 15 parameters, including the alias precedence rules and the decimal-fraction rate convention. The description contributes only the loose phrase 'change the rate or amount,' and its 'identify the item by its id' phrasing is less precise than the schema's definition of id as the sales-tax line id.

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?

The description names a specific verb and resource — update the sales-tax on a single document line item — and enumerates the document types it applies to (invoice, quote, credit note, debit note), which is enough to distinguish it from add_document_item_salestax. It is slightly muddied by 'Identify the item by its id,' since the schema defines id as the sales-tax line id, not the parent item id.

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 explicitly routes the agent to add_document_item_salestax for the add case, which is the nearest sibling and the most likely confusion. It stops short of stating prerequisites (e.g. that the document must exist, or when to use update_document_items_bulk instead for multiple lines, or update_document_item for the line itself).

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