Skip to main content
Glama

Route Workload

route_workload
Read-only

Route workloads to Claude or Gemini, or split them into ordered sub-tasks; deterministic rules handle clear cases, and an optional LLM router resolves ambiguous requests without running the work.

Instructions

Decide whether a workload goes to Claude (code, tool use, strict JSON) or Gemini (huge payloads, raw logs), or splits into ordered sub-tasks. Deterministic rules first; an LLM router is used for ambiguous work only when useModel is true. Returns a validated routing decision; does not run the workload.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "workload": "<workload>"
    },
    "name": "route_workload"
  }
}

Input Schema

NameRequiredDescriptionDefault
useModelNoAllow an LLM router call for ambiguous workloads. Default: false.
workloadYesThe task text or payload to route.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.40.1

TDQS

A4.2/5.0
Behavior3/5

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

The readOnlyHint is consistent with the description's 'does not run the workload', and the determinism-first note plus the conditional LLM call add genuine behavioral context beyond the annotation. However, it does not describe the shape of the routing decision, whether the split result is always ordered, or any failure modes, so it adds useful but not rich detail on top of annotations that already declare the safety profile.

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?

Three sentences, each doing distinct work: selection criteria, execution policy, and output/scope boundary. The most load-bearing constraint (does not run the workload) is placed at the end after the decision criteria, and nothing is repeated from the schema verbatim without added meaning.

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 two-parameter read-only routing decision with no output schema, the description covers the selection criteria, the LLM fallback policy, and the scope boundary. What is missing is only the shape of the returned decision, which would help an agent consume the result but is not needed to invoke the tool correctly.

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?

Schema coverage is 100%, so baseline is 3, but the description adds meaning the schema lacks: it clarifies what content belongs in 'workload' (code, tool use, strict JSON vs. huge payloads, raw logs) and reinforces that useModel only matters for ambiguous cases. That helps an agent phrase the workload string correctly rather than just passing raw text.

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 ('Decide whether a workload goes to...') plus the resource (workload), the two possible targets, the split behavior, and the output ('a validated routing decision'). It also explicitly bounds the scope with 'does not run the workload', so an agent can tell this apart from tools that execute or plan work.

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 clear operating context: deterministic rules run first, and the LLM router is only consulted for ambiguous work when useModel is true. That is real when-to-use guidance plus a cost/latency trade-off cue. It stops short of naming a sibling alternative or an explicit 'do not use this when' case, which keeps it from a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.