Skip to main content
Glama

Consultar disponibilidad actual

get_product_availability

Consulta disponibilidad actual en PrestaShop. Omite combination_id para obtener el estado agregado del producto, o indica el ID entero de la variante para consultarla. Un estado general in_stock no confirma la disponibilidad de una variante ni de un corte personalizado. unknown no confirma ni descarta que se pueda servir la longitud solicitada.

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": {
      "product_id": "<product_id>"
    },
    "name": "get_product_availability"
  }
}

Input Schema

NameRequiredDescriptionDefault
product_idYesID numérico del producto de PrestaShop, devuelto por search_products. No es la referencia comercial.
combination_idNoID entero de la combinación, obtenido de get_product. Omitir para el estado agregado; no enviar null ni una referencia comercial.

Output Schema

NameRequiredDescriptionDefault
product_idYes
availabilityYes
combination_idYesNull identifies the aggregate product status. An integer identifies the requested variant.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / combination_id / description
      Added value: +"ID entero de la combinación, obtenido de get_product. Omitir para el estado agregado; no enviar null ni una referencia comercial."
    • addedInput schema / properties / product_id / description
      Added value: +"ID numérico del producto de PrestaShop, devuelto por search_products. No es la referencia comercial."
  2. Changed1 schema field changed
    • addedOutput schema / properties
      Added value: +{
      +  "availability": {
      +    "properties": {
      +      "checked_at": {
      +        "format": "date-time",
      +        "type": "string"
      +      },
      +      "reason": {
      +        "description": "Reason code when the status is unknown.",
      +        "type": "string"
      +      },
      +      "source": {
      +        "const": "prestashop",
      +        "description": "Availability checked directly against PrestaShop."
      +      },
      +      "status": {
      +        "description": "unknown neither confirms nor rules out stock for a requested custom length.",
      +        "enum": [
      +          "in_stock",
      +          "out_of_stock",
      +          "unknown"
      +        ]
      +      }
      +    },
      +    "required": [
      +      "status",
      +      "checked_at",
      +      "source"
      +    ],
      +    "type": "object"
      +  },
      +  "combination_id": {
      +    "description": "Null identifies the aggregate product status. An integer identifies the requested variant.",
      +    "maximum": 4294967295,
      +    "minimum": 1,
      +    "type": [
      +      "integer",
      +      "null"
      +    ]
      +  },
      +  "product_id": {
      +    "maximum": 4294967295,
      +    "minimum": 1,
      +    "type": "integer"
      +  }
      +}
  3. First observed

TDQS

A3.9/5.0
Behavior3/5

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

Annotations declare readOnlyHint=false and openWorldHint=true, so the agent already knows this reaches an external system and is not guaranteed read-only; the description usefully explains that results are per-variant and that 'unknown' is inconclusive. However, it never explains why a 'Consulta' is flagged non-read-only (possible side effects, auth or rate limits), leaving a real tension with the annotations unaddressed. Added value exists, but the behavioral picture is incomplete.

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?

Four tight sentences with zero filler, and purpose plus the parameter decision rule are front-loaded before the interpretive caveats. Slightly compressed phrasing around 'corte personalizado' assumes domain vocabulary the reader must infer.

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?

An output schema exists, so return shape need not be restated, and the description still pre-empts the two misreadings that matter most (general stock vs. variant, and the meaning of unknown). Missing only the reason for the non-read-only hint, which would complete the picture for a simple two-parameter query.

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 coverage is 100% and both parameters are already documented, including provenance (from search_products / get_product) and the prohibition on sending null or a commercial reference. The description reinforces the omit-vs-include semantics and the consequence of omission (aggregate status), which is real added meaning, but it adds no syntax or format detail beyond the schema. Baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Consulta disponibilidad actual en PrestaShop') and immediately scopes it to two modes: aggregated product status vs. a single variant. The sibling get_product returns product data, so an agent can tell which one answers an availability question without opening either schema.

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

Usage Guidelines4/5

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

Gives explicit selection logic for the optional parameter: omit combination_id for the aggregate, pass the integer variant ID to query one variant. It also adds interpretation warnings (a general in_stock does not confirm a variant, unknown is inconclusive). It stops short of naming an alternative tool for cases this one cannot answer.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources