Skip to main content
Glama

Last Price

get_learned_routing

Read-onlyIdempotent

Read what learned routing has learned for one of your routing policies: for each function the policy can choose, the calls seen, the success rate, the latency and rate the reward used, the expected reward with an interval, and the share of calls it would route there now. learning says whether it decides the policy's traffic; reason says why not: it is not released for your workspace, the policy has not turned it on, the policy's strategy is not one it can stand in for, or it is still collecting data, and meanwhile the policy's own strategy decides. Read only. Leave policy_id out for your default policy. Pass strategy instead to read what it learned for compute_price calls that name that strategy and turn learned routing on (no policy). Needs a Last Price credential with routing read scope.

Input Schema

NameRequiredDescriptionDefault
strategyNoInstead of a policy: the strategy that compute_price calls named while turning learned routing on.
policy_idNoThe routing policy UUID. Leave it out to read your workspace's default policy.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior4/5

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

Beyond the readOnlyHint/idempotent/destructive annotations it adds real operational context: the required Last Price credential with routing read scope, the fallback semantics when learning is not active, and the meaning of the 'learning' and 'reason' fields (not released, not turned on, strategy unsupported, still collecting data). It does not mention failure modes or timing of data refresh, which keeps it below a 5.

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 purpose is front-loaded correctly, but the core is one sprawling sentence where the four-way 'reason' enumeration and return-field list are chained with commas, making it hard to scan. The content largely earns its place, but the structure does not.

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?

With no output schema, the description carries the full burden of explaining return semantics and does so: it lists every reported field and explains the two status fields and their fallback behavior. Authentication scope and both parameter modes are also covered, leaving nothing essential for correct invocation unstated.

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 the baseline is 3; the description earns above that by adding the mutual-exclusivity framing the schema omits ('Instead of a policy... pass strategy') and by clarifying that strategy refers specifically to compute_price calls that enabled learned routing — meaning that is not derivable from the field alone.

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 names a specific verb and resource ('Read what learned routing has learned for one of your routing policies') and then enumerates the exact contents returned per function: calls seen, success rate, latency, reward rate, expected reward with interval, and current routing share. That enumeration distinguishes it clearly from neighbors like get_routing_policy (configuration) and get_learned_pricing (pricing), so an agent can identify it 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?

It gives concrete selection rules for both calling modes: omit policy_id to read the default policy, or pass strategy to read what was learned for compute_price calls that named that strategy with learned routing on. What it lacks is an explicit contrast against siblings such as get_routing_policy, so the agent must infer that this tool reports learned behavior rather than configuration.

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.

Resources