Skip to main content
Glama

Engine Heart

legal.labor_calc

劳动法计算器(纯本地计算)。用 action 区分子功能:action=severance 经济补偿/赔偿金:传 years(工作年限,年,可为小数)、monthly_salary(离职前12个月平均月工资)、local_avg_salary(可选,当地上年度职工月平均工资,用于三倍封顶与12年封顶)、termination_type(N=协商/法定经济补偿;N+1=无过失性辞退加代通知金;2N=违法解除赔偿金);action=overtime 加班费:传 monthly_salary(月工资或约定基数)及 workday_hours(工作日延时小时)、restday_hours(休息日小时)、holiday_hours(法定节假日小时),或用 hours+overtime_type(1.5/2/3)单次计算;action=annual_leave 年休假:传 total_years(累计工作年限)返回应享年假天数(5/10/15天);action=double_wage 未签合同二倍工资:传 months_since_entry(入职月数)与可选 monthly_salary,返回最多11个月的二倍工资差额规则说明与估算。

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": {
      "action": "<action>"
    },
    "name": "legal.labor_calc"
  }
}

Input Schema

NameRequiredDescriptionDefault
hoursNo
yearsNo(severance)本单位工作年限,年,3.5 表示3年6个月
actionYesseverance=经济补偿/赔偿金;overtime=加班费;annual_leave=年休假;double_wage=二倍工资
total_yearsNo(annual_leave)累计工作年限
holiday_hoursNo
overtime_typeNo
restday_hoursNo
workday_hoursNo
monthly_salaryNo月工资(离职前12个月平均)或加班费计算基数
local_avg_salaryNo(severance,可选)当地上年度职工月平均工资
termination_typeNo(severance)N / N+1 / 2NN
months_since_entryNo(double_wage)入职至未签合同状态持续月数

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden, and it does disclose that all computation is local and deterministic ("纯本地计算"), which tells the agent nothing is sent to a service. It also sketches what annual_leave and double_wage return (5/10/15 days; the 11-month cap rule plus estimate), but it omits rounding/precision conventions and any caveat that results are estimates rather than legal advice.

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 purpose is front-loaded and the remainder is organized by action with semicolons, so it scans as four labeled clauses rather than prose. It is dense and long for a tool description, with some repetition of schema-declared defaults, but almost every clause carries parameter semantics an agent needs.

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 12-parameter, four-mode calculator with no output schema and no annotations, the description covers every action's required inputs and hints at return values for two of the four modes. It does not state the response shape for severance or overtime (itemized breakdown versus a single figure) or what happens if a required input for the chosen action is missing, leaving a modest gap.

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?

Schema coverage is only 58%, and the description compensates thoroughly: it explains that `years` accepts decimals (3.5 = 3 years 6 months), that `local_avg_salary` drives the triple-salary and 12-year caps, that `termination_type` N/N+1/2N map to negotiated severance, no-fault dismissal with pay in lieu, and unlawful-termination damages, and that `monthly_salary` doubles as the overtime base. Several parameters left undocumented in the schema are given real meaning here.

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 ("劳动法计算器(纯本地计算)") and then enumerates the four sub-functions selected by `action`: severance, overtime, annual_leave, double_wage. This distinguishes it clearly from siblings such as legal.court_fee_calc and legal.law_search, so an agent can tell what the tool computes without opening the 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?

Each action value is paired with the exact inputs it expects, effectively giving when-to-use routing inside the tool (e.g. use `hours`+`overtime_type` for a single overtime case versus the three hour buckets for a full month). It stops short of stating exclusions or pointing to sibling legal tools for court fees or statute lookups, so it is clear but not fully comparative.

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