Skip to main content
Glama

Validate a GSTIN

validate_gstin
Read-onlyIdempotent

Checks an Indian GSTIN offline for 15-character structure, state code, embedded PAN, and mod-36 check character, returning decoded parts. A pass confirms only well-formed format, not registration.

Instructions

Checks an Indian GSTIN offline: 15-character structure, state code, embedded PAN, and the mod-36 check character. Returns the decoded parts. Use this instead of guessing whether a GSTIN is well-formed; a model cannot calculate the check character reliably. Covers regular-taxpayer GSTINs (14th character Z); TDS/TCS, UN-body and non-resident formats are not supported. A pass only means well-formed, not registered or active.

Input Schema

NameRequiredDescriptionDefault
gstinYesThe GSTIN, with or without spaces or hyphens

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only declare readOnly/idempotent/closed-world; the description adds genuinely new behavior: validation is done offline with no registry lookup, and a pass means only well-formed, 'not registered or active.' That last caveat is exactly the kind of interpretive guardrail an agent needs when acting on the result.

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?

Four tight sentences, front-loaded with what is checked, then motivation, then format limits, then the result caveat. No filler and no repetition of the name or title.

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?

With no output schema, the description must carry the return contract, and 'Returns the decoded parts' is only a sketch — an agent does not know which fields come back or what a failure looks like. Everything else an agent needs (scope, exclusions, meaning of success) is present.

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?

Only one parameter and the schema already documents it at 100% coverage, including that spaces or hyphens are accepted. The description adds no input-format detail (e.g. case normalization or the 40-char max), so 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?

Names a specific verb and resource ('Checks an Indian GSTIN') and enumerates exactly what is verified: 15-character structure, state code, embedded PAN, and mod-36 check character. The offline scope plus the stated format boundary (regular-taxpayer, 14th char Z) cleanly separates it from validate_pan and the other validate_* siblings.

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 an explicit use case ('use this instead of guessing whether a GSTIN is well-formed; a model cannot calculate the check character reliably') and explicit exclusions (TDS/TCS, UN-body, non-resident formats unsupported). It falls short of 5 because it never names where the agent should go for the excluded formats, so alternatives remain unstated.

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