Skip to main content
Glama

Coupons Update

tiendanube_coupons_update
Idempotent

Update an existing coupon in Tiendanube/Nuvemshop by ID, including its code, type, value, active status, dates, usage limits, and eligibility rules.

Instructions

Update a coupon. HTTP: PUT /coupons/{id} Required scope: write_coupons API version: 2025-03

Input Schema

NameRequiredDescriptionDefault
idYesCoupon ID
codeNoCoupon code text
typeNoCoupon 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

A3.5/5.0
Behavior3/5

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

The description adds the HTTP method, required write scope, and API version beyond the annotations, which already declare idempotent, non-destructive, and open-world behavior. It does not explain partial-update semantics or how omitted optional fields are treated, which are important behavioral details for a 16-parameter update tool.

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?

The description is four short lines, front-loads the purpose, and then gives endpoint, scope, and API version without wasted prose. Each line provides some actionable metadata.

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?

The definition is adequate because the schema fully documents the many optional fields and annotations cover safety traits. However, for a mutation tool with 16 parameters, it leaves out whether this is a partial update or replacement and how omitted fields behave.

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 the schema already documents all 16 parameters in detail. The description adds no parameter-level meaning beyond the schema, which is acceptable given full coverage but does not exceed baseline.

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?

The description clearly states a specific verb and resource: "Update a coupon." It does not explicitly differentiate this tool from siblings such as coupons_create, coupons_get, or coupons_delete, but the update purpose is unambiguous.

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 only implied by the verb "Update"; there is no explicit guidance on when to use this versus coupons_create, coupons_get, or coupons_delete. The required scope line adds useful access context but not selection guidance.

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