Skip to main content
Glama
mcp-india-stack

mcp-india-stack

validate_gstin

Read-onlyIdempotent

Check an Indian GSTIN's structure and checksum, decode state and PAN details, and confirm expected entity type before invoicing, reconciliation, or compliance workflows.

Instructions

Validate and decode an Indian GSTIN with checksum verification.

Use when checking supplier/customer GSTINs before invoicing, reconciliation, or compliance workflows.

Args: gstin: 15-character GSTIN (e.g., 27AAPFU0939F1ZV). Spaces/hyphens stripped. expected_entity_type: Optional expected entity char to match PAN 4th char. verify_online: Optional opt-in online registry attestation (A4 level).

Returns: Standard envelope containing validity, state decode, embedded PAN, entity number, category, and checksum information.

Notes: Validates structure and checksum only; does not verify active GSTN registration status.

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": {
      "gstin": "<gstin>"
    },
    "name": "validate_gstin"
  }
}

Input Schema

NameRequiredDescriptionDefault
gstinYes15-character GSTIN (spaces/hyphens allowed)
verify_onlineNoOptional opt-in online registry attestation (A4 level)
expected_entity_typeNoOptional expected entity type character to verify against PAN 4th char

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.8.0
    • addedInput schema / properties / expected_entity_type
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Optional expected entity type character to verify against PAN 4th char",
      +  "title": "Expected Entity Type"
      +}
    • addedInput schema / properties / verify_online
      Added value: +{
      +  "default": false,
      +  "description": "Optional opt-in online registry attestation (A4 level)",
      +  "title": "Verify Online",
      +  "type": "boolean"
      +}
  2. Changed4 schema fields changedv0.5.0
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / gstin / title
      Added value: +"Gstin"
    • addedInput schema / title
      Added value: +"validate_gstinArguments"
    • addedOutput schema / title
      Added value: +"validate_gstinDictOutput"
  3. First observedv0.3.0

TDQS

A3.9/5.0
Behavior3/5

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

The annotations already declare readOnlyHint, idempotentHint and openWorldHint=false, and the Notes section adds genuine value by scoping the tool to structural and checksum validation and stating it does not verify active registration status. However, the optional online verification path is not reconciled with openWorldHint=false, and the description does not say whether an invalid GSTIN raises an error or returns validity=false. That gap keeps it at 3.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the purpose, then usage, then structured Args/Returns/Notes blocks. Each section earns its place, and the Notes section carries the most decision-relevant caveat without padding.

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 three-parameter read-only validator with an output schema, the description covers format, purpose, opt-in behavior and the key limitation. The remaining gap is failure semantics (error versus validity=false) and the meaning of the entity-type values, which the note-only scoping does not resolve.

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 description coverage is 100%, so the baseline is 3, but the description adds real meaning: a worked example GSTIN, the fact that spaces and hyphens are stripped, and that expected_entity_type is matched against the PAN 4th character. It does not enumerate the valid entity-type characters or explain what an entity-type mismatch does to the result.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb and resource ('Validate and decode an Indian GSTIN') plus a concrete mechanism ('checksum verification'), so it is clearly distinguishable from the calculation and other validate_* siblings. It does not name its nearest sibling (bulk_validate_gstin) or clarify how it differs from decode_state_code for state decoding, so it stops short of a 5.

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?

It gives concrete usage contexts ('checking supplier/customer GSTINs before invoicing, reconciliation, or compliance workflows'), which is enough for an agent to decide when the tool applies. It offers no explicit exclusions or alternatives, which is what separates a 4 from a 5.

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

Deploy Server

Other Tools