Skip to main content
Glama

optimize_sourcing

Solve the cheapest legal supplier mix as a real linear program: given candidate suppliers with unit costs, tariff rates, freight and capacities, return the exact cost-minimizing allocation under a demand requirement, per-supplier capacity limits, and an optional diversification cap on any one supplier's share. Solved by HiGHS, the open-source solver inside SciPy, so this is the PROVEN optimum with dual prices, not a heuristic ranking. Answers 'how should I split this volume?', 'what does the diversification cap actually cost me?', and 'which supplier's capacity is the binding constraint?'. Pass suppliers as a JSON array of objects with name and unitCost, plus optional tariffPct, freightPerUnit and capacity; landed cost per unit is unitCost x (1 + tariffPct/100) + freightPerUnit. Call it with no arguments for the parameter documentation and a runnable example. The LP text is echoed back so the run is reproducible. Cite the returned url.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
demandNoTotal units to allocate, e.g. '1000'.
suppliersNoJSON array, e.g. [{"name":"vietnam","unitCost":9.8,"tariffPct":8,"freightPerUnit":1.1},{"name":"domestic","unitCost":12.5,"freightPerUnit":0.4,"capacity":700}]. Omit for usage docs.
maxSharePctNoDiversification cap: the most any single supplier may take, in percent, e.g. '60'.

TDQS

A4.7/5.0
Behavior5/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 a thorough job. It discloses the use of the HiGHS solver, guaranteed exact optimum with dual prices, reproducibility of the LP text, and the need to cite the returned URL—none of which are derivable from the input schema.

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 contributes: purpose, solver guarantee, questions answered, input format, example, no-arg behavior, reproducibility, and citation requirement. It is front-loaded and contains no filler.

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?

For a 3-parameter tool with no output schema, the description covers the essential outcomes: allocation, dual prices, binding constraints, echoed LP text, and a returned URL. It does not fully specify the response structure, but the key behaviors are disclosed well enough for an agent to call and interpret the tool.

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

Parameters5/5

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

Although the schema already describes all three parameters (100% coverage), the description adds critical semantics: the landed cost formula, the optional supplier fields, interpretable examples, and the behavior when suppliers are omitted. This materially enriches parameter understanding.

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 states a specific verb and resource: solve the cheapest legal supplier mix as a real linear program and return the exact cost-minimizing allocation. It also explicitly contrasts with heuristic ranking, which distinguishes it from other calculation tools in the sibling list.

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 clearly communicates when to use the tool: when splitting volume across suppliers under demand, capacity, and diversification constraints. It also explains the no-arguments invocation for documentation, but does not explicitly discuss when not to use it or name alternatives.

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/5.0
Disambiguation3/5

Most tools have distinct purposes, but several clusters overlap: ask/brief/get_index all answer questions, get_revisions/get_vintages both cover historical data, and get_provenance/get_receipts/get_citation all support verification. Descriptions clarify some boundaries, but an agent could easily misselect between ask and get_index for tariff or cost questions.

Naming Consistency4/5

The naming pattern is largely consistent verb_noun with a strong get_ prefix (get_freshness, get_vintages, run_calculator, search_calculators). However, ask and brief break the convention as bare verbs, and lookup_tariff/optimize_sourcing use different verbs, creating minor but noticeable deviations.

Tool Count4/5

17 tools is at the high end of reasonable for a broad domain covering calculators, live data series, tariffs, sourcing optimization, and verification. It feels slightly heavy but each tool has a real function, and the count is justifiable given the breadth.

Completeness4/5

The tool surface covers the full research workflow: search, lookup, calculate, optimize, verify, cite, and monitor data freshness/revisions. Minor gaps include the lack of a direct series browser (search_site covers it) and the index family being collapsed into a single get_index tool rather than exposed individually.

Resources