Skip to main content
Glama

Create Statement 3 JSON

generate_statement3
Destructive

Creates the Statement 3 JSON for a GST refund of accumulated ITC on exports without payment of tax (RFD-01), the file the GST portal otherwise requires from its Excel offline utility, from records that pass validate_statement3. Returns openUrl, a link the user opens in a browser to sign in by email, pay once per GSTIN and refund period, and download; the checked records are stored behind the link for 24 hours. With a connected account that has paid, it returns the file. The tool takes no GST portal password or OTP.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesThe document's fields, as its requirements tool lists them, or a JSON file from the official utility unchanged.
linkNoThe openUrl from the other generate tool's result, so that one link holds both files.
directNotrue to have the file returned to this client. It needs the user's Fast GST Refund account to be connected; if it is not, the client is asked to sign in. Leave out unless the user asked for the file here.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileNo
claimNo
validYes
errorsNo
statusYes
messageNo
openUrlNo
summaryNo
documentYes
linkNoteNo
nextStepNo
warningsNo
documentsNo
expiresAtNo
linkStatusNo
inputFormatNo
jsonVersionNo
utilityVersionNo
generatorVersionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changed
    • removedInput schema / $schema
      Removed value: -"https://json-schema.org/draft/2020-12/schema"
    • changedInput schema / properties / data / additionalProperties
      Previous value: -{}New value: +true
    • removedInput schema / properties / data / propertyNames
      Removed value: -{
      -  "type": "string"
      -}
    • removedOutput schema / $schema
      Removed value: -"https://json-schema.org/draft/2020-12/schema"
    • changedOutput schema / additionalProperties
      Previous value: -{}New value: +true
    • addedOutput schema / properties
      Added value: +{
      +  "claim": {
      +    "additionalProperties": true,
      +    "properties": {
      +      "fromFp": {
      +        "type": "string"
      +      },
      +      "gstin": {
      +        "type": "string"
      +      },
      +      "paid": {
      +        "type": "boolean"
      +      },
      +      "toFp": {
      +        "type": "string"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  "document": {
      +    "type": "string"
      +  },
      +  "documents": {
      +    "items": {
      +      "type": "string"
      +    },
      +    "type": "array"
      +  },
      +  "errors": {
      +    "items": {
      +      "additionalProperties": true,
      +      "properties": {
      +        "code": {
      +          "type": "string"
      +        },
      +        "message": {
      +          "type": "string"
      +        },
      +        "path": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "path",
      +        "code",
      +        "message"
      +      ],
      +      "type": "object"
      +    },
      +    "type": "array"
      +  },
      +  "expiresAt": {
      +    "type": "string"
      +  },
      +  "file": {
      +    "additionalProperties": true,
      +    "properties": {
      +      "bytes": {
      +        "type": "number"
      +      },
      +      "content": {
      +        "type": "string"
      +      },
      +      "downloadUrl": {
      +        "type": "string"
      +      },
      +      "expiresAt": {
      +        "type": "string"
      +      },
      +      "filename": {
      +        "type": "string"
      +      },
      +      "id": {
      +        "type": "string"
      +      },
      +      "mcpUri": {
      +        "type": "string"
      +      },
      +      "mimeType": {
      +        "type": "string"
      +      },
      +      "sha256": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "id",
      +      "filename",
      +      "sha256",
      +      "downloadUrl"
      +    ],
      +    "type": "object"
      +  },
      +  "generatorVersion": {
      +    "type": "string"
      +  },
      +  "inputFormat": {
      +    "type": "string"
      +  },
      +  "jsonVersion": {
      +    "type": "string"
      +  },
      +  "linkNote": {
      +    "type": "string"
      +  },
      +  "linkStatus": {
      +    "type": "string"
      +  },
      +  "message": {
      +    "type": "string"
      +  },
      +  "nextStep": {
      +    "type": "string"
      +  },
      +  "openUrl": {
      +    "type": "string"
      +  },
      +  "status": {
      +    "enum": [
      +      "open_link",
      +      "payment_required",
      +      "file_ready"
      +    ],
      +    "type": "string"
      +  },
      +  "summary": {
      +    "additionalProperties": true,
      +    "type": "object"
      +  },
      +  "utilityVersion": {
      +    "type": "string"
      +  },
      +  "valid": {
      +    "type": "boolean"
      +  },
      +  "warnings": {
      +    "items": {
      +      "additionalProperties": true,
      +      "properties": {
      +        "code": {
      +          "type": "string"
      +        },
      +        "message": {
      +          "type": "string"
      +        },
      +        "path": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "path",
      +        "code",
      +        "message"
      +      ],
      +      "type": "object"
      +    },
      +    "type": "array"
      +  }
      +}
    • removedOutput schema / propertyNames
      Removed value: -{
      -  "type": "string"
      -}
    • addedOutput schema / required
      Added value: +[
      +  "document",
      +  "valid",
      +  "status"
      +]
  2. Changed5 schema fields changed
    • removedInput schema / properties / action
      Removed value: -{
      -  "default": "requirements",
      -  "description": "requirements: fields and sources. validate: check data. generate: create the file.",
      -  "enum": [
      -    "requirements",
      -    "validate",
      -    "generate"
      -  ],
      -  "type": "string"
      -}
    • changedInput schema / properties / data / description
      Previous value: -"The document fields from action=requirements, or a JSON file from the official utility unchanged. Omit for requirements."New value: +"The document's fields, as its requirements tool lists them, or a JSON file from the official utility unchanged."
    • changedInput schema / properties / direct / description
      Previous value: -"With generate: true to have the file returned to this client. It needs the user's Fast GST Refund account to be connected; if it is not, the client is asked to sign in. Omit unless the user asked for the file here."New value: +"true to have the file returned to this client. It needs the user's Fast GST Refund account to be connected; if it is not, the client is asked to sign in. Leave out unless the user asked for the file here."
    • changedInput schema / properties / link / description
      Previous value: -"With generate: the openUrl from the other generator's result, so that one link holds both files."New value: +"The openUrl from the other generate tool's result, so that one link holds both files."
    • addedInput schema / required
      Added value: +[
      +  "data"
      +]
  3. Changed8 schema fields changed
    • addedInput schema / properties / action / description
      Added value: +"requirements: fields and sources. validate: check data. generate: create the file."
    • changedInput schema / properties / data / additionalProperties
      Previous value: -falseNew value: +{}
    • addedInput schema / properties / data / description
      Added value: +"The document fields from action=requirements, or a JSON file from the official utility unchanged. Omit for requirements."
    • removedInput schema / properties / data / properties
      Removed value: -{
      -  "documents": {
      -    "items": {
      -      "oneOf": [
      -        {
      -          "additionalProperties": false,
      -          "properties": {
      -            "docType": {
      -              "enum": [
      -                "Invoice",
      -                "Debit Note",
      -                "Credit Note"
      -              ],
      -              "type": "string"
      -            },
      -            "idt": {
      -              "description": "Calendar date dd-mm-yyyy, not a future date.",
      -              "pattern": "^\\d{2}-\\d{2}-\\d{4}$",
      -              "type": "string"
      -            },
      -            "inum": {
      -              "pattern": "^[A-Za-z0-9/-]{1,16}$",
      -              "type": "string"
      -            },
      -            "type": {
      -              "const": "S",
      -              "type": "string"
      -            },
      -            "val": {
      -              "description": "Document value in INR as reported for this export document, as a decimal string.",
      -              "pattern": "^(?:0|[1-9]\\d{0,14})(?:\\.\\d{1,2})?$",
      -              "type": "string"
      -            }
      -          },
      -          "required": [
      -            "docType",
      -            "inum",
      -            "idt",
      -            "val",
      -            "type"
      -          ],
      -          "type": "object"
      -        },
      -        {
      -          "additionalProperties": false,
      -          "properties": {
      -            "docType": {
      -              "enum": [
      -                "Invoice",
      -                "Debit Note",
      -                "Credit Note"
      -              ],
      -              "type": "string"
      -            },
      -            "egmref": {
      -              "pattern": "^[A-Za-z0-9]{1,20}$",
      -              "type": "string"
      -            },
      -            "egmrefdt": {
      -              "description": "Calendar date dd-mm-yyyy, not a future date.",
      -              "pattern": "^\\d{2}-\\d{2}-\\d{4}$",
      -              "type": "string"
      -            },
      -            "fobValue": {
      -              "description": "INR FOB decimal string, at most 15 integer digits and 4 decimals.",
      -              "pattern": "^(?:0|[1-9]\\d{0,14})(?:\\.\\d{1,4})?$",
      -              "type": "string"
      -            },
      -            "idt": {
      -              "description": "Calendar date dd-mm-yyyy, not a future date.",
      -              "pattern": "^\\d{2}-\\d{2}-\\d{4}$",
      -              "type": "string"
      -            },
      -            "inum": {
      -              "pattern": "^[A-Za-z0-9/-]{1,16}$",
      -              "type": "string"
      -            },
      -            "sbdt": {
      -              "description": "Calendar date dd-mm-yyyy, not a future date.",
      -              "pattern": "^\\d{2}-\\d{2}-\\d{4}$",
      -              "type": "string"
      -            },
      -            "sbnum": {
      -              "pattern": "^\\d{3,7}$",
      -              "type": "string"
      -            },
      -            "sbpcode": {
      -              "pattern": "^[A-Za-z0-9]{6}$",
      -              "type": "string"
      -            },
      -            "type": {
      -              "const": "G",
      -              "type": "string"
      -            },
      -            "val": {
      -              "description": "Document value in INR as reported for this export document, as a decimal string.",
      -              "pattern": "^(?:0|[1-9]\\d{0,14})(?:\\.\\d{1,2})?$",
      -              "type": "string"
      -            }
      -          },
      -          "required": [
      -            "docType",
      -            "inum",
      -            "idt",
      -            "val",
      -            "type",
      -            "sbpcode",
      -            "sbnum",
      -            "sbdt",
      -            "fobValue",
      -            "egmref",
      -            "egmrefdt"
      -          ],
      -          "type": "object"
      -        }
      -      ]
      -    },
      -    "maxItems": 10000,
      -    "minItems": 1,
      -    "type": "array"
      -  },
      -  "fromFp": {
      -    "description": "Refund return period mmyyyy.",
      -    "pattern": "^(0[1-9]|1[0-2])\\d{4}$",
      -    "type": "string"
      -  },
      -  "gstin": {
      -    "pattern": "^\\d{2}[A-Z]{5}\\d{4}[A-Z][1-9A-Z][Z1-9A-J][0-9A-Z]$",
      -    "type": "string"
      -  },
      -  "receipts": {
      -    "description": "Separate aggregate BRC/FIRC rows, not nested under invoices. Use [] for goods-only statements without receipts.",
      -    "items": {
      -      "additionalProperties": false,
      -      "properties": {
      -        "dt": {
      -          "description": "Calendar date dd-mm-yyyy, not a future date.",
      -          "pattern": "^\\d{2}-\\d{2}-\\d{4}$",
      -          "type": "string"
      -        },
      -        "num": {
      -          "description": "BRC/FIRC reference; portal guide's 3–30 alphanumeric limit (workbook allows 2).",
      -          "pattern": "^[A-Za-z0-9]{3,30}$",
      -          "type": "string"
      -        },
      -        "val": {
      -          "description": "INR amount supported by this receipt for the statement. Do not repeat the full receipt amount across invoices.",
      -          "pattern": "^(?:0|[1-9]\\d{0,14})(?:\\.\\d{1,2})?$",
      -          "type": "string"
      -        }
      -      },
      -      "required": [
      -        "num",
      -        "dt",
      -        "val"
      -      ],
      -      "type": "object"
      -    },
      -    "maxItems": 10000,
      -    "type": "array"
      -  },
      -  "toFp": {
      -    "description": "Refund return period mmyyyy.",
      -    "pattern": "^(0[1-9]|1[0-2])\\d{4}$",
      -    "type": "string"
      -  }
      -}
    • addedInput schema / properties / data / propertyNames
      Added value: +{
      +  "type": "string"
      +}
    • removedInput schema / properties / data / required
      Removed value: -[
      -  "gstin",
      -  "fromFp",
      -  "toFp",
      -  "documents",
      -  "receipts"
      -]
    • addedInput schema / properties / direct
      Added value: +{
      +  "description": "With generate: true to have the file returned to this client. It needs the user's Fast GST Refund account to be connected; if it is not, the client is asked to sign in. Omit unless the user asked for the file here.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / link
      Added value: +{
      +  "description": "With generate: the openUrl from the other generator's result, so that one link holds both files.",
      +  "maxLength": 300,
      +  "type": "string"
      +}
  4. Added

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare write/not-read-only, closed-world, non-idempotent, and destructive; the description adds genuinely new context: an email sign-in, a per-GSTIN/per-period payment, a 24-hour storage window behind the link, and that no GST portal password or OTP is taken. It never explains why destructiveHint=true applies to a file-generation tool, which is the one behavioral gap.

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?

Front-loads the artifact and its purpose, then layers return behavior, payment/expiry semantics, and the auth constraint in a tight, waste-free sequence. Every clause carries information the agent cannot get from structured fields.

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 an output schema present the description needn't enumerate return fields, yet it still explains openUrl's role, expiry, and payment model, plus the annotation-covered safety profile. It is close to complete, with only the destructive flag left unaddressed.

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?

Schema description coverage is 100% and all three parameters are documented there, including the 300-char limit on 'link' and the sign-in consequence of 'direct'. The description references the openUrl return rather than adding syntax or constraints beyond the schema, so the baseline of 3 is correct.

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 and resource (creates the Statement 3 JSON for GST refund RFD-01) and grounds it against the sibling pipeline by noting the records must pass validate_statement3. An agent can distinguish this from validate_statement3, get_statement3_requirements, and the annexure tools without opening a schema.

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?

The prerequisite is explicit ('from records that pass validate_statement3'), and the 'direct' behavior is tied to a stated condition (connected, paid account). It does not name the requirements sibling or say when to prefer link-based delivery over direct, 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.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.