Skip to main content
Glama
rehan1020

mcp-india-stack

by rehan1020

calculate_gratuity

Read-onlyIdempotent

Compute statutory gratuity under the Payment of Gratuity Act, 1972 from last drawn salary and years of service. Get the ₹20 lakh tax-exempt limit and breakdown for CTC 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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
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

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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"
  2. Addedv0.4.2

TDQS

A4.4/5.0
Behavior4/5

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

The annotations already state readOnlyHint=true and idempotentHint=true, so the description's job is lighter. It adds helpful behavior context by noting the standard envelope return format, the minimum service requirement, and the ₹20,00,000 tax-exempt ceiling. This is consistent with the annotations.

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

Conciseness5/5

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

The text is well-structured into Args, Returns, and Notes sections. Every sentence adds information, and it is not bloated. It front-loads the core purpose before diving into arguments.

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?

Given the output schema is present and annotations already signal read-only/idempotent, the description covers the important non-obvious constraints (5-year minimum, tax exemption ceiling, coverage threshold). It stops short of describing the exact computation formula, but the tool's own return envelope likely makes that unnecessary.

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?

The input schema already provides 100% coverage with clear descriptions and a decimal/fraction example for years_of_service. The description partially restates the schema, but the Notes add meaning to years_of_service by defining the 5-year minimum and the tax-exempt condition, which is beyond the schema.

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 states a clear verb and resource: 'Calculate gratuity under the Payment of Gratuity Act, 1972.' This is unambiguous and distinct from the sibling tools, which cover taxes, loans, and validation rather than gratuity calculations.

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 names use cases: 'computing terminal benefits, comparing CTC packages, or planning retirement benefits' and adds key constraints such as 'Minimum 5 years service required (except death/disablement).' It does not explicitly point to an alternative sibling tool, but no sibling directly overlaps with gratuity.

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