Skip to main content
Glama

Inventory Forecast

inventory_forecast
Read-onlyIdempotent

Predict stock depletion dates using moving-average sales velocity. Get reorder points, safety stock levels, and suggested reorder quantities for each product.

Instructions

Predict stock depletion dates using moving-average sales velocity. Returns reorder points, safety stock levels, and suggested reorder quantities for each product.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
store_idYesUUID of a connected store (returned by store_connect with action="connect" or visible in store_connect with action="list" / the store_overview resource)
product_idNoRestrict the forecast to a single product by its external_id (Shopify product ID or WooCommerce product slug). Omit to forecast every active product in the store.

Implementation Reference

  • Type definition (ForecastResult) used by the inventory_forecast tool. Defines all output fields: product_id, product_title, sku, current_stock, avg_daily_sales, days_of_stock, depletion_date, reorder_point, suggested_reorder_qty, safety_stock, risk_level, and detail.
    // ── Inventory Forecast ────────────────────────────────────────────
    export const ForecastResultSchema = z.object({
      product_id: z.string(),
      product_title: z.string(),
      sku: z.string().nullable(),
      current_stock: z.number().int(),
      avg_daily_sales: z.number(),
      days_of_stock: z.number().nullable(),
      depletion_date: z.string().nullable(),
      reorder_point: z.number().int(),
      suggested_reorder_qty: z.number().int(),
      safety_stock: z.number().int(),
      risk_level: z.enum(['low', 'medium', 'high', 'critical']),
      detail: z.string(),
    });
    export type ForecastResult = z.infer<typeof ForecastResultSchema>;
Behavior4/5

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

Annotations already declare the tool read-only and idempotent. The description adds that it uses moving-average sales velocity and returns specific outputs (reorder points, safety stock, suggested reorder quantities), providing useful behavioral context beyond annotations.

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?

The description is two sentences, front-loading the purpose and method, followed by return values. No extraneous information.

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?

Given the annotations and full schema coverage, the description adequately covers purpose and output. It lacks details on the moving-average window or data recency, but the tool is straightforward.

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%, so the description adds no new meaning to the parameters beyond what the schema already provides.

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 clearly states the tool predicts stock depletion dates using moving-average sales velocity, distinguishing it from sibling tools like inventory_status or order_anomalies.

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?

The description does not explicitly state when to use this tool versus alternatives, nor does it provide exclusions or prerequisites.

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/enzoemir1/shopops-mcp'

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