Skip to main content
Glama

Compute HRA exemption (+80GG)

compute_hra
Read-only

Calculate HRA exemption period-wise under the old tax regime, applying Rule 2A limits and city-based metro rates; also compute the 80GG rent deduction when no HRA was received.

Instructions

HRA exemption per Rule 2A: least of (actual HRA, rent minus 10% of salary, 50% metro / 40% non-metro of salary), computed period-wise. Salary = basic + retirement-forming DA + fixed-percentage turnover commission. Old regime only. Give each period's city: the tool checks it against the fy's rule-pack metro list (FY 2025-26: Delhi, Mumbai, Kolkata, Chennai). Also computes the 80GG alternative for rent payers who received no HRA at any time in the year (the two are mutually exclusive).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "compute_hra"
  }
}

Input Schema

NameRequiredDescriptionDefault
fyNoFiscal year, e.g. '2025-26' (AY 2026-27)2025-26
regimeNoHRA exemption and 80GG are both unavailable under the new regimeold
periodsNoHomogeneous periods (amounts are per-period TOTALS, not monthly). Split whenever salary, rent, HRA, or city changes. Required unless eightyGG is supplied.
eightyGGNoCompute the 80GG alternative instead of HRA (requires: no HRA received at any time in the year)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.7.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. Changed4 schema fields changedv0.6.0
    • changedInput schema / properties / eightyGG / properties / months / description
      Previous value: -"Months rent was paid; the cap limb is Rs 5,000 PER MONTH"New value: +"Months rent was paid; the cap limb is Rs 5,000 PER MONTH (FY 2025-26)"
    • addedInput schema / properties / periods / items / properties / city
      Added value: +{
      +  "description": "City of the rented home, e.g. 'Pune'. The tool checks it against the fy's rule-pack metro list, which changes between years, so pass the city rather than deciding metro status yourself.",
      +  "maxLength": 80,
      +  "type": "string"
      +}
    • changedInput schema / properties / periods / items / properties / isMetro / description
      Previous value: -"Rented home in Delhi/Mumbai/Kolkata/Chennai (FY 2025-26 metro list)"New value: +"Only when the city cannot be named: true if the rented home is in one of the fy's rule-pack metro cities (list_deductions returns them as hraMetros). Ignored when `city` is given."
    • changedInput schema / properties / periods / items / required
      Previous value: -[
      -  "months",
      -  "basic",
      -  "hraReceived",
      -  "rentPaid",
      -  "isMetro"
      -]New value: +[
      +  "months",
      +  "basic",
      +  "hraReceived",
      +  "rentPaid"
      +]
  3. Addedv0.5.3
  4. Removedv0.3.0
  5. First observedv0.2.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint=true, openWorldHint=false), and the description adds real behavior beyond them: metro status is resolved against an FY-specific rule-pack list that changes yearly, the 80GG cap is Rs 5,000 per month, and any HRA in the year bars 80GG outright. It does not state the returned shape or rounding, which is a gap given no output schema exists.

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?

One dense paragraph, but it is front-loaded with the formula before the regime constraint and the 80GG branch, and every sentence carries domain content. It is slightly heavy as an unbroken block; bullet separation of the formula, salary definition, and 80GG rule would read faster.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a computation tool with nested period objects and no output schema, the description supplies the actual statutory formula, the salary base, the regime restriction, the metro resolution mechanism, and the full 80GG eligibility condition. Nothing an agent needs to call it correctly for a valid case is missing.

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, but the description still adds meaning: it explains the salary composition (basic + retirement-forming DA + fixed-percentage turnover commission), why a city string must be passed rather than the agent deciding metro status, and the period-total rather than monthly basis. That interpretation guidance exceed what the schema alone conveys.

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?

States a specific verb and resource ('HRA exemption per Rule 2A') and spells out the exact computation: least of actual HRA, rent minus 10% of salary, and 50%/40% of salary, period-wise. It also declares the second capability (80GG alternative) and the salary definition, so an agent knows precisely what it gets 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?

Explicit exclusions are given: 'Old regime only', and 80GG applies only to rent payers who received no HRA at any time in the year, with the two branches declared mutually exclusive. It lacks the last step of routing guidance found in the best definitions — it never names a sibling (e.g. compare_regimes, list_deductions) as the alternative for out-of-scope cases.

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