Skip to main content
Glama

Reconcile Form 16 vs AIS vs 26AS

reconcile_documents
Read-only

Reconciles Form 26AS, AIS, Form 16, and draft return figures to flag TDS, salary, interest, and dividend mismatches, helping prevent 143(1)(a) or 139(9) notices.

Instructions

Cross-document mismatch report -- the checks that pre-empt 143(1)(a) intimations and 139(9) defect notices: TDS claimed vs 26AS deposited (the ledger of record), missing-employer detection, AIS interest/dividend vs declared, Form 16 vs 26AS per-TAN totals, declared salary below the Form 16 total, and 26AS rows missing the gross amount. Also groups 26AS TDS by income head so each credit can be placed in the right schedule. Prefer the file inputs: form26asPath reads the 26AS export itself, and aisFile decrypts the AIS and sums the groups you name, so no row or total is copied by hand. Pass whichever documents you have; checks needing missing inputs are reported as skipped.

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": "reconcile_documents"
  }
}

Input Schema

NameRequiredDescriptionDefault
fyNoFiscal year, e.g. '2025-26' (AY 2026-27)2025-26
aisNoAIS aggregates, when you have figures rather than the file. Take them from parse_ais `totals` (summed in code), never by adding rows yourself; prefer aisFile.
form16NoPer-employer Form 16 Part A figures
returnNoFigures from the draft return
aisFileNoThe AIS export itself: salary by TAN is taken from section 192 TDS rows, and interest/dividend are the code-summed totals of the groups you name. Any figure given in `ais` overrides the file's.
form26asTdsNoTDS entries from parse_form26as (tdsEntries, not tcsEntries)
form26asPathNoAbsolute path to the 26AS TRACES Text export (.txt). Parsed here, so the rows never pass through your arguments. Use instead of form26asTds.

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. Changed3 schema fields changedv0.6.0
    • changedInput schema / properties / ais / description
      Previous value: -"AIS aggregates (from parse_ais rows)"New value: +"AIS aggregates, when you have figures rather than the file. Take them from parse_ais `totals` (summed in code), never by adding rows yourself; prefer aisFile."
    • addedInput schema / properties / aisFile
      Added value: +{
      +  "description": "The AIS export itself: salary by TAN is taken from section 192 TDS rows, and interest/dividend are the code-summed totals of the groups you name. Any figure given in `ais` overrides the file's.",
      +  "properties": {
      +    "dividendGroups": {
      +      "description": "Keys from parse_ais totals.groups to count as dividend, each source once",
      +      "items": {
      +        "maxLength": 500,
      +        "type": "string"
      +      },
      +      "maxItems": 100,
      +      "type": "array"
      +    },
      +    "dob": {
      +      "description": "Date of birth as DDMMYYYY",
      +      "pattern": "^\\d{2}[-/]?\\d{2}[-/]?\\d{4}$",
      +      "type": "string"
      +    },
      +    "interestGroups": {
      +      "description": "Keys from parse_ais totals.groups to count as interest. Name each source once: a bank can report the same interest as a TDS row and again as an SFT row.",
      +      "items": {
      +        "maxLength": 500,
      +        "type": "string"
      +      },
      +      "maxItems": 100,
      +      "type": "array"
      +    },
      +    "pan": {
      +      "description": "PAN, to derive the decryption password",
      +      "pattern": "^[A-Za-z]{5}\\d{4}[A-Za-z]$",
      +      "type": "string"
      +    },
      +    "password": {
      +      "description": "Explicit decryption password",
      +      "type": "string"
      +    },
      +    "path": {
      +      "description": "Absolute path to the AIS JSON download",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "path"
      +  ],
      +  "type": "object"
      +}
    • addedInput schema / properties / form26asPath
      Added value: +{
      +  "description": "Absolute path to the 26AS TRACES Text export (.txt). Parsed here, so the rows never pass through your arguments. Use instead of form26asTds.",
      +  "type": "string"
      +}
  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 declare readOnlyHint=true and openWorldHint=false, so safety is covered; the description adds real behavior: partial-input tolerance with per-check skip reporting, PAN/DOB-derived AIS decryption password, and the precedence rule that any figure in `ais` overrides the file's. It does not describe the shape of the returned report (how mismatches vs skipped checks are surfaced), 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?

Front-loaded with the purpose and the check inventory, then the input-preference rules, then the skip caveat — a logical order with no filler sentences. The long clause-chained check enumeration is dense and slightly hard to scan, but every item carries information an agent needs to interpret the report.

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 7-parameter, nested-object, zero-required tool with no output schema, the description covers what is checked, which inputs take precedence, and how missing inputs degrade gracefully — enough to call it correctly and explain results. The residual gap is that the returned report's structure is never characterized, so the agent must discover the output shape at call time.

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

Parameters5/5

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

Schema coverage is already 100%, yet the description still adds meaning the schema cannot express: cross-parameter precedence (`ais` overrides `aisFile`), the form26asPath-vs-form26asTds equivalence, and de-duplication advice for the group lists ('a bank can report the same interest as a TDS row and again as an SFT row'). That is genuine semantic value beyond the field-level descriptions.

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+resource (cross-document mismatch report reconciling Form 16 / AIS / 26AS) and then enumerates the exact checks performed: TDS claimed vs 26AS deposited, missing-employer detection, AIS interest/dividend vs declared, per-TAN totals, salary below Form 16 total, and 26AS rows missing gross. This clearly separates it from parse_ais/parse_form26as, which only extract, and from compare_regimes/compute_* which do not reconcile documents.

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?

Gives explicit input-selection guidance — prefer form26asPath over form26asTds, prefer aisFile over hand-copied `ais` figures, and take `ais` numbers only from parse_ais `totals` — plus the operating rule that 'checks needing missing inputs are reported as skipped.' What it does not state is when not to call this tool at all (e.g., a single-document sanity check is parse_ais/parse_form26as territory), so it stops short of full routing guidance.

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