Skip to main content
Glama

model_route_write

Idempotent

Records the router's per-role model, CLI, and effort decisions for a pass, validating every entry against the local catalog and rejecting the batch with all errors so the router can fix and retry.

Instructions

Record the model router's decision for every role in this pass.

Only the spawned router child carrying the parent-issued pass id may call this. decisions is a list (or a JSON-encoded list) with one object per role: {"role", "cli", "model", "effort", "reason"}. Every decision is checked against the local model catalog; any problem rejects the whole call and lists every error so the router can fix them and call again.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pass_idYes
decisionsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.21.0

TDQS

A3.8/5.0
Behavior4/5

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

Goes well beyond the annotations by disclosing an authorization constraint (spawned child + parent-issued pass id) and a validation contract: every decision is checked against the local model catalog, and any problem rejects the entire call while returning all errors. That all-or-nothing failure semantics is exactly the behavior an agent needs and is not derivable from readOnlyHint/idempotentHint alone.

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

Conciseness4/5

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

Three short sentences, front-loaded with the action, then the authorization gate, then the validation/failure behavior. The trailing clause 'so the router can fix them and call again' is justified because it explains the reject-all design rather than padding.

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?

With an output schema present, return values need not be described, and the description covers caller identity, payload shape, and failure mode. The remaining gap is the relationship to model_router_run/model_router_status in the broader router workflow, which a caller must infer.

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 0%, so the description must carry the load, and it does: pass_id is defined as the parent-issued pass id gating the call, and decisions is defined as a list or JSON-encoded list of per-role objects with the exact keys {role, cli, model, effort, reason}. It does not clarify whether re-calling replaces prior decisions (relevant given idempotentHint=true), which keeps it below a 5.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: recording the router's per-role decisions for a pass. This is clearly distinct from siblings like model_router_run or model_router_status, though the description never names a sibling to route the agent away from one of them.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives a hard caller precondition ('only the spawned router child carrying the parent-issued pass id may call this'), which implies where in the flow it belongs. But it never says when to use this versus model_router_run, model_router_status, or what to do if no pass id exists, so the when-to-use guidance is implied rather than explicit.

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

Deploy Server

Other Tools