Skip to main content
Glama

Compute Indian income tax

compute_tax
Read-only

Calculates deterministic Indian income tax for a fiscal year and regime from salary, other income, deductions, and capital gains, including slabs, rebates, surcharge, and cess.

Instructions

Deterministic Indian income tax computation for a fiscal year. Handles new/old regime slabs, standard deduction, 87A rebate with marginal relief (threshold tested on TOTAL income per the statute; rebate never offsets 111A/112A tax under the new regime), employer NPS under 80CCD(2) in both regimes, house-property loss set-off (s.71(3A) cap; none under 115BAC), 111A/112A capital gains rates with the basic-exemption set-off, surcharge (with the 15% cap on gains and marginal relief), and 4% cess. All arithmetic is done in code from a versioned rule pack -- never estimated.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fyNoFiscal year, e.g. '2025-26' (AY 2026-27)2025-26
regimeYesTax regime. 'new' (115BAC) is the default regime since FY 2023-24.
ageBandNoAge band: below60, senior (60-79), superSenior (80+). Affects old-regime exemption only.below60
ltcg112ANoLong-term capital gains under section 112A in INR, BEFORE the 1.25L exemption
stcg111ANoShort-term capital gains under section 111A (listed equity, STT paid) in INR
deductionsNoOld regime only: total Chapter VI-A deductions (80C, 80D, ...) in INR, EXCLUDING employer NPS (use employerNps80CCD2). Ignored under the new regime.
otherIncomeNoOther normal-rate income in INR (interest, net rent, etc.)
salaryIncomeNoGross salary income in INR, before standard deduction
employerNps80CCD2NoEmployer's NPS contribution under s.80CCD(2) in INR. Allowed in BOTH regimes (the one Chapter VI-A deduction 115BAC keeps); capped at 14% of salary in the new regime, 10% (private) / 14% (government) in the old.
housePropertyLossNoLoss under the head house property as a POSITIVE number (e.g. s.24(b) home-loan interest on a self-occupied house). Old regime: set off against other heads up to Rs 2 lakh (s.71(3A)), rest carried forward. New regime: no inter-head set-off (s.115BAC(2)), reported as carried forward.
governmentEmployerNoCentral/State Government employer (raises the old-regime 80CCD(2) cap to 14%)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changedv0.5.3
    • changedInput schema / properties / deductions / description
      Previous value: -"Old regime only: total Chapter VI-A deductions (80C, 80D, ...) in INR. Ignored under the new regime."New value: +"Old regime only: total Chapter VI-A deductions (80C, 80D, ...) in INR, EXCLUDING employer NPS (use employerNps80CCD2). Ignored under the new regime."
    • addedInput schema / properties / deductions / maximum
      Added value: +1000000000000
    • addedInput schema / properties / employerNps80CCD2
      Added value: +{
      +  "default": 0,
      +  "description": "Employer's NPS contribution under s.80CCD(2) in INR. Allowed in BOTH regimes (the one Chapter VI-A deduction 115BAC keeps); capped at 14% of salary in the new regime, 10% (private) / 14% (government) in the old.",
      +  "maximum": 1000000000000,
      +  "minimum": 0,
      +  "type": "number"
      +}
    • addedInput schema / properties / governmentEmployer
      Added value: +{
      +  "default": false,
      +  "description": "Central/State Government employer (raises the old-regime 80CCD(2) cap to 14%)",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / housePropertyLoss
      Added value: +{
      +  "default": 0,
      +  "description": "Loss under the head house property as a POSITIVE number (e.g. s.24(b) home-loan interest on a self-occupied house). Old regime: set off against other heads up to Rs 2 lakh (s.71(3A)), rest carried forward. New regime: no inter-head set-off (s.115BAC(2)), reported as carried forward.",
      +  "maximum": 1000000000000,
      +  "minimum": 0,
      +  "type": "number"
      +}
    • addedInput schema / properties / ltcg112A / maximum
      Added value: +1000000000000
    • addedInput schema / properties / otherIncome / maximum
      Added value: +1000000000000
    • addedInput schema / properties / salaryIncome / maximum
      Added value: +1000000000000
    • addedInput schema / properties / stcg111A / maximum
      Added value: +1000000000000
  2. First observedv0.2.0

TDQS

A4/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, so the safety profile is covered; the description adds genuinely useful behavioral context beyond that — deterministic execution from a versioned rule pack and 'never estimated', which tells the agent the numbers are reproducible and not LLM-fabricated. It stops short of describing validation failures, rounding/unit behavior on output, or what happens for unsupported FYs.

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 with the purpose before the parenthetical breakdown, and every clause names a distinct rule that matters. It is a dense wall of parentheticals, though, and one or two items (e.g. the cess percentage) are arguably detail an agent does not need to choose or call the tool.

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

Completeness3/5

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

For an 11-parameter, high-complexity tool with no output schema, the description explains inputs thoroughly but says nothing about the return payload — no indication of whether it returns a breakdown (taxable income, slab tax, rebate, surcharge, cess, effective rate), a carry-forward figure, or a comparison. An agent cannot tell what it will get back or how to read it.

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 baseline is 3; the description earns above baseline by disclosing cross-parameter statutory interactions the schema cannot express — rebate threshold tested on TOTAL income, rebate never offsetting 111A/112A under the new regime, the 15% surcharge cap on gains, and the 115BAC carve-outs affecting deductions and housePropertyLoss. It does not map semantics per parameter name, so not a 5.

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?

Opens with a specific verb+resource and scope ('Deterministic Indian income tax computation for a fiscal year'), then enumerates the exact statutory mechanics covered (regime slabs, 87A rebate, 111A/112A, surcharge, cess). An agent can distinguish this from compute_hra, compare_regimes, and compute_interest_234 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 Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Scope is richly implied by the enumeration of covered computations, but there is no explicit routing statement such as 'use compare_regimes to decide which regime, then call this'. Notably it never says whether HRA-exempt salary should already be netted out of salaryIncome before calling (a sibling compute_hra exists), nor any prerequisites/ordering against parse_form26as or parse_ais.

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