Skip to main content
Glama

Coupons Create

tiendanube_coupons_create

Create a discount coupon in Tiendanube by defining code, discount type (percentage, fixed amount, or shipping), value, dates, usage limits, and product/category scope.

Instructions

Create a discount coupon. HTTP: POST /coupons Required scope: write_coupons API version: 2025-03

Input Schema

NameRequiredDescriptionDefault
codeYesCoupon code text
typeYesCoupon type (percentage | absolute | shipping)
validNoWhether the coupon is active
valueNoPercentage or amount as string; omit for 'shipping' coupons
end_dateNoEnd date (YYYY-MM-DD)
max_usesNoMaximum total uses
productsNoProduct IDs the coupon applies to
min_priceNoMinimum cart subtotal
categoriesNoCategory IDs the coupon applies to
start_dateNoStart date (YYYY-MM-DD)
additional_fieldsNoExtra raw API body fields not covered above; merged into the request body
includes_shippingNoDiscount also applies to shipping
max_uses_per_clientNoMaximum uses per client
first_consumer_purchaseNoOnly for a customer's first purchase
combines_with_other_discountsNoCan be combined with other discounts

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare the mutation profile (readOnlyHint=false, destructiveHint=false, openWorldHint=true, idempotentHint=false). The description adds genuinely useful context beyond them — the required write_coupons scope, the POST /coupons endpoint and the API version — but says nothing about failure behavior (e.g. duplicate coupon codes are rejected, invalid date ranges), which matters for a non-idempotent create.

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?

Four short, front-loaded lines with no filler; the verb+resource leads and the operational metadata follows. Slightly more could be trimmed (API version is of marginal use to an agent deciding how to call it).

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 15-parameter nested create with no output schema, the description is adequate but thin: it doesn't say what comes back (a coupon object with an id), nor flag conditional parameter dependencies beyond what the schema hints at. An agent can call the tool, but lacks a behavioral picture of the result and error path.

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 every one of the 15 parameters is already documented in the schema, including the shipping/percentage value nuance. The description adds no parameter-level meaning, so baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Create a discount coupon'), which is unambiguous and matches the coupons_* family of siblings. It does not, however, distinguish this from the adjacent tiendanube_promotions_create or explain the coupon-vs-promotion boundary.

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?

The required write_coupons scope implies the precondition for calling it, but the description never says when to use this versus promotions_create / discounts_callbacks_upsert, nor any when-not condition. Usage is inferable from the name rather than 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