Skip to main content
Glama
mcp-india-stack

mcp-india-stack

calculate_hra_exemption

Read-onlyIdempotent

Calculates tax-exempt House Rent Allowance (HRA) under Section 10(13A) by comparing HRA received, rent paid minus 10% of salary, and metro/non-metro salary limits.

Instructions

Calculate House Rent Allowance (HRA) exemption under Section 10(13A).

Use when computing tax-exempt HRA component for salary structuring or income tax filing. Compares three conditions and takes minimum.

Args: basic_salary: Monthly basic salary. hra_received: Annual HRA received from employer. rent_paid: Annual rent paid. city_type: 'metro' (50% of salary) or 'non_metro' (40% of salary). is_government_employee: Use simplified formula for government employees.

Returns: Standard envelope with exemption amount, taxable HRA, and breakdown.

Notes: The actual exemption is the minimum of: 1. HRA received 2. Rent paid minus 10% of salary 3. 50% of salary (metro) or 40% (non_metro)

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": {
      "basic_salary": "<basic_salary>",
      "hra_received": "<hra_received>",
      "rent_paid": "<rent_paid>"
    },
    "name": "calculate_hra_exemption"
  }
}

Input Schema

NameRequiredDescriptionDefault
city_typeNo'metro' (Delhi/Mumbai/Chennai/Kolkata) or 'non_metro'non_metro
rent_paidYesAnnual rent paid in rupees
basic_salaryYesMonthly basic salary in rupees
hra_receivedYesAnnual HRA received from employer in rupees
financial_yearNoFinancial year (e.g. '2025-26', '2026-27')2025-26
is_government_employeeNoTrue for government employees using simplified formula

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. Changed8 schema fields changedv0.5.0
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / basic_salary / title
      Added value: +"Basic Salary"
    • addedInput schema / properties / city_type / title
      Added value: +"City Type"
    • addedInput schema / properties / hra_received / title
      Added value: +"Hra Received"
    • addedInput schema / properties / is_government_employee / title
      Added value: +"Is Government Employee"
    • addedInput schema / properties / rent_paid / title
      Added value: +"Rent Paid"
    • addedInput schema / title
      Added value: +"calculate_hra_exemptionArguments"
    • addedOutput schema / title
      Added value: +"calculate_hra_exemptionDictOutput"
  3. First observedv0.3.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and openWorldHint=false, so the safety profile is covered. The description adds genuinely new behavior: the exact three-way minimum rule, the metro/non-metro percentages, and the simplified government-employee formula, plus the shape of the result envelope. It stops short of mentioning edge cases (zero rent, negative exemption, year-dependent rate changes).

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 Args/Returns/Notes structure is front-loaded with purpose and then the formula, which is the right order. The Args block largely restates schema text already at 100% coverage (monthly/annual units), making it the one clearly redundant section.

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 deterministic six-parameter calculator with an output schema, the definition covers purpose, method and inputs adequately. The only material gap is what financial_year changes (rate/threshold applicability), which an agent filing for a past year would need to know.

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 100%, so the baseline is 3; the description still earns credit by explaining that basic_salary is monthly while hra_received and rent_paid are annual, and by attaching the 50%/40% rates to city_type beyond the schema's city list. It omits any explanation of financial_year, leaving that parameter's effect entirely to 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 names a specific verb and resource ('Calculate House Rent Allowance (HRA) exemption') and anchors it to Section 10(13A), so an agent can instantly separate it from the many other tax/validation siblings. The 'Compares three conditions and takes minimum' line further pins down what the calculation actually is.

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 gives clear positive context ('Use when computing tax-exempt HRA component for salary structuring or income tax filing'), which is more than most siblings offer. It does not, however, name adjacent tools it should not be confused with (e.g. calculate_salary_restructuring, calculate_home_vs_rent) or state exclusions, so it falls short of a 5.

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