Skip to main content
Glama

Vietnam Payroll and Tax Calculator

One-time social insurance payment (BHXH một lần)

bhxh_lump_sum
Read-onlyIdempotent

Estimate the one-time social insurance payment in Vietnam: 1.5 months of the average insurance salary for each year of contributions before 2014 and 2 months for each year from 2014; leftover months round to half or a full year; under one year it is the amount contributed, capped at 2 months of the average. Pass salary_history (years with monthly insurance salary; each year is indexed with the published BHXH coefficients) or an already indexed average_salary with months_before_2014 and months_from_2014. Eligibility is not checked. Examples: {"salary_history":[{"year":2012,"monthly_salary":5000000},{"year":2013,"monthly_salary":6000000},{"year":2025,"monthly_salary":15000000,"months":7}],"as_of":"2026-09"}; {"average_salary":12000000,"months_before_2014":30,"months_from_2014":50}.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "bhxh_lump_sum"
  }
}

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 social insurance agency's decision: YYYY-MM (first day of that month) or YYYY-MM-DD. Default: today in Vietnam. Supported from 2026-01; earlier dates are rejected.
monthNoSynonym of as_of (same formats: YYYY-MM or YYYY-MM-DD). Pass only one of as_of, month, date.
average_salaryNoAlternative to salary_history: average monthly insurance salary, ALREADY indexed with the adjustment coefficients.
salary_historyNoSimple list of years: {year, monthly_salary, months (default 12)}. Each year is indexed with the published adjustment coefficient; months before 2014 and from 2014 are counted from the years.
months_from_2014NoWith average_salary: months of contributions from 2014 on.
contributed_amountNoUnder one year of contributions only: the amount actually contributed; if omitted it is estimated at 22% of the salaries.
months_before_2014NoWith average_salary: months of contributions before 2014.

Output Schema

NameRequiredDescriptionDefault
caseYes
as_ofYes
notesYes
amountYes
sourcesYes
disclaimerYes
data_versionYes
average_salaryYes

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 a safe, read-only, idempotent, closed-world calculation, so the description's job is to add behavior it can't see. It does so by disclosing the rounding rule for leftover months, the 2-month cap for sub-one-year contributions, the 22%-of-salary default for contributed_amount, and the important caveat that eligibility is not checked.

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?

The formula and the two input modes are front-loaded before the examples, and every sentence about rounding, caps, and eligibility carries weight. The two inline JSON examples are dense and make the single paragraph longer than ideal, but they earn their place by showing both invocation shapes.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With a full output schema, complete parameter coverage, and rich annotations, the description supplies everything else an agent needs: the calculation rules, both input modes, rounding and cap behavior, and the explicit warning that eligibility is not verified.

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 baseline is 3. The description does add real meaning beyond the schema by explaining that salary_history years are indexed with published BHXH coefficients and that the two input modes are mutually exclusive, plus concrete example payloads, but it does not clarify the as_of/month/date synonym trio or coefficient sourcing.

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 opens with a specific verb and resource ('Estimate the one-time social insurance payment in Vietnam') and immediately grounds it in the statutory formula (1.5 months/year before 2014, 2 months/year from 2014). The domain is so distinct from the sibling payroll/tax calculators (gross_to_net, pit_only, withholding_10pct) that no agent could confuse which tool computes a BHXH lump sum.

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?

It explicitly tells the agent which input path to choose: either salary_history (years with monthly salary) or an already indexed average_salary paired with months_before_2014 and months_from_2014, and notes that eligibility itself is not validated. It does not, however, state when to prefer this tool over salary-related siblings such as gross_to_net or employer_cost.

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.