Skip to main content
Glama

WritersLogic business agents

lot-pick

Choose which inventory lots to pick (FIFO, FEFO, LIFO, fewest lots) — Allocates a demand quantity across up to 200 inventory lots under a stated policy (FIFO by received date, FEFO by expiry, LIFO, or fewest lots), excluding held, expired, short-shelf-life and wrong-location lots, in whole case multiples if asked. For warehouse and order agents. Returns the pick plan, the shortfall and a reason for every excluded lot. A caller asOf date is required (the check never

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": {
      "asOf": "<asOf>",
      "demand": "<demand>",
      "policy": "<policy>",
      "lots": "<lots>"
    },
    "name": "lot-pick"
  }
}

Input Schema

NameRequiredDescriptionDefault
asOfYesReference date, YYYY-MM-DD. An expiry date is the last usable day: a lot expiring on asOf has 0 days left.
lotsYesAt most 200.
demandYesUnits wanted (whole units).
policyYesFIFO: oldest received first. FEFO: earliest expiry first. LIFO: newest received first. MIN_LOTS: fewest lots (largest usable first; ties by earlier expiry, then id).
pickMultipleNoEach lot contributes whole multiples of this case size (default 1).
allowOverpickNoWith pickMultiple, allow the last pick to round the total up to a whole case (default false: leave the remainder as shortfall).
allowedLocationsNoIf set, lots elsewhere (or without a location) are excluded.
minShelfLifeDaysNoExclude lots with fewer than this many days left at asOf (needs expiry on every non-held lot).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.3/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does substantial work: it discloses the exclusion rules (held, expired, short-shelf-life, wrong-location lots), the whole-case-multiple rounding behavior, the required asOf reference date, and what the response contains (pick plan, shortfall, reason per excluded lot). It never explicitly states that the operation is a pure computation with no side effects on inventory, which is the main remaining gap.

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

Conciseness3/5

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

The parenthetical policy summary up front is well front-loaded and the middle is dense but efficient. However, the final sentence is truncated mid-clause ('A caller asOf date is required (the check never '), leaving a broken fragment that wastes space and signals an incomplete definition.

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

Completeness3/5

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

For an 8-parameter computational tool with no output schema, the description usefully names the return payload and the exclusion rationale, which is most of what an agent needs. But the cut-off final sentence removes the explanation of the asOf requirement, and with zero annotations there is no explicit statement of side effects or idempotency.

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 each of the 8 parameters is already documented, including the policy enum semantics and the pickMultiple/allowOverpick interaction. The description restates the policy meanings and 'whole case multiples if asked' at a summary level but adds no format or edge-case detail beyond the schema, 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 names a specific verb and resource — allocating a demand quantity across up to 200 inventory lots — and enumerates the four selectable policies (FIFO/FEFO/LIFO/MIN_LOTS), so an agent knows exactly what the tool computes. It stops short of naming a sibling it is not (e.g. a generic allocate tool), so differentiation from alternatives is left implicit.

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

Usage Guidelines2/5

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

The only usage framing is 'For warehouse and order agents', which describes an audience rather than a condition for use. There is no statement of when to prefer this over an alternative allocation tool, and no explicit when-not-to-use case.

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