Skip to main content
Glama

Create PrestaShop Specific Price

ps_create_specific_price

Create product-level price rules to apply percentage or amount discounts by date range, customer group, country, and minimum quantity.

Instructions

Create a specific price rule (product-level promotion).

⚠️ Requires PS_READONLY=false and POST enabled on the PrestaShop Webservice key.

Args:

  • id_product: Product ID (required)

  • reduction: Reduction value (required)

  • reduction_type: "percentage" or "amount" (required)

  • from: Start date (ISO YYYY-MM-DD, optional)

  • to: End date (ISO YYYY-MM-DD, optional)

  • id_group: Customer group ID (0 = all groups)

  • id_country: Country ID (0 = all countries)

  • from_quantity: Minimum quantity for the price to apply (default: 1)

Returns: Created specific price ID.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "id_product": "<id_product>",
      "reduction": "<reduction>",
      "reduction_type": "<reduction_type>"
    },
    "name": "ps_create_specific_price"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNoEnd date
fromNoStart date
id_groupNoCustomer group ID (0=all)
reductionYesReduction value
id_countryNoCountry ID (0=all)
id_productYesProduct ID
from_quantityNoMinimum quantity
reduction_typeYesType of reduction
confirmation_tokenNoConfirmation token

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.1.0

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare non-read-only, non-idempotent, non-destructive, so the safety profile is covered; the description then adds real value beyond them by disclosing the write-access prerequisite (PS_READONLY=false, POST enabled) and the return value (created ID). It does not warn that retries can create duplicate rules, which matters given idempotentHint=false, or how conflicting existing rules are handled.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The warning is front-loaded and the Args list is scannable, but with full schema coverage the enumerated parameter list is largely duplicated structured data. It is not bloated, yet a good share of the text does not earn its place over the schema.

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 9-parameter mutation tool with no output schema, the description covers purpose, prerequisites, all main parameters, and the return value (created ID), which is the key missing piece an output schema would otherwise supply. The unmentioned confirmation_token and the lack of conflict/duplication guidance are the remaining gaps.

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 parameter is already documented in the schema; the Args block largely restates those descriptions plus required/optional flags. Meaningful additions beyond the schema are minimal, and confirmation_token appears in the schema but is never mentioned in the description, so the baseline of 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 specific price rule') and adds the plain-language gloss '(product-level promotion)', which tells an agent this is a price override rather than a cart-level discount. It stops short of naming ps_create_cart_rule as the different alternative, so the boundary between the two promotion mechanisms is left implicit.

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 usage context is implied by 'product-level promotion' and the prerequisite warning, but there is no explicit when-to-use or when-not-to-use statement and no named alternative (e.g. cart rules for basket-level discounts). An agent knows this creates a price rule but not clearly when to prefer a sibling tool instead.

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