Skip to main content
Glama

Pridly — AI copilot for PrestaShop

Put products on sale for a limited time

set_product_discount

Gives products a percentage (or fixed amount) discount for a limited time, e.g. "20% off these 5 wines until Sunday 23:59". It uses PrestaShop's own specific prices, so the shop shows the old and new price automatically and the discount ends by itself. Choose products with ids (best: ask top_products first) or a search word/category. Preview first, then confirm; undo removes it. Always show the preview to the user and get their explicit approval before calling again with confirm=true and the preview_id. Paid plans only. Max 100 products. To apply it later instead of now, call with confirm=true, the preview_id AND apply_at (the store's local time, YYYY-MM-DDTHH:MM).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "set_product_discount"
  }
}

Input Schema

NameRequiredDescriptionDefault
idsNo
skuNo
fromNoStart, store local time, YYYY-MM-DD or YYYY-MM-DDTHH:MM. Default: now.
storeNoStore address or id. Leave empty if you have only one store.
untilNoEnd, store local time: YYYY-MM-DD (end of that day) or YYYY-MM-DDTHH:MM.
amountNoFixed amount off, in the shop currency (tax excluded).
searchNo
confirmNoSet true ONLY after the user approved the preview.
percentNoPercent off the normal price (use this OR amount).
apply_atNoOnly with confirm=true: apply later. Store local time, YYYY-MM-DDTHH:MM, between 5 minutes and 90 days from now.
categoryNo
preview_idNoThe preview_id returned by the preview call (required with confirm=true).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare non-read-only, non-destructive, open-world; the description adds substantive context beyond that: the preview/confirm gate, the auto-expiry of the discount, paid-plan restriction, the 100-product cap, and the 5-minute-to-90-day window for apply_at. It never contradicts the annotations.

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?

Front-loaded with the core effect and mechanism, then the workflow, then constraints. Every sentence carries information, though the preview-approval requirement is stated twice ("Preview first, then confirm" and "Always show the preview... before calling again with confirm=true"), a minor redundancy.

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?

For a 12-parameter mutation with no output schema, the description covers the essential workflow, the safety gate, plan and size limits, and scheduling. It omits what the preview returns and how sku/store interact with the id selection, so it is strong but not exhaustive.

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?

With 67% schema coverage the description adds real meaning for the selector params (ids preferred, or search word/category) and ties preview_id to confirm=true, plus the store-local-time format and bounds for apply_at. It does not explain sku or store, so it does not fully compensate for the coverage gap, but the important workflow params are clarified.

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 (gives products a percentage or fixed discount for a limited time), the underlying mechanism (PrestaShop specific prices), and the automatic lifecycle (old/new price shown, discount ends by itself). It also routes the agent to the sibling top_products for finding product ids, so it is distinguishable from find_products and update_products.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

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

Explicit two-step workflow: preview first, then confirm with preview_id, and always get the user's explicit approval before confirming. It names prerequisites (paid plans only, max 100 products), the alternative for scheduling (apply_at with confirm=true), and the reversal path (undo removes it), leaving little to inference.

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