Skip to main content
Glama

Apply or split VAT

vn_einvoice_vat
Read-onlyIdempotent

Apply VAT to a net amount or split a VAT-inclusive price into net value and VAT using Vietnamese rates 0, 5, 8, 10, KCT, and KKKNT.

Instructions

Apply VAT to a net amount, or with inclusive=true split a VAT-inclusive price (giá đã gồm VAT) into net (tiền hàng) and VAT. Rates 0/5/8/10/KCT/KKKNT. Net is rounded half away from zero and the leftover đồng goes to VAT (library convention).

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": {
      "amount": "<amount>",
      "rate": "<rate>"
    },
    "name": "vn_einvoice_vat"
  }
}

Input Schema

NameRequiredDescriptionDefault
rateYesVAT rate: 0, 5, 8, 10, "KCT" or "KKKNT"
amountYesInteger VND amount
inclusiveNotrue: amount already includes VAT

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, closed-world, so the safety profile is covered. The description adds genuinely non-obvious behavior: valid rates (0/5/8/10/KCT/KKKNT) and the rounding convention 'net is rounded half away from zero and the leftover đồng goes to VAT', which is exactly the kind of detail that determines a correct result.

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 sentences, front-loaded with the mode distinction and followed by the constants and rounding rule; nothing is wasted. The parenthetical Vietnamese terms are useful for domain matching but make the second sentence slightly dense.

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 a three-parameter calculator with no output schema, the description covers the modes, the accepted rate set, and the rounding/tie-breaking rule. What it returns (net and VAT components) is only implied by the split wording rather than stated as a return shape, which is the main remaining gap.

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 100%, so all three parameters are already documented, including the rate enum values and the inclusive flag meaning. The description reinforces these and adds Vietnamese domain glosses (giá đã gồm VAT, tiền hàng), but contributes no syntax or format detail the schema lacks, so 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?

The description names a specific verb and resource ('Apply VAT to a net amount') and immediately distinguishes two operating modes via the inclusive flag ('with inclusive=true split a VAT-inclusive price into net and VAT'). An agent knows exactly what the computation is and what the two branches produce.

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?

The description gives clear conditional guidance for each mode: use it plainly for a net amount, set inclusive=true when the amount already contains VAT. There is no explicit when-not guidance or named alternative, but the conditional split covers the real decision an agent faces.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.