Skip to main content
Glama

Amazon Seller MCP Server — AgentXray

Stock history and stock-outs

get_stock_history
Read-onlyIdempotent

How long one SKU has been in stock on one marketplace and what running out cost: days in stock, out of stock, not launched yet and unknown (no snapshot), each stock-out period, the first receipt, units per day on in-stock days only, and an ESTIMATE of sales lost while out of stock. Use it for 'how long has this been selling', 'how many days was it out of stock', 'what did running out cost'.

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": {
      "sku": "<sku>"
    },
    "name": "get_stock_history"
  }
}

Input Schema

NameRequiredDescriptionDefault
skuYesThe seller SKU.
daysNoWindow in store days, 1-365 (default 90).
accountNoSeller id of the client account (agencies with several accounts on this marketplace).
end_dateNoCustom range end, YYYY-MM-DD (inclusive).
start_dateNoCustom range start, YYYY-MM-DD (inclusive).
marketplace_idNoMarketplace (inferred when only one is connected).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior3/5

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

Annotations declare readOnlyHint=true, idempotentHint=true, destructiveHint=false and openWorldHint=false, so the safety and idempotency profile is fully covered. The description adds valuable output context (that lost sales is an ESTIMATE, that units-per-day is on in-stock days only), but does not discuss rate limits, scoping caveats, or snapshot-absence behavior beyond 'unknown (no snapshot)'.

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-loads the core purpose, then lists outputs, then gives usage triggers. Dense but every clause earns its place; only the extra 'no snapshot' parenthetical is slightly parenthetical.

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?

The description covers what the tool returns, the conceptual breakdown of stock categories, and the estimate caveat. For a read-only single-SKU query with no output schema, this is nearly complete, though it could briefly mention window interaction with days vs start_date/end_date.

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 all six parameters (sku, days, account, end_date, start_date, marketplace_id) are documented with ranges, defaults, and formats. The description adds no parameter-level detail beyond what the schema provides, so 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+resource: 'How long one SKU has been in stock on one marketplace and what running out cost', then enumerates the exact outputs. This clearly distinguishes it from siblings like get_inventory_age or get_sku_trend, which concern aging or trend rather than stock-out history.

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

Usage Guidelines5/5

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

Explicitly enumerates triggering user questions: 'how long has this been selling', 'how many days was it out of stock', 'what did running out cost'. These map directly to agent intent and make the tool selectable without inference.

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