Skip to main content
Glama

LLM Pricing

optimize_workload

Optimise a multi-task LLM workload by assigning the cheapest qualifying model to each task instead of running everything through one model. Takes a list of workloads (task type + monthly volume + optional quality floor and capability requirements) and returns a per-task model allocation, the total monthly cost, and the saving versus the best single-model deployment. If a monthly budget is given, leftover headroom is spent on the most cost-efficient quality upgrades. Use when the user asks how to cut LLM spend across several task types, or whether tiered model routing is worth it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workloadsYesOne entry per task type in the workload mix
min_quality_scoreNoGlobal quality floor (0-100) applied to every workload
monthly_budget_usdNoTotal monthly budget in USD. Leftover headroom is spent on the most cost-efficient quality upgrades.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden, and it does substantial work: it discloses the optimiser's strategy (cheapest qualifying model per task), the budget heuristic (leftover headroom spent on cost-efficient quality upgrades), and that vision/function-calling requirements gate model selection. It does not state whether the result is deterministic or how ties/constraints are handled, but for a read-only computation tool this is solid coverage.

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?

Front-loaded with the core purpose, then inputs, then return values, then usage. Four sentences with no filler, and each one adds a distinct piece of information rather than padding.

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?

There is no output schema, so the description must explain what comes back, and it does: per-task model allocation, total monthly cost, and savings versus the best single-model deployment. Combined with the input description and budget behaviour, an agent has everything needed to call it and interpret the result.

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 the schema already documents every parameter, and the description's summary of inputs ('task type + monthly volume + optional quality floor and capability requirements') mostly restates it. The budget-headroom behaviour it mentions is also already written into the monthly_budget_usd schema description, so the value added beyond structured fields is limited; baseline 3.

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?

States a specific verb (optimise) and resource (multi-task LLM workload) plus the actual mechanism: assigning the cheapest qualifying model per task rather than one model for everything. This distinguishes it from siblings like recommend_model (single model) and estimate_cost/predict_cost (cost estimation), so an agent can route correctly without opening the schema.

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?

Explicitly names the trigger conditions: cutting LLM spend across several task types, or evaluating whether tiered routing is worth it. The 'several task types' framing implicitly excludes single-task cases, but it never names an alternative tool (e.g. recommend_model) for those cases, so the exclusion is left to inference.

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.