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 confirmar=true: it gives away margin and the name is taken for good.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toNoEnd date YYYY-MM-DD (optional).
codeNo3 to 24 characters: letters, numbers and hyphens (it is uppercased).
fromNoStart date YYYY-MM-DD (optional).
desdeNoDEPRECATED 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).
hastaNoDEPRECATED 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).
codigoNoDEPRECATED 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).
confirmNoREQUIRED 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.
confirmarNoDEPRECATED 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.
templatesNoSlugs of YOUR templates it applies to. Required: codes for the whole catalog are not created from here.
plantillasNoDEPRECATED 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.
discountPctNoAn integer from 1 to 90.
descuentoPctNoDEPRECATED 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.

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. 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."
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

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

No annotations provided, so the description carries full burden. It discloses irreversible consequences (name taken for good, gives away margin), requires explicit confirmation (confirmar=true), and limits scope to named templates. This is excellent transparency for a mutating operation.

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?

The description is two sentences, front-loaded with the core purpose and constraints, and the confirmation requirement is placed second. It is efficient, though slightly dense with mixed content (format, limits, and behavioral warnings) that could benefit from bullet points for clarity.

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 (12 params, aliases, deprecated fields), the description covers all essential aspects: input format, constraints, confirmation requirement, and consequences. The output schema exists, so return value details aren't needed. No critical information is missing.

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?

Schema coverage is 100%, so the baseline is 3. The description adds critical meaning beyond the schema: it explains why confirm is required ('gives away margin' and 'name is taken for good'), which is not evident from the schema alone. This compensates for the schema's dry specifications and justifies a 4.

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 action (creates a discount code), the target (your templates), and key constraints (3-24 chars, 1-90%, max 10 codes per template). It distinguishes from siblings like my_promo_codes (viewing) and set_promo_code_active (toggling) by implying this is for creation.

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 description explicitly states the primary use case (creating codes for your templates) and a constraint (at most 10 codes per template). It implicitly excludes catalog-wide codes via the schema note but doesn't name sibling alternatives like set_promo_code_active for toggling.

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