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).
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?

No contradiction with annotations (readOnlyHint=false, destructiveHint=false). The description conveys a write operation but does not disclose side effects such as reindexing or total recalculation, which are mentioned only in parameter descriptions. The behavior is generally expected for an 'add' operation.

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, concise and well-structured. It front-loads the core action and target, then adds the pairing note. No unnecessary detail or repetition.

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?

The description provides enough context for the core add scenario, including document types and item identification. It does not explain output (no output schema), which is acceptable. The parameter descriptions fill in most contextual gaps. Minor omission: the description does not mention that the tool can also update via providing an id, but that is covered in the parameter semantics.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

All 14 parameters have detailed descriptions, including aliases, precedence rules, decimal-fraction rate clarification, and internal use. The schema description coverage is 100%, and the parameter docs add significant guidance beyond names and types.

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 clearly states the action (add a sales-tax/VAT line), the target (a single line item on a document), and the document types. It also mentions the pairing with the update tool, providing a clear purpose.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description names the sibling update tool, but does not explicitly distinguish when to use this tool versus other sales-tax tools like add_entity_salestax. It implies document-item scope but lacks an explicit 'use this when' or 'don't use that' statement.

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