Skip to main content
Glama

Inventory Intelligence & Optimizer

Get the script for a big stock file

inventory_optimizer_get_engine
Read-only

Use this when the stock file is big — more than about 200 products or 2,500 sales rows. It returns a ready-to-run Python script. Save the script exactly as given, run it in your sandbox against the user's file, and report what it prints. It only needs numpy. It prints the buying decisions and writes the full detail to inventory_optimizer_result.json. The data never leaves the user's machine on this route. Do not shorten, retype, summarise or rewrite the script, do not replace it with code of your own, and do not do the maths yourself. If you cannot run code, say so rather than working the numbers out.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
as_ofNo
currencyNoUSD
items_pathNoPath to items file (CSV/TSV/JSON) inside your sandbox. May be a combined stock+sales file when demand_path is omitted.
demand_pathNoOptional path to demand history (sku, date, quantity).
combined_pathNoOptional single stock+sales file. Loader splits before scoring; when set, overrides separate items/demand paths.
purchase_budgetNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
notesNo
scriptYes
currencyNo
languageNo
requiresNo
writes_fileNo
instructionsYes
code_integrityYes
engine_versionYes
items_path_usedNo
purchase_budgetNo
demand_path_usedNo
data_requirementsNo
combined_path_usedNo
network_access_requiredNo

TDQS

A4.4/5.0
Behavior5/5

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

The description goes well beyond annotations by disclosing the script's only dependency (numpy), its outputs (prints decisions, writes inventory_optimizer_result.json), data locality ('data never leaves the user's machine on this route'), and explicit prohibitions (do not shorten, retype, replace, or do the math manually). It does not contradict the readOnly/openWorld/non-destructive 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 dense but every sentence earns its place: it front-loads the trigger condition, then gives actionable steps, constraints, and failure handling. There is no filler or redundancy.

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 tool returning a script, the description covers the full lifecycle: when to call it, how to execute the result, expected outputs, dependency requirements, data safety, and what to do if code execution is impossible. The presence of an output schema means return-value details are already provided elsewhere.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 50%, with three parameters (items_path, demand_path, combined_path) having descriptions, but as_of, currency, and purchase_budget have none. The description does not mention any parameter or explain how they affect the script, leaving the agent without guidance for filling these inputs.

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 gives a specific verb and resource: 'Use this when the stock file is big' and 'It returns a ready-to-run Python script.' It also provides measurable scope (more than about 200 products or 2,500 sales rows), which clearly distinguishes it from the sibling inventory_optimizer even without naming it.

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 states when to use the tool (big file threshold) and gives detailed post-invocation instructions (save script, run in sandbox, report prints, do not modify). However, it does not name an alternative tool or explicitly state when not to use it, so it only partially meets the 'explicit when/when-not/alternatives' criterion.

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