Skip to main content
Glama

List PrestaShop Cart Rules

ps_list_cart_rules
Read-onlyIdempotent

Retrieve cart rules and discount codes with filters for active status, pagination, and language. Inspect each voucher's code, discount type, amount, and validity dates.

Instructions

List cart rules (discount codes / vouchers) with optional filtering.

Args:

  • limit: Max items to return (default: 50)

  • offset: Pagination offset (default: 0)

  • active: Filter by active status (true/false)

  • lang_id: Language ID for multilang fields (default: "1")

Returns: Array of cart rules with id, name, code, discount type, amount, and validity dates.

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": "ps_list_cart_rules"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMax items
activeNoFilter by active status
offsetNoPagination offset
lang_idNoLanguage ID for multilang fields1

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 readOnly, idempotent, non-destructive and closed-world, so the safety profile is covered. The description still earns credit by describing the return payload (id, name, code, discount type, amount, validity dates) for a tool with no output schema, though it says nothing about ordering, pagination limits beyond the schema, or empty-result behavior.

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 lead sentence is front-loaded and useful, but the Args block duplicates four parameters that the schema already describes at 100% coverage, which is dead weight. The Returns section justifies its space; the Args section largely does not.

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 simple read-only listing tool, the definition covers inputs, defaults and the shape of returned records, which matters because no output schema exists. Remaining gaps (sort order, total-count semantics) are minor for this complexity level.

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 structured form, establishing a baseline of 3. The description's Args block merely restates the schema with the same defaults and adds no interpretive detail, such as how lang_id changes the returned name field.

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 ('List cart rules') and disambiguates jargon by equating cart rules with discount codes / vouchers. It never names the write counterpart ps_create_cart_rule, so sibling differentiation is left to inference, but the purpose itself is unmistakable.

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 phrase 'with optional filtering' and the defaults imply the tool is for browsing/paging through rules, but there is no explicit when-to-use vs when-to-use-another instruction and no exclusions. For a straightforward list tool that is adequate, but it adds no routing 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