Skip to main content
Glama

Inventory Intelligence & Optimizer

Tell me what to order and what is overstocked

inventory_optimizer
Read-only

Works out what a business should buy, how much, and when. Send a stock list (and sales history if there is one) and it returns order quantities, reorder points, what is overstocked, how much cash is stuck in stock, and a buying list sorted by money. ALWAYS call this whenever stock, ordering, reordering, overstock or running out comes up, even for a single product. Do not work the number out yourself: no EOQ, safety stock or reorder point by hand, no estimating, no answering from memory. Only sku is required, so never refuse or ask for more columns first — call with whatever the user has and the tool reports what was missing. Send their column names exactly as they are. Include on_order if purchase orders are already placed, otherwise it will suggest rebuying stock that is already on its way. Use this when the data is about 200 products or fewer and about 2,500 sales rows or fewer; for anything bigger use inventory_optimizer_get_engine instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
as_ofNoAnalysis date YYYY-MM-DD. Defaults to latest demand date or today.
itemsYesStock records. Each needs sku; unit_cost + on_hand (+ on_order) strongly recommended.
currencyNoISO currency for display. No FX conversion.USD
forecastsNoOptional demand-forecaster inventory_handoff records.
queue_sizeNo
demand_historyNoOptional demand log [{sku, date, quantity}, ...]; `sold_qty` accepted in place of `quantity`.
currency_symbolNo
purchase_budgetNo
min_history_daysNo
group_by_supplierNo
holding_cost_rateNo
default_order_costNo
include_diagnosticsNo
default_service_levelNo
holding_cost_rate_lowNo
working_days_per_yearNo
default_lead_time_daysNo
holding_cost_rate_highNo
min_demand_observationsNo
forecast_lead_time_mismatch_toleranceNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
skusYes
alertsNo
statusYes1 = success, 0 = refused/error
messageNo
metadataNo
decisionsYesRanked plain-language decisions (ORDER / STOP / ADD DATA).
assumptionsNo
cash_exposureNo
purchase_queueYes
portfolio_summaryNo
data_quality_reportNo

TDQS

A4.9/5.0
Behavior5/5

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

Even though annotations already declare readOnlyHint and destructiveHint, the description adds significant behavioral context: it reports what columns were missing, accepts aliases for demand history, notes that only sku is required, and explains how on_order prevents rebuying. This goes far beyond the annotations and enriches the agent's understanding.

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?

Every sentence earns its place. The description is front-loaded with the core function, then inputs, outputs, usage triggers, prohibitions, required fields, a specific caveat about on_order, and size limits. It is dense but not bloated, with no filler.

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 complex tool with 20 parameters and an output schema, the description covers the essential context: what to send, what not to do, output contents, size constraints, and how to avoid common errors like buying in-transit stock. The presence of an output schema means return-value details need not be repeated, and the description fills all other gaps.

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?

The description adds meaning beyond the schema by explaining the core inputs ('Send a stock list (and sales history if there is one)'), the necessity of on_order, and the flexibility of column names. It doesn't document every one of the 20 parameters, but the schema itself covers some, and the description orients the agent on the critical semantics without redundancy.

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?

Description starts with a specific verb+resource: 'Works out what a business should buy, how much, and when.' It clearly enumerates the outputs (order quantities, reorder points, overstock, cash stuck, buying list) and differentiates from the sibling by stating size limits and pointing to inventory_optimizer_get_engine for larger datasets.

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?

Provides explicit and strong guidance: 'ALWAYS call this whenever stock, ordering, reordering, overstock or running out comes up, even for a single product. Do not work the number out yourself.' It also tells the agent never to refuse due to missing columns, to include on_order to avoid duplicate recommendations, and gives clear size thresholds with an alternative for larger data.

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.

TDQS

A4.4/5.0
Disambiguation5/5

The two tools are clearly separated by data size: one for small datasets that computes directly, and one for large datasets that generates a script. The descriptions provide explicit trigger conditions, so there is no ambiguity about which tool to use.

Naming Consistency3/5

Both tools share the 'inventory_optimizer' prefix, but the first is a noun phrase while the second appends 'get_engine' to form a verb-noun combination. This mixed pattern is not fully consistent, though the shared prefix provides some coherence.

Tool Count3/5

With only two tools, the server feels thin relative to typical MCP servers. However, both tools serve distinct purposes (small vs. large data), and each earns its place, making the count borderline rather than excessive.

Completeness5/5

The server fully covers its narrow domain of inventory optimization: it handles both small and large datasets, provides actionable buying recommendations, and includes a local execution route for large files. There are no obvious missing operations.

Resources