Skip to main content
Glama

Vietnam Payroll and Tax Calculator

Gross to net salary (Vietnam)

gross_to_net
Read-onlyIdempotent

Calculate monthly take-home pay from a gross salary in Vietnam: employee social (8%), health (1.5%) and unemployment (1%) insurance with the ceilings for the date and region, family deductions (15.5 million VND for the taxpayer, 6.2 million per dependent), personal income tax by bracket (5-bracket scale 5% to 35%, or 20% flat for non-residents), net pay, and the employer contributions and total cost. Options: as_of (YYYY-MM or YYYY-MM-DD, default today; month and date are accepted as synonyms), region I-IV or 1-4 (default I), dependents (residents only), residency resident|non_resident, nationality vietnamese|foreigner (foreigner = contract of 12 months or more: no unemployment insurance), insurance_base (if the insured salary differs from gross; not below the regional minimum), union_member (0.5% member fee, default false). Examples: {"gross":30000000}; {"gross":50000000,"dependents":2,"as_of":"2026-08","region":"II"}; {"gross":120000000,"nationality":"foreigner"}.

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": {
      "gross": "<gross>"
    },
    "name": "gross_to_net"
  }
}

Input Schema

NameRequiredDescriptionDefault
dateNoSynonym of as_of (same formats: YYYY-MM or YYYY-MM-DD). Pass only one of as_of, month, date.
as_ofNoDate of the calculation: YYYY-MM (first day of that month) or YYYY-MM-DD. Default: today in Vietnam. Supported from 2026-01; earlier dates are rejected.
grossYesMonthly gross salary in VND (whole number), e.g. 30000000.
monthNoSynonym of as_of (same formats: YYYY-MM or YYYY-MM-DD). Pass only one of as_of, month, date.
regionNoRegional minimum wage zone I, II, III or IV (default I); 1-4 and lower case are accepted. Chosen by the user; there is no locality lookup.
residencyNoTax residency: "resident" (default; progressive scale with deductions) or "non_resident" (flat 20% of gross, no deductions).
dependentsNoNumber of registered dependents (0-20, default 0). Residents only: 6.2 million VND per dependent per month.
nationalityNo"vietnamese" (default) or "foreigner" = foreign citizen with a labour contract of 12 months or more: social and health insurance, no unemployment insurance.
union_memberNoEmployee is a trade union member: deduct the 0.5% member fee (default false).
insurance_baseNoSalary used for compulsory insurance, if different from gross. Must not be below the regional minimum wage; capped at the ceilings automatically.

Output Schema

NameRequiredDescriptionDefault
netYes
pitYes
as_ofYes
grossYes
notesYes
regionYes
sourcesYes
employerYes
residencyYes
disclaimerYes
nationalityYes
data_versionYes
employee_contributionsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so safety is covered. The description still earns credit by disclosing domain behavior the annotations cannot: which statutory rates and ceilings apply, that non-residents get a flat 20% with no deductions, and that foreigners with 12+ month contracts get no unemployment insurance. It does not mention the date-support floor (pre-2026-01 rejection) that appears only in the schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded and the examples are useful, but the options clause is a long single sentence that largely restates the input schema (defaults, accepted formats, enum synonyms) rather than adding new meaning. It is dense rather than padded, yet a chunk of it duplicates structured data the agent already receives.

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?

An output schema exists, so return values need not be described, and all ten inputs are addressed with defaults and constraints. Completeness is only slightly short: the supported-date window (from 2026-01) is documented in the schema but never surfaced in the description, which matters for a tool that rejects older dates.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description goes beyond it by explaining the reasoning behind values — e.g. why nationality='foreigner' changes the result, that insurance_base must not fall below the regional minimum, and that one of as_of/month/date may be passed. The three inline JSON examples add practical meaning about how parameters combine.

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 specific verb and resource — 'Calculate monthly take-home pay from a gross salary in Vietnam' — then enumerates exactly what the calculation covers (insurance rates, family deductions, PIT scale, employer cost). This is clearly distinguishable from the inverse sibling net_to_gross because the input is explicitly a gross salary.

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 opening clause establishes the computation context (monthly take-home in Vietnam) and the option list plus three worked examples make concrete invocation scenarios obvious. What is missing is an explicit statement of when to prefer a sibling such as pit_only or net_to_gross; the differentiation is only implied by 'from a gross salary'.

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.