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).
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. 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."
  2. First observed

TDQS

A4.1/5.0
Behavior3/5

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

Annotations already indicate the operation is not read-only and not destructive. The description adds that the operation changes a single line item's rate or amount and requires identifying the item by id, but it does not explain side effects such as document reindexing, validation failures, or how id resolution behaves when multiple id fields are supplied.

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?

The description is two sentences, front-loaded with purpose and scope, and ends with a useful sibling pointer. There is no filler or repetition of schema details.

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?

Given 14 parameters, zero required fields, multiple id aliases, and conditional resolution rules described only in the schema, the concise description is adequate for selection but not fully sufficient for invocation. The agent must rely heavily on schema text for id precedence and required/optional update semantics.

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 description does not need to compensate for undocumented parameters. It adds only general context ('change the rate or amount', 'Identify the item by its id'), which maps to the rate, amount, and id parameters but adds little beyond the schema.

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?

Description states a specific verb ('Update'), a precise resource ('sales-tax (VAT) on a single line item of a document'), supported document types, and the two changeable aspects (rate or amount). It also differentiates from add_document_item_salestax by explicitly scoping the operation to updates.

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?

The last sentence explicitly instructs the agent to use add_document_item_salestax when the goal is to add a new sales-tax line rather than update. This gives a clear selection rule between the two most relevant siblings.

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