Skip to main content
Glama
mcp-india-stack

mcp-india-stack

calculate_gratuity

Read-onlyIdempotent

Calculate gratuity under the Payment of Gratuity Act, 1972 from monthly basic plus DA and years of service, including tax-exempt limit and breakdown for terminal benefits or retirement planning.

Instructions

Calculate gratuity under the Payment of Gratuity Act, 1972.

Use when computing terminal benefits, comparing CTC packages, or planning retirement benefits.

Args: last_drawn_salary: Basic + DA per month. years_of_service: Total service duration. is_covered_under_act: True for establishments with 10+ employees.

Returns: Standard envelope with gratuity amount, tax-exempt limit, and breakdown.

Notes: Minimum 5 years service required (except death/disablement). Tax-exempt ceiling is ₹20,00,000.

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": {
      "last_drawn_salary": "<last_drawn_salary>",
      "years_of_service": "<years_of_service>"
    },
    "name": "calculate_gratuity"
  }
}

Input Schema

NameRequiredDescriptionDefault
financial_yearNoFinancial year (e.g. '2025-26', '2026-27')2025-26
years_of_serviceYesTotal years served (e.g., 5.8 = 5 yrs 9 months)
last_drawn_salaryYesLast basic salary + DA per month in INR
is_covered_under_actNoTrue if establishment has 10+ employees

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.8.0
    • addedInput schema / properties / financial_year
      Added value: +{
      +  "default": "2025-26",
      +  "description": "Financial year (e.g. '2025-26', '2026-27')",
      +  "title": "Financial Year",
      +  "type": "string"
      +}
  2. Changed6 schema fields changedv0.5.0
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / is_covered_under_act / title
      Added value: +"Is Covered Under Act"
    • addedInput schema / properties / last_drawn_salary / title
      Added value: +"Last Drawn Salary"
    • addedInput schema / properties / years_of_service / title
      Added value: +"Years Of Service"
    • addedInput schema / title
      Added value: +"calculate_gratuityArguments"
    • addedOutput schema / title
      Added value: +"calculate_gratuityDictOutput"
  3. Addedv0.4.2

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, and closed-world, so the safety profile is covered. The description adds real behavioral context beyond that: a 5-year minimum service eligibility rule with a death/disablement exception, and the ₹20,00,000 tax-exempt ceiling — both material to interpreting results. Minor deduction because it does not say what happens when service is under 5 years (error vs. zero amount).

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?

Front-loaded purpose sentence followed by cleanly separated When/Args/Returns/Notes sections, which is easy to scan. The Args block is partly redundant with a 100%-covered schema, and the Returns block is redundant with an existing output schema, so a few lines do not earn their place.

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 four-parameter calculation tool with annotations and an output schema, this is nearly complete: eligibility rules, statutory basis, and tax ceiling are all surfaced. The only gaps are the unmentioned financial_year parameter and the undefined behavior for sub-5-year service, so it falls just short of fully self-sufficient.

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 schema already documents all four parameters, and the Args block largely restates it ('Basic + DA per month' mirrors 'Last basic salary + DA per month in INR'). The description never mentions the optional financial_year parameter at all, so it adds little beyond the schema beyond the 10+ employee eligibility framing.

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+resource and the governing statute: 'Calculate gratuity under the Payment of Gratuity Act, 1972.' This immediately distinguishes it from the many other calculate_* siblings (calculate_epf_esic, calculate_leave_encashment_tax, calculate_nps_projection), which are employee-benefit tools but for different instruments.

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 names three concrete triggering scenarios (terminal benefits, CTC comparison, retirement planning), which gives an agent a clear positive selection signal. It does not name a sibling alternative or state when NOT to use it, so it stops short of full routing guidance.

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

Deploy Server

Other Tools