Skip to main content
Glama

create_promo_code

Creates a discount code for YOUR templates (they have to be named): 3-24 characters, 1-90 %, at most 10 codes per template from here. It requires confirm=true: it gives away margin and the name is taken for good.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toNoEnd date YYYY-MM-DD (optional).
codeYes3 to 24 characters: letters, numbers and hyphens (it is uppercased).
fromNoStart date YYYY-MM-DD (optional).
confirmYesREQUIRED true. A code gives away margin and its name stays taken for ever across the whole platform: show the percentage and the templates to the person first.
templatesYesSlugs of YOUR templates it applies to. Required: codes for the whole catalog are not created from here.
discountPctYesAn integer from 1 to 90.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYesAlways true: the code exists now.
codeYesThe code as it was saved (uppercase).
templatesYesHow many different templates it covers.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changed
    • removedInput schema / allOf
      Removed value: -[
      -  {
      -    "anyOf": [
      -      {
      -        "required": [
      -          "code"
      -        ]
      -      },
      -      {
      -        "required": [
      -          "codigo"
      -        ]
      -      }
      -    ]
      -  },
      -  {
      -    "anyOf": [
      -      {
      -        "required": [
      -          "discountPct"
      -        ]
      -      },
      -      {
      -        "required": [
      -          "descuentoPct"
      -        ]
      -      }
      -    ]
      -  },
      -  {
      -    "anyOf": [
      -      {
      -        "required": [
      -          "templates"
      -        ]
      -      },
      -      {
      -        "required": [
      -          "plantillas"
      -        ]
      -      }
      -    ]
      -  },
      -  {
      -    "anyOf": [
      -      {
      -        "required": [
      -          "confirm"
      -        ]
      -      },
      -      {
      -        "required": [
      -          "confirmar"
      -        ]
      -      }
      -    ]
      -  }
      -]
    • removedInput schema / properties / codigo
      Removed value: -{
      -  "deprecated": true,
      -  "description": "DEPRECATED alias of `code`: it still works, but use `code` (it will be removed in a future round, no date yet). 3 to 24 characters: letters, numbers and hyphens (it is uppercased).",
      -  "type": "string"
      -}
    • removedInput schema / properties / confirmar
      Removed value: -{
      -  "deprecated": true,
      -  "description": "DEPRECATED alias of `confirm`: it still works, but use `confirm` (it will be removed in a future round, no date yet). REQUIRED true. A code gives away margin and its name stays taken for ever across the whole platform: show the percentage and the templates to the person first.",
      -  "type": "boolean"
      -}
    • removedInput schema / properties / descuentoPct
      Removed value: -{
      -  "deprecated": true,
      -  "description": "DEPRECATED alias of `discountPct`: it still works, but use `discountPct` (it will be removed in a future round, no date yet). An integer from 1 to 90.",
      -  "type": "number"
      -}
    • removedInput schema / properties / desde
      Removed value: -{
      -  "deprecated": true,
      -  "description": "DEPRECATED alias of `from`: it still works, but use `from` (it will be removed in a future round, no date yet). Start date YYYY-MM-DD (optional).",
      -  "type": "string"
      -}
    • removedInput schema / properties / hasta
      Removed value: -{
      -  "deprecated": true,
      -  "description": "DEPRECATED alias of `to`: it still works, but use `to` (it will be removed in a future round, no date yet). End date YYYY-MM-DD (optional).",
      -  "type": "string"
      -}
    • removedInput schema / properties / plantillas
      Removed value: -{
      -  "deprecated": true,
      -  "description": "DEPRECATED alias of `templates`: it still works, but use `templates` (it will be removed in a future round, no date yet). Slugs of YOUR templates it applies to. Required: codes for the whole catalog are not created from here.",
      -  "items": {
      -    "type": "string"
      -  },
      -  "type": "array"
      -}
    • addedInput schema / required
      Added value: +[
      +  "code",
      +  "discountPct",
      +  "templates",
      +  "confirm"
      +]
    • removedInput schema / x-bernuvia-aliases
      Removed value: -{
      -  "code": "codigo",
      -  "confirm": "confirmar",
      -  "discountPct": "descuentoPct",
      -  "from": "desde",
      -  "templates": "plantillas",
      -  "to": "hasta"
      -}
  2. Changed15 schema fields changed
    • changedInput schema / properties / code / description
      Previous value: -"3 a 24 caracteres: letras, números y guiones (se pasa a mayúsculas)."New value: +"3 to 24 characters: letters, numbers and hyphens (it is uppercased)."
    • changedInput schema / properties / codigo / description
      Previous value: -"ALIAS RETIRADO de `code`: sigue funcionando, pero usa `code` (se quitará en una tanda futura, aún sin fecha). / DEPRECATED alias of `code`. 3 a 24 caracteres: letras, números y guiones (se pasa a mayúsculas)."New value: +"DEPRECATED alias of `code`: it still works, but use `code` (it will be removed in a future round, no date yet). 3 to 24 characters: letters, numbers and hyphens (it is uppercased)."
    • changedInput schema / properties / confirm / description
      Previous value: -"OBLIGATORIO true. Un código regala margen y su nombre queda ocupado para siempre en toda la plataforma: enséñale antes el porcentaje y las plantillas a la persona."New value: +"REQUIRED true. A code gives away margin and its name stays taken for ever across the whole platform: show the percentage and the templates to the person first."
    • changedInput schema / properties / confirmar / description
      Previous value: -"ALIAS RETIRADO de `confirm`: sigue funcionando, pero usa `confirm` (se quitará en una tanda futura, aún sin fecha). / DEPRECATED alias of `confirm`. OBLIGATORIO true. Un código regala margen y su nombre queda ocupado para siempre en toda la plataforma: enséñale antes el porcentaje y las plantillas a la persona."New value: +"DEPRECATED alias of `confirm`: it still works, but use `confirm` (it will be removed in a future round, no date yet). REQUIRED true. A code gives away margin and its name stays taken for ever across the whole platform: show the percentage and the templates to the person first."
    • changedInput schema / properties / descuentoPct / description
      Previous value: -"ALIAS RETIRADO de `discountPct`: sigue funcionando, pero usa `discountPct` (se quitará en una tanda futura, aún sin fecha). / DEPRECATED alias of `discountPct`. Entero de 1 a 90."New value: +"DEPRECATED alias of `discountPct`: it still works, but use `discountPct` (it will be removed in a future round, no date yet). An integer from 1 to 90."
    • changedInput schema / properties / desde / description
      Previous value: -"ALIAS RETIRADO de `from`: sigue funcionando, pero usa `from` (se quitará en una tanda futura, aún sin fecha). / DEPRECATED alias of `from`. Fecha de inicio YYYY-MM-DD (opcional)."New value: +"DEPRECATED alias of `from`: it still works, but use `from` (it will be removed in a future round, no date yet). Start date YYYY-MM-DD (optional)."
    • changedInput schema / properties / discountPct / description
      Previous value: -"Entero de 1 a 90."New value: +"An integer from 1 to 90."
    • changedInput schema / properties / from / description
      Previous value: -"Fecha de inicio YYYY-MM-DD (opcional)."New value: +"Start date YYYY-MM-DD (optional)."
    • changedInput schema / properties / hasta / description
      Previous value: -"ALIAS RETIRADO de `to`: sigue funcionando, pero usa `to` (se quitará en una tanda futura, aún sin fecha). / DEPRECATED alias of `to`. Fecha de fin YYYY-MM-DD (opcional)."New value: +"DEPRECATED alias of `to`: it still works, but use `to` (it will be removed in a future round, no date yet). End date YYYY-MM-DD (optional)."
    • changedInput schema / properties / plantillas / description
      Previous value: -"ALIAS RETIRADO de `templates`: sigue funcionando, pero usa `templates` (se quitará en una tanda futura, aún sin fecha). / DEPRECATED alias of `templates`. Slugs de TUS plantillas a las que aplica. Obligatorio: desde aquí no se crean códigos para todo el catálogo."New value: +"DEPRECATED alias of `templates`: it still works, but use `templates` (it will be removed in a future round, no date yet). Slugs of YOUR templates it applies to. Required: codes for the whole catalog are not created from here."
    • changedInput schema / properties / templates / description
      Previous value: -"Slugs de TUS plantillas a las que aplica. Obligatorio: desde aquí no se crean códigos para todo el catálogo."New value: +"Slugs of YOUR templates it applies to. Required: codes for the whole catalog are not created from here."
    • changedInput schema / properties / to / description
      Previous value: -"Fecha de fin YYYY-MM-DD (opcional)."New value: +"End date YYYY-MM-DD (optional)."
    • changedOutput schema / properties / code / description
      Previous value: -"El código tal como quedó guardado (en mayúsculas)."New value: +"The code as it was saved (uppercase)."
    • changedOutput schema / properties / ok / description
      Previous value: -"Siempre true: el código existe ya."New value: +"Always true: the code exists now."
    • changedOutput schema / properties / templates / description
      Previous value: -"Cuántas plantillas distintas cubre."New value: +"How many different templates it covers."
  3. First observed

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses the financial risk ('gives away margin'), the irreversibility of the name ('taken for good'), the confirm guardrail, and the per-template cap of 10. It does not mention who may call it or whether an existing code can be deactivated later, which is the one notable gap.

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?

A single dense sentence that front-loads the verb, resource, and scope, then layers constraints and the confirmation requirement. Every clause carries information, though the parenthetical constraint stack is slightly cramped.

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 explained, and the description covers the mutation's risk profile, required confirmation, and limits. Missing only permission/authorization context, which matters for a platform-wide mutation with no annotations to fall back on.

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%, so all six parameters are already documented (including the long confirm rationale). The description restates the code length range and discount range but adds one genuinely new fact: the maximum of 10 codes per template, which is not in the schema. Baseline 3 is right when the schema does the heavy lifting.

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 a discount code) and immediately scopes it to 'YOUR templates' with named constraints, which separates it from catalog-wide or activation siblings like set_promo_code_active and my_promo_codes. An agent knows exactly what this produces and its limits 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 Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied through constraints ('they have to be named', 'at most 10 codes per template from here', 'requires confirm=true') rather than stated as when-to-use versus alternatives. It never routes the agent to set_promo_code_active for deactivating an existing code or explains when creating a new code is preferable. Adequate but with a clear routing gap.

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