Skip to main content
Glama

Compute HRA exemption (+80GG)

compute_hra
Read-only

Compute HRA exemption under Rule 2A or the 80GG deduction from period-wise salary, rent, and HRA data. Returns the least-of-three exemption for old-regime tax filing.

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; metro list for FY 2025-26 is 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).

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. Addedv0.5.3
  2. Removedv0.3.0
  3. First observedv0.2.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=true and openWorldHint=false, and the description is fully consistent with a pure computation. It goes well beyond the annotations by defining the statutory formula, the salary composition (basic + retirement-forming DA + fixed-percentage turnover commission), period-wise treatment, and the metro list for FY 2025-26. It stops short of describing the result shape, which matters since there is no output schema.

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?

Three information-dense sentences, front-loaded with the rule and formula, with constraints following. No wasted text, though the absence of line or clause breaks makes the metro list and 80GG caveat slightly harder to scan.

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 nested objects, a 12-item period array, and no output schema, the description does a good job covering input semantics and statutory constraints. The remaining gap is that it never says what the response contains (per-period breakdown, which limb was binding, final exemption amount), which an agent calling a compute tool would want.

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 earns an extra point by clarifying that amounts are per-period totals and by defining what 'salary' includes, which gives meaning to the optional daRetirement and turnoverCommission fields that the schema only labels. The 80GG mutual-exclusivity rule also disambiguates which parameter branch to populate.

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 least-of formula being applied, plus the dual 80GG computation. An agent can immediately distinguish this from compute_tax or list_deductions 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 declared mutually exclusive. It does not, however, route to any sibling tool (e.g., compare_regimes for regime choice), so the when-to-use context is complete but not alternative-aware.

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