Skip to main content
Glama

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. Pass client (e.g. 'claude_code', 'cursor', 'github_copilot', 'cline') so the answer is restricted to models that tool can run; omit it and the hosted server tries to infer it from the MCP handshake, otherwise every priceable model is considered. An explicit client always wins. Recognised clients: claude_code, claude_desktop, cursor, github_copilot, windsurf, cline, continue, zed, jetbrains_ai, gemini_cli, codex_cli, aider, amazon_q, chatgpt_desktop.

Input Schema

NameRequiredDescriptionDefault
clientNoYour MCP client / coding tool, so only models it can run are considered. Recognised: claude_code, claude_desktop, cursor, github_copilot, windsurf, cline, continue, zed, jetbrains_ai, gemini_cli, codex_cli, aider, amazon_q, chatgpt_desktop. Case- and separator-insensitive ('Claude Code' = claude_code). Order: explicit client > legacy ide_context > client inferred from the MCP handshake (hosted server, best effort) > none. Unknown names return an unfiltered result plus a note.
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. Changed1 schema field changed
    • addedInput schema / properties / client
      Added value: +{
      +  "description": "Your MCP client / coding tool, so only models it can run are considered. Recognised: claude_code, claude_desktop, cursor, github_copilot, windsurf, cline, continue, zed, jetbrains_ai, gemini_cli, codex_cli, aider, amazon_q, chatgpt_desktop. Case- and separator-insensitive ('Claude Code' = claude_code). Order: explicit client > legacy ide_context > client inferred from the MCP handshake (hosted server, best effort) > none. Unknown names return an unfiltered result plus a note.",
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does well: it discloses the return payload (per-task allocation, total monthly cost, saving versus best single-model deployment), the budget behaviour (leftover headroom spent on cost-efficient quality upgrades), and the client-resolution precedence including fallback to MCP handshake inference and the unfiltered-result fallback for unknown names. Auth, rate limits and caching behaviour are not mentioned, which is the only gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core value and usage trigger are front-loaded, but the description then repeats the entire 15-item client list and the precedence chain that the schema's client parameter already spells out verbatim. That redundancy is roughly a third of the text and does not earn its place.

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?

No output schema exists, so the description must explain returns — and it does, naming all three output components plus the budget-driven upgrade behaviour. For a 4-param analysis tool with no annotations, nothing an agent needs to invoke it correctly is missing.

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 coverage is 100%, so the schema already documents client, workloads, budget and quality floors. The description restates the client precedence and budget-usage semantics rather than adding new syntax or format detail, so it sits at the baseline for a fully documented schema.

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/assign) and resource (multi-task LLM workload) and explicitly contrasts with the alternative of 'running everything through one model', which separates it from siblings like recommend_model, compare_costs and estimate_cost. The first sentence alone tells an agent exactly what the tool produces.

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?

Gives explicit trigger conditions: 'Use when the user asks how to cut LLM spend across several task types, or whether tiered model routing is worth it.' It does not name sibling tools to avoid (e.g. recommend_model for single-task decisions), so routing is clear but not fully bounded.

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.