Skip to main content
Glama

validate_coupon

Read-only

Validates a discount coupon code for checkout. Note: User login is mandatory to validate a coupon. If this returns a 401 Unauthorized error, you must inform the user that they need to log in (by sending an OTP using send_agent_otp) before they can apply a coupon.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesThe coupon code to validate (e.g. WELCOME10).
packageCodeYesThe eSIM package code to check applicability for.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentNo
isErrorNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "content": {
      +      "items": {
      +        "properties": {
      +          "text": {
      +            "type": "string"
      +          },
      +          "type": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "type",
      +          "text"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "isError": {
      +      "type": "boolean"
      +    }
      +  },
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, and openWorldHint=false, so safety is covered. The description adds genuinely new behavior: the auth requirement and the specific 401 failure mode with the suggested user-facing response, which is exactly the kind of context annotations cannot express.

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

Conciseness4/5

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

Two sentences, front-loaded with the purpose before the auth caveat. The 401 sentence is long but each clause (error condition, required user message, remedy tool) carries actionable information rather than filler.

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?

An output schema exists, so return values need not be described, and the description covers the main non-obvious requirement (login/auth) plus the failure handling. What remains unspecified is the actual validation outcome semantics on success (valid vs. inapplicable for a package), though the output schema likely covers that.

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%, with both parameters documented (coupon code example WELCOME10, and packageCode as the eSIM package to check applicability for). The description adds no syntax or format detail beyond the schema, so the 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?

States a specific verb (validates) and resource (discount coupon code) plus the context of use (for checkout), which cleanly separates it from the sibling get_available_coupons. An agent can tell what it does without opening the 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?

Gives an explicit prerequisite (user login is mandatory to validate a coupon) and a concrete recovery path for the 401 case pointing at send_agent_otp. It does not, however, explain when to prefer this over get_available_coupons or other checkout siblings, so it falls short of a full when/when-not contrast.

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.

Resources