Skip to main content
Glama

Add document item salestax

add_document_item_salestax

Add a sales-tax (VAT) line to a single line item on a document (invoice, quote, credit note, debit note). Identify the document item by its id. Pairs with update_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.9/5.0
Behavior3/5

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

Annotations declare readOnlyHint=false and destructiveHint=false, so the additive, non-destructive nature is already structured. The description adds only that the line attaches to an existing document item identified by id, and repeats no permission, resolution, or failure behavior that the schema doesn't already spell out.

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?

Two short sentences, front-loaded with the operation and the attachment scoping, then the sibling relationship. No filler and every sentence carries information.

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, zero-required mutation tool with no output schema, the description is thin: it doesn't explain what is returned or what happens when the parentid match is ambiguous (that lives only in the schema), nor does it warn that omitting the document id would fail. The rich schema and annotations carry most of the load, leaving this adequate but not complete.

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 all 15 parameters including the tricky resolution rules for parentid, the decimal-fraction rate, and the invoice/invoiceid/quinvoice aliases are documented in the schema. The description adds only the item-id lookup hint, so the baseline 3 applies.

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 precise verb (Add) plus the resource (a sales-tax/VAT line) and the exact attachment target (a single line item on an invoice/quote/credit/debit note). It explicitly names the complementary sibling update_document_item_salestax, so an agent can separate the two without opening a schema.

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?

"Pairs with update_document_item_salestax" tells the agent this is the create-side of the salestax-line pair and that update is the alternative for existing lines. It gives clear context but no explicit exclusions or comparison against the other tax siblings such as add_entity_salestax.

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