Skip to main content
Glama

Get Product Stock

ps_get_product_stock
Read-onlyIdempotent

Retrieve stock levels and out-of-stock policy for a product and all its variants by product ID, so you can check availability before managing orders or inventory.

Instructions

Get stock information for a specific product, including all its combinations/variants.

Args:

  • id_product: Product ID (required)

Returns: Stock entries for the product and all its combinations, with quantities and out-of-stock policy.

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": {
      "id_product": "<id_product>"
    },
    "name": "ps_get_product_stock"
  }
}

Input Schema

NameRequiredDescriptionDefault
id_productYesProduct ID

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=true, idempotentHint=true, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description adds real value beyond that by describing the response content — stock entries for the product and all its combinations, with quantities and an out-of-stock policy — which an agent cannot derive from the annotations or the single-parameter 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?

It is short, front-loaded with the purpose, and cleanly separated into Args and Returns sections, so an agent can scan it quickly. The Args line slightly duplicates the schema, which keeps it just short of ideal, but no sentence is wasteful.

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 single-parameter read-only tool with full annotation coverage and no output schema, the definition covers what the tool does and roughly what comes back. Minor gaps remain: no note on whether the response is flat or grouped per combination, and no statement about empty results or invalid IDs.

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?

There is exactly one parameter and the schema already documents it at 100% coverage ('Product ID', integer, exclusiveMinimum 0). The description only repeats 'Product ID (required)' and adds nothing about format, source of the ID, or behavior on an unknown ID, 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 gives a specific verb and resource ('Get stock information for a specific product') plus a scope detail that matters: it returns data for all combinations/variants, not just the parent product. That scope note meaningfully separates it from a plain product fetch, but it never names a sibling such as ps_list_stock or ps_get_product, so an agent must infer the boundary itself.

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: the required id_product argument signals 'call this when you already know the product ID.' There is no explicit when-to-use statement, no exclusion (e.g. 'use ps_list_stock for browsing all products'), and no prerequisites or error guidance for a non-existent ID.

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