Skip to main content
Glama
411sst

gst-einvoice-mcp

by 411sst

Validate a GSTIN's structure and check digit

validate_gstin

Validates a 15-character Indian GSTIN against structural rules and mod-36 checksum, returning state code, embedded PAN, and clear failure reasons. Confirms well-formedness, not registration status.

Instructions

Check one GSTIN (the 15-character Indian GST registration number) against its structural rules and its mod-36 check character, without touching any document.

Returns is_valid, structural_ok, checksum_ok, the state code and its name, the embedded PAN, and a human-readable reason when it fails. checksum_ok is null, not false, when the structure itself failed: the checksum was never evaluated, and reporting two failures where one check ran would be misleading.

State code 25 resolves to a distinct 'discontinued' status rather than 'unknown', because a 25 means either a misread or a genuine pre-2020 record, and the caller needs to tell those apart. State code 28 is legacy-but-valid: pre-2014 Andhra Pradesh registrations remain legitimate.

IMPORTANT: a passing checksum proves the number is well-formed, NOT that the registration exists or is currently active. Only the GST portal can tell you that.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
gstinYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations provided, the description carries the full behavioral burden and does so thoroughly. It discloses the null-vs-false semantics of checksum_ok on structural failure, explains state code 25 and 28 edge cases, and clearly warns that a well-formed GSTIN does not imply an active registration.

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 substantial but every sentence earns its place: core purpose, return fields, null semantics, state-code edge cases, and a necessary interpretive caveat. Important behavioral nuances are front-loaded and clearly organized.

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?

For a one-parameter validation tool with an output schema present, this description is complete. It covers validation scope, failure semantics, special state-code behavior, and the critical limitation about registration existence, leaving no practical gap for an agent selecting or invoking the tool.

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?

The schema provides only the parameter name, type, and required flag with 0% description coverage, so the description must compensate. It does by explaining that gstin is a 15-character Indian GST registration number subject to structural and mod-36 checks, which gives the agent enough context to supply an appropriate value, though no format example is given.

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?

The description opens with a precise verb and resource: 'Check one GSTIN ... against its structural rules and its mod-36 check character,' which clearly distinguishes this from parsing invoices or validating arbitrary payloads. The scope is explicit and immediately actionable.

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?

The description establishes that this is a single-GSTIN structural validator that 'touches no document' and that existence or active status must be checked via the GST portal. However, it never explicitly names or contrasts sibling tools like parse_invoice or validate_payload, so the when-to-use-versus-alternatives guidance is only implied.

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