Skip to main content
Glama

Configure Stock Alerts

ps_configure_stock_alerts
Idempotent

Sets global and per-product stock alert thresholds, including critical levels and recommended check intervals, so PrestaShop inventory warnings match your monitoring needs.

Instructions

Set global and per-product stock alert thresholds.

Updates /data/stock_alert_config.json.

Args:

  • default_threshold: Global warning threshold (default: 5)

  • critical_threshold: Global critical threshold (default: 0)

  • check_interval_minutes: Recommended check interval in minutes (default: 60)

  • product_thresholds: JSON object mapping product_id → threshold e.g. { "42": 10, "99": 3 }

Returns the updated configuration.

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

Input Schema

NameRequiredDescriptionDefault
default_thresholdNoGlobal warning threshold
critical_thresholdNoGlobal critical threshold
product_thresholdsNoPer-product thresholds as { product_id: threshold }
check_interval_minutesNoRecommended check interval in minutes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.1.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare the safety profile (non-read-only, idempotent, non-destructive, closed-world), so the description only needs to add context beyond that. It usefully discloses the persistence target (/data/stock_alert_config.json) and the default for every parameter, but leaves a critical behavioral question unanswered: since all four parameters are optional, does omitting one leave the existing value untouched or reset it to the default? That ambiguity matters for a config writer.

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 statement, then the persistence target, then a clean per-argument list with an inline example, then a one-line return note. Nothing is padded, though the Args block largely mirrors the schema and could have been trimmed to the additions (defaults and example).

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 closing 'Returns the updated configuration' sentence covers the return value, and the nested object example addresses the main schema complexity. What is missing is the merge-versus-replace semantics for optional parameters, which an agent needs to call this safely.

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?

Schema coverage is 100%, so the baseline is 3; the description earns extra credit by documenting default values (5, 0, 60) that appear nowhere in the schema and by giving a concrete product_thresholds example mapping product_id to threshold. The only remaining gap is how the nested product object merges with the global defaults.

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 opening sentence gives a specific verb and resource (set stock alert thresholds) with scope (global and per-product), which is enough to separate it from read-only siblings such as ps_stock_alert_check or ps_low_stock_report. It stops short of naming any sibling to explicitly route against, so it is clear but not differentiated in-text.

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 only implied: an agent infers this is the tool for changing alert thresholds. There is no explicit when-to-use statement, no distinction from ps_stock_alert_check, and no guidance on prerequisites such as reading the current config first. Note that check_interval_minutes is merely a 'recommended' value, which hints at external scheduling but is never explained.

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