Skip to main content
Glama
411sst

gst-einvoice-mcp

by 411sst

Parse an Indian GST tax invoice into an INV-01 payload

parse_invoice

Convert Indian GST tax invoices from PDF or images into the government's INV-01 JSON payload, with evidence for each field and clear reporting of missing or out-of-scope items.

Instructions

Read one Indian GST tax invoice (PDF or image) and return the government's INV-01 JSON payload for it, together with the evidence behind every field.

Accepts .pdf, .png, .jpg, .jpeg, .tif, .tiff and .bmp. Pages that carry a text layer are read directly; scanned pages go through OCR, which is slower (budget a few seconds per scanned page).

Returns an object with four keys: invoice the INV-01 payload, or null when none could be produced missing_fields INV-01 paths that are mandatory but could not be read refusals why the document is out of scope, when it is extraction_meta per-page read method, per-field provenance, and warnings

THREE OUTCOMES ARE NORMAL, AND ONLY THE FIRST GIVES YOU A PAYLOAD.

  1. A payload plus warnings. Usable, but read the warnings: they say which fields were read at low OCR confidence, which were assigned by document position rather than by a label, and which were derived rather than printed.

  2. No payload, with missing_fields populated. A mandatory field could not be read from the document. Nothing was invented to fill the gap, which is why there is no payload at all.

  3. No payload, with refusals populated. Export and SEZ invoices and foreign-currency invoices are refused by design; the refusal message says what was detected, which field revealed it, and what to do instead.

The payload is submission-ready in shape, but this tool does NOT file it and does NOT return an IRN. An IRN is issued by the government's Invoice Registration Portal after you submit the payload there.

Requires a Groq API key in the environment; stage 2 uses an LLM to read the line-item table, and every value it returns is checked back against the document text before it is kept.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
toleranceNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

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?

With no annotations, the description fully discloses behavioral traits: it explains OCR behavior for scanned pages, the LLM stage with verification, the requirement for a Groq API key, and the three possible outcomes including refusals. It also explicitly states it does not file or return an IRN, adding critical transparency.

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 long but every section is purposeful: the opening states the core function, file types are enumerated, outcomes are clearly separated, and constraints are highlighted. It is front-loaded with the main purpose and uses bullet-like structure for readability without unnecessary repetition.

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?

Given the tool's complexity, the description is remarkably complete. It covers input formats, processing behavior, output structure (four keys), edge cases (refusals, missing fields), dependencies (API key), and limitations (no IRN). Even with an output schema present, the description explains what an agent needs to know to invoke it correctly.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate. It indirectly explains the 'path' parameter by listing accepted file extensions, but it does not mention the 'tolerance' parameter at all, leaving it unexplained. The description adds value for path but fails to cover tolerance, resulting in a significant gap.

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 clearly states the specific verb 'Read' and resource 'Indian GST tax invoice' and explicitly defines the output as the INV-01 JSON payload with evidence. It differentiates itself from sibling validation tools by focusing on extraction, making its purpose unambiguous.

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?

While the description gives clear context on when to use it (parsing invoices) and describes the three outcomes, it does not explicitly mention the sibling tools or provide when-not-to-use guidance. However, the purpose is so distinct from validation that usage is implied; still, no explicit alternatives are stated.

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