Skip to main content
Glama

Parse AIS (Annual Information Statement)

parse_ais
Read-only

Decrypt and parse an AIS JSON export on-device to extract taxpayer details, normalized TDS/SFT rows, section totals, and salary per employer TAN.

Instructions

Decrypt and parse the AIS JSON export from the income tax portal, entirely on-device. Provide pan + dob (DDMMYYYY) to derive the password, or pass it explicitly. Returns taxpayer info, normalized information rows (TDS entries, SFT transactions) with amounts, dates, and codes extracted by column label, and totals summed in code: every section/element/code group with its row count and amount (each group's key is what reconcile_documents takes as interestGroups/dividendGroups), and salary per employer TAN from section 192 TDS rows. Never add up rows yourself. The decryption scheme is reverse-engineered from the AIS utility; if it fails, use the portal's CSV export as a fallback and file an issue.

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": {
      "path": "<path>"
    },
    "name": "parse_ais"
  }
}

Input Schema

NameRequiredDescriptionDefault
dobNoDate of birth as DDMMYYYY (or DD-MM-YYYY); date of incorporation for non-individuals. NOT ISO YYYY-MM-DD.
panNoPAN (used to derive the decryption password)
pathYesAbsolute path to the downloaded AIS .json file
passwordNoExplicit decryption password (overrides pan+dob derivation)

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. Addedv0.5.3
  3. Removedv0.3.0
  4. First observedv0.2.0

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only declare readOnlyHint and openWorldHint; the description carries the real behavioral load: on-device decryption, credential derivation from pan+dob, the admission that the scheme is reverse-engineered and may fail, a failure fallback, and the invariant 'Never add up rows yourself' because totals are computed server-side/in-code. That is materially more than the annotations convey.

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 action and the credential path, then the return shape, then the failure caveat. The totals sentence is dense and slightly run-on, but nearly every clause adds operative information rather than restating the name.

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?

There is no output schema, and the description compensates fully by describing the return payload (taxpayer info, normalized rows, totals with row counts and amounts, salary per TAN) and tying the `key` field to reconcile_documents' interestGroups/dividendGroups. Nothing an agent needs in order to call and interpret this tool is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the schema already documents the DDMMYYYY pattern, the password override, and the absolute path. The description restates the pan+dob-or-password relationship without adding format or edge-case detail beyond the schema, so the baseline 3 applies.

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 pair ('decrypt and parse') applied to a specific resource ('the AIS JSON export from the income tax portal') plus scope ('entirely on-device'). An agent can tell this apart from parse_form26as because the source document is named explicitly.

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?

Explains the two ways to authenticate ('provide pan + dob (DDMMYYYY) to derive the password, or pass it explicitly') and gives a concrete fallback when decryption fails ('use the portal's CSV export ... and file an issue'). It also names the downstream consumer (reconcile_documents) but never states when to pick this over parse_form26as or other parse tools, so no explicit exclusion.

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