Skip to main content
Glama

stockout_risk

Calculate stockout risk for Mercado Libre listings by measuring sales velocity and days of stock coverage over a historical window, flagging critical or warning inventory levels.

Instructions

Riesgo de quiebre de stock por publicación: días de cobertura y velocidad de venta (unidades/día) sobre una ventana histórica. Read-only, calculado en vivo desde la API de Mercado Libre (órdenes + stock). Sin escrituras.

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

Input Schema

NameRequiredDescriptionDefault
limitNoCorta el array items a los N de mayor riesgo (no afecta los conteos)
statusNoEstado de las publicaciones a evaluaractive
seller_idNoOverride del seller_id (default: el de /users/me del token)
window_daysNoVentana histórica (días) para medir la velocidad de venta
warning_daysNoDías de cobertura ≤ este umbral (y > critical) ⇒ riesgo alto
critical_daysNoDías de cobertura ≤ este umbral ⇒ riesgo critico
include_no_salesNoSi es false, descarta ítems sin ventas en la ventana

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.0-alpha.3

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations supplied, the description does good work in declaring the safety profile: read-only, computed live from the Mercado Libre API using orders + stock, and explicitly 'sin escrituras'. What is missing is the response shape (a ranked item array is only hinted at via the limit parameter), plus latency and error behavior for a live-computed endpoint.

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?

Two compact sentences, front-loaded with what is computed and backed by the data-source and read-only qualifiers. No filler, though the information density is high enough that the metric definitions are slightly terse.

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 7-parameter, read-only analytical tool with no output schema and no annotations, the description covers the essential gaps: data source, computation model, metric definitions and the absence of side effects. It stops short of explaining how risk tiers are assigned in the output, which lives only partly in the schema.

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 including window_days, warning_days and critical_days is already documented in the schema, including the relationship between the two risk thresholds. The description adds no parameter-level semantics beyond what structured data provides, so the baseline 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?

The description names a specific computed resource (stockout risk per listing) and the two derived metrics: coverage days and sales velocity in units/day over a historical window. That is far more specific than a restatement of the name, though it does not explicitly contrast itself with siblings such as get_item_metrics or update_stock.

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

Usage Guidelines2/5

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

There is no when-to-use / when-not-to-use guidance and no named alternative. The agent must infer that this tool is for restock triage rather than for price or listing management. The sibling set contains several adjacent tools (get_item_metrics, update_stock) that go unmentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.