Skip to main content
Glama

inventory_optimization

Calculate safety stock and inventory costs for freight decisions, comparing ocean and air modes to reveal how faster transit frees working capital.

Instructions

Size the INVENTORY a freight decision forces you to hold. The freight choice (mode, reliability, transit time) DETERMINES your safety stock — this computes it. Give the lane + your annual demand (units) + unit value, and it returns, per mode (ocean baseline vs a faster/more-reliable air option): the SAFETY STOCK = z(service level) × σ of lead-time-demand (σ_LTD = sqrt(L·σ_demand² + demand²·σ_lead²), reusing the lane's modeled transit time AND its variability from the transit engine), the REORDER POINT, the Wilson EOQ, and the TOTAL inventory cost (ordering + cycle holding + safety-stock holding). It proves THE trade-off: a faster, more reliable mode shrinks the lead time and its variability → a SMALLER safety stock → released working capital + lower holding — so the 'expensive' freight can pay for itself in less immobilised inventory. Honest (regla 7): textbook OR (normal-approx safety stock, Wilson EOQ) with indicative default cost parameters you should override. PREMIUM: pay per call with x402 (USDC on Base) or a prepaid key.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
origin_portYesOrigin port (city name, UN/LOCODE, or 'City, Country').
dest_portYesDestination port.
container_typeNoContainer '20ft'/'40ft'/'40HC'. Optional; default '40ft'.
annual_demand_unitsYesAnnual demand in UNITS. REQUIRED — inventory policy is sized off it.
unit_value_usdYesPer-unit value (USD). REQUIRED — drives holding cost and immobilised capital.
demand_cvNoDemand coefficient of variation (σ_demand/mean). Optional; default 0.30.
service_levelNoTarget cycle service level (in-stock probability, e.g. 0.95). Optional; default 0.95.
annual_holding_rate_pctNoAnnual holding cost as a fraction of unit value (e.g. 0.25). Optional; default 0.25.
ordering_cost_usdNoFixed cost per purchase order (USD). Optional; default 250.
units_per_containerNoUnits per ocean container (for the annual freight trade-off). Optional.
air_weight_kgNoAir shipment weight per consignment (kg) to price the air freight side of the trade-off. Optional.
air_volume_m3NoAir shipment volume per consignment (m³). Optional.
ship_dateNoShip date (YYYY-MM-DD). Optional; default today.
Behavior5/5

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

With no annotations provided, the description fully bears the burden. It discloses the core formula (safety stock = z·σ_LTD, reorder point, Wilson EOQ), indicates it uses textbook OR models, and mentions 'premium pay per call.' It is transparent about the computational behavior and cost model.

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?

The description is a single coherent paragraph that front-loads the primary purpose. At roughly 10 sentences, it is fairly concise for the complexity of the tool, though it could be slightly restructured for easier scanning.

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 tool's complexity and lack of output schema, the description adequately explains the return values (safety stock, reorder point, EOQ, total cost per mode) and the underlying trade-off logic. It covers the key parameters and behavior, though it omits potential error conditions or edge cases.

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 baseline is 3. The description adds meaning by explaining how parameters like annual_demand_units and unit_value_usd drive the inventory policy and trade-off, and it contextualizes optional params like service level and holding rate within the formula. This exceeds mere repetition.

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's purpose: 'Size the INVENTORY a freight decision forces you to hold.' It specifies the resource (inventory) and action (size) and distinguishes from siblings like total_cost_ownership by focusing on safety stock and reorder point calculations driven by freight mode choices.

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?

The description explicitly tells the user to 'Give the lane + your annual demand (units) + unit value' and explains the trade-off between ocean baseline and air option. While it provides clear context for use, it does not explicitly exclude alternatives or mention when not to use this tool relative to siblings like compare_modes.

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/Baneado98/freight-pulse'

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