Skip to main content
Glama
kartparash-cmd

Korral StoreLink MCP

Get stock position

get_stock_position
Read-only

Check current on-hand stock and units sold in last 24h for a SKU across stores, calculating the replenishment gap to identify which stores need restocking

Instructions

Read the current StoreLink inventory snapshot for one SKU across one or more Korral stores, and compute the replenishment gap. Read-only.

WHAT IT RETURNS positions: one entry per requested store, each containing

  • store_id The store this row is for, e.g. "47".

  • on_hand Units physically in stock at the snapshot time.

  • units_sold_last_24h Aggregate units sold in the trailing 24 hours. Aggregate only — there are no baskets, receipts or timestamps behind it.

  • gap COMPUTED BY THIS SERVER as units_sold_last_24h - on_hand.

  • as_of ISO-8601 timestamp of the inventory snapshot the numbers came from. Stock moves continuously; quote this when you report numbers to the buyer.

All three raw numbers are always returned alongside gap so the buyer can check the arithmetic. Never re-derive gap differently, and never present gap without the on_hand and units_sold_last_24h it came from.

HOW TO READ gap gap > 0 The store sold more in the last 24h than it currently holds. This is the replenishment signal. Magnitude = exactly how many more units would have been needed to serve the last 24 hours out of today's shelf (on_hand 3, sold 11 -> gap +8 at store 47). gap = 0 KNIFE EDGE, not "covered": the shelf holds exactly one more day at yesterday's rate, so the store runs empty in roughly 24 hours (on_hand 7, sold 7 -> gap 0). Surface it to the buyer as a watch item; never report it as fine. gap < 0 Stock exceeds the last 24h of sales by |gap| (on_hand 9, sold 5 -> gap -4). No shortfall indicated. gap is 24-hour arithmetic, not a forecast and not an order quantity. It carries no safety stock, no shelf-capacity limit, no promotion, seasonality or day-of-week adjustment, and no supplier lead time. Never pass gap into create_replenishment_order's quantity as a default — quote it to the buyer as evidence and let them state the number.

WHEN TO USE IT Step 2 of the standard workflow: lookup_sku -> get_stock_position -> create_replenishment_order -> get_replenishment_status. Use it to answer "are we short on X?", to compare a SKU across a store list, and ALWAYS immediately before proposing an order, so the reason string on that order cites live numbers. Pass every store the buyer cares about in one call rather than looping.

ERRORS — five distinct failures needing different responses:

  • Unknown store_id, or a store this server has no credentials for -> a per-store entry carrying an "error" field; other stores still return normally. Check every entry before summarising; never total or average across entries that carry an error.

  • SKU valid but NOT RANGED at that store -> also a per-store "error" entry ("not ranged"). This is not a typo and not transient: that store carries no inventory record for the product, so it cannot be replenished there and the failure is not fixable by retrying or correcting the code. Report it to the buyer and do not call create_replenishment_order for that store.

  • "No credentials for store " -> that store has no API key configured here. It says NOTHING about the stock, which may be fine or may be empty. Never present it as a stock answer, never substitute a different store, and never guess. Pass the message to the buyer so they can raise access with Korral IT.

  • "Authentication failed for store after key reload" -> the key was already reloaded once and still rejected. Retrying immediately will not help; a short wait might, and if it persists it is a Korral IT matter. Again, this is not a stock answer.

  • Unknown sku -> the WHOLE call fails; the code is wrong. Call lookup_sku and retry with a sku copied verbatim from its matches. If EVERY requested store errors, the whole call is returned as an error too — that is a credentials or connectivity problem, so do not report it to the buyer as "no gaps found".

WHEN NOT TO USE IT It does not write anything and cannot reserve, hold or move stock. It has no supplier information (no vendor, lead time, order minimum or cost), no pricing, cost or margin, and no POS or transaction-level detail beyond the single aggregate units_sold_last_24h — no basket data, no hourly breakdown, no history beyond the current snapshot and trailing 24h. Do not offer the buyer a trend, a week-over-week comparison, or a delivery ETA from this tool.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
skuYesExact Korral SKU code to check, e.g. "8847291". Must be a real code — resolve product names through lookup_sku first; a wrong code fails the entire call.
store_idsYesOne or more Korral store IDs to check, e.g. ["47", "102", "111"]. Pass all stores of interest in a single call; unknown IDs come back as per-store error entries rather than failing the others.
Behavior5/5

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

Despite readOnlyHint=true and openWorldHint=true annotations, the description goes far beyond by detailing the exact computation of gap, the knife-edge gap=0 interpretation, the five distinct error modes with appropriate responses, and explicit warnings like never passing gap into create_replenishment_order's quantity. It also discloses that units_sold_last_24h is an aggregate with no underlying baskets or timestamps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Although long, the description is impeccably structured with clear headings (WHAT IT RETURNS, HOW TO READ gap, WHEN TO USE IT, ERRORS, WHEN NOT TO USE IT). Every sentence earns its place, covering complex edge cases without redundancy, and the core purpose is front-loaded in the first line.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema and complex per-store error semantics, the description fully compensates by explaining return fields, gap interpretation, error types, and limitations. It also places the tool in the broader workflow, making it complete for an agent to use correctly.

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 adds marginal value by reinforcing the workflow context ('Pass every store the buyer cares about in one call rather than looping') and clarifying the per-store error behavior for store_ids, though most parameter details are already in the schema. The description's examples (e.g., store_id '47') and the call to resolve SKUs via lookup_sku add a little extra semantic color.

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?

The description opens with a precise verb+resource: 'Read the current StoreLink inventory snapshot for one SKU across one or more Korral stores, and compute the replenishment gap.' It clearly distinguishes itself from siblings by stating its role as the read-only gap calculator between lookup_sku and create_replenishment_order, and the workflow section reinforces this.

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?

A dedicated 'WHEN TO USE IT' section explicitly places the tool as Step 2 of the standard workflow, names the exact conditions for use (e.g., always before proposing an order, pass all stores at once), and 'WHEN NOT TO USE IT' lists exclusions like no supplier info, no trend analysis, and no ORDER quantity derivation. This is explicit when-to-use and when-not-to-use guidance.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/kartparash-cmd/korral-storelink-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server