Skip to main content
Glama

discount_update

Idempotent

Update an existing discount by modifying fields such as code, amount, type, status, or validity period. Supports partial updates with enumerated values for amount mode, discount type, and applies to.

Instructions

Update a discount (PUT /admin/api/ecommerce/v1/discounts/{id}). Envelope {discount: {...}}. Partial — at least one discount field must be supplied. Enum-restricted fields (client-validated): status ∈ {open, closed}; amount_mode ∈ {net, gross}; discount_type ∈ {fixed, percentage}; applies_to ∈ {cart, cart_and_shipping, categories, products, shipping}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
siteYes
discount_idYes
codeNo
nameNo
descriptionNo
amountNo
amount_modeNo
discount_typeNo
statusNo
applies_toNo
valid_fromNo
valid_toNo
redemption_limitNo
stackableNo
currencyNo
Behavior4/5

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

Adds context beyond annotations: partial update requirement (at least one field must be supplied) and enum validation ('client-validated'). No contradiction with annotations (readOnlyHint=false, destructiveHint=false, idempotentHint=true).

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?

Single sentence with all key information: action, HTTP method, envelope, partial requirement, enum restrictions. Front-loaded and efficient.

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?

Covers partial update and enum restrictions well. Lacks details on other optional fields, but given schema provides names and types, it is reasonably complete for a mutation tool with no output schema.

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?

Lists enum values for status, amount_mode, discount_type, applies_to, adding 'client-validated' context. However, schema coverage is 0%, and description does not explain other parameters like site, discount_id, code, etc. Only partial compensation for enum fields.

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?

Clearly states 'Update a discount' with HTTP method, partial update requirement, and lists enum-restricted fields. Differentiates from sibling tools like discount_create and discount_delete.

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?

Implies usage for updating existing discounts with partial updates, but does not explicitly state when to use or exclude alternatives. No mention of prerequisites or conditions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/runnel/voog-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server