Skip to main content
Glama

List PrestaShop Stock

ps_list_stock
Read-onlyIdempotent

Lists product stock availability with filters for product ID and out-of-stock items, plus pagination and summary or ID-only response modes for inventory checks.

Instructions

List stock availability for products.

Args:

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

  • offset: Pagination offset (default: 0)

  • id_product: Filter by product ID

  • out_of_stock_only: Only show products with quantity <= 0

  • mode: Response shape (default: "raw"): • "raw" → full stock entries (default, backward-compatible) • "summary" → aggregated stats only (total units, out-of-stock count, in-stock count) • "ids_only" → flat array of product IDs that have stock entries

Returns: Array of stock entries with product_id, product_attribute_id, quantity, and out_of_stock policy.

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_stock"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNoResponse shape: 'raw'=full records (default), 'summary'=aggregated stats only, 'ids_only'=flat product ID arrayraw
limitNoMax items
offsetNoPagination offset
id_productNoFilter by product ID
out_of_stock_onlyNoOnly show out-of-stock items

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.1.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, non-destructive and closed-world, so the safety profile is covered. The description adds genuine value on top: it spells out the three response shapes and what each contains, plus the returned fields (product_id, product_attribute_id, quantity, out_of_stock policy), which the agent cannot learn from the annotations or the schema.

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 purpose sentence followed by a scannable Args block and a Returns line – the structure is easy to parse. It is somewhat redundant with the input schema (repeating defaults and enum meanings), which costs it a point, but no sentence is filler.

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?

With no output schema, the description carries the burden of describing return values and does so adequately, including field names and the mode-dependent shapes. It falls short only on upper bounds and pagination behavior (limit max 500 lives only in the schema) and on any note about how the listing relates to the reporting siblings.

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 five parameters, making 3 the baseline. The description adds only marginal meaning beyond the schema – notably the sharper definition of out_of_stock_only as 'quantity <= 0' and the expansion of what each mode returns – but restates defaults and filter intent that the schema already carries.

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 opens with a specific verb+resource: 'List stock availability for products', which is clearly distinct from single-record siblings like ps_get_product_stock. It does not, however, explicitly differentiate itself from related siblings such as ps_low_stock_report or ps_stock_rotation_score, so the agent must infer the boundary.

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 implied rather than stated: the presence of out_of_stock_only and the three mode shapes hints at when a caller would pick this listing tool, but there is no sentence like 'use this instead of X when Y'. No prerequisites or exclusions are given.

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