Skip to main content
Glama

Size Order To Date

size_order_to_date
Read-only

How much of an item to order so stock lasts through a date ("enough to get through Nov 15"). For each item (itemIds and/or skus, max 100) at one warehouse: the daily demand rate (forecast over exactly that window, or recent sales), days from today (tenant calendar) through coverThrough inclusive, demand, safety stock, available, inbound (open POs and transfers expected on or before coverThrough; undated ones count and are reported as inboundUndated; later ones are reported as inboundAfterCover and not counted), and suggestedQuantity = ceil(demand + safety stock - available - inbound), never below zero and raised to the preferred vendor's minimum order quantity. Also returns the preferred vendor and the unit cost a draft PO would use. Read-only: pass the result to create_purchase_order to order it.

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": {
      "coverThrough": "<coverThrough>"
    },
    "name": "size_order_to_date"
  }
}

Input Schema

NameRequiredDescriptionDefault
skusNoItem SKUs. Provide itemIds and/or skus.
itemIdsNoItem ids (GUIDs). Provide itemIds and/or skus.
warehouseIdNoWarehouse id (GUID) to size for — from list_warehouses. Optional when the tenant has one stock-holding warehouse.
coverThroughYesLast day the stock must last through, YYYY-MM-DD on the tenant's calendar.

Output Schema

NameRequiredDescriptionDefault
okNo
itemsNo
todayNo
notFoundNo
coverThroughNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare a safe read, but the description goes well beyond them: it details the demand-rate basis, inclusive day counting, how inbound POs/transfers are counted (undated counted, post-cover excluded and reported), the exact suggestedQuantity formula with ceil and floor at zero, and the vendor MOQ uplift. That is the behavioral detail an agent needs to trust and interpret the result.

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 a dense single paragraph, but it is front-loaded with the core intent and then walks through inputs, computation, and the downstream hand-off in a logical order. Almost every clause carries information; only the item/warehouse restatement is mildly redundant.

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?

For a multi-input calculation tool with an output schema, the description supplies the full model: what is computed, which inputs matter, how edge inputs (undated/late inbound) are treated, and what the agent should do next. Nothing material is left for the agent to guess.

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, but the description adds real meaning: itemIds and/or skus together capped at 100, one warehouse per call, and coverThrough treated as inclusive on the tenant calendar. It adds useful operational constraints beyond the field descriptions, though it restates the item/warehouse scoping already present in the schema.

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 (size an order) and resource (item stock coverage) with an example framing ('enough to get through Nov 15'), and explicitly distinguishes itself from the sibling that actually places the order (create_purchase_order). An agent can tell exactly what this computes without opening the 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?

Clearly frames this as the read-only sizing step whose result is passed to create_purchase_order, and bounds the batch at 100 items at a single warehouse. It stops short of naming when-not-to-use cases (e.g., sizing across multiple warehouses or for non-stock items), so it is strong but not exhaustive.

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