Skip to main content
Glama

Labor Calc

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": "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)入职至未签合同状态持续月数

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden, and it does disclose the key trait: "纯本地计算", implying no external calls, authentication, or state mutation. It also sketches what each action returns (e.g. "最多11个月的二倍工资差额规则说明与估算"). It never states outright that the tool is side-effect free, which is why it lands at 4 rather than 5.

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 body is organized by action with each clause carrying real content — no filler. It is one dense run-on paragraph in prose rather than a true list, which slightly hurts scannability for a 12-parameter tool.

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, action-dispatching calculator the description covers all four modes, the required parameters for each, and key edge rules (caps, 11-month limit, 5/10/15-day accrual). Return-value explanation is unnecessary given the output schema, though it never addresses invalid action/parameter combinations or defaults.

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 58%, and the description compensates well by assigning nearly every parameter to an action and adding legal meaning the schema lacks — local_avg_salary's role in "三倍封顶与12年封顶", the N / N+1 / 2N semantics of termination_type, and the hours+overtime_type single-shot alternative. It does not mention the 0-defaults on the hour fields or the default termination_type=N, leaving a small gap.

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?

"劳动法计算器(纯本地计算)" names a specific resource and states the computation is local, then enumerates the four sub-functions keyed by action (severance / overtime / annual_leave / double_wage). An agent can immediately tell this performs labor-law arithmetic rather than statutory lookup (law_search) or court-cost math (court_fee_calc).

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 instructs "用 action 区分子功能" and then gives the parameter recipe for each action, which is exactly the routing information an agent needs. It stops short of stating when NOT to use the tool or naming a sibling alternative for related questions, so it does not reach a 5.

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