Skip to main content
Glama

routing_policy_update

Destructive

Attempt to switch a Ray Serve deployment's request-routing policy; when REST cannot set it, returns guidance to edit the source and redeploy.

Instructions

[WRITE][risk=medium] Switch a deployment's request-routing policy.

NOTE: Ray Serve's request-routing policy is a code-level option on the @serve.deployment decorator, NOT a field settable over the Dashboard REST API — there is no REST endpoint for it. This tool therefore refuses with a teaching error rather than pretend; change the policy in the deployment's source and redeploy.

Args: application: Serve application name. deployment: Deployment name. policy: Desired routing policy (prefix_aware / round_robin / session_affinity). target: Inference target name from config; omit for the default.

Input Schema

NameRequiredDescriptionDefault
policyYes
targetNo
deploymentYes
applicationYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

A3.7/5.0
Behavior1/5

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

Annotations declare readOnlyHint=false and destructiveHint=true, but the description states the tool performs no operation at all and only returns a teaching error. The described behavior is effectively a read-only no-op, which directly conflicts with the destructive write profile the annotations advertise.

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?

Front-loaded with [WRITE][risk=medium], then the critical caveat, then a structured Args block. The NOTE is somewhat long but every clause (no REST endpoint, refuses, redeploy in source) earns 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?

For a tool whose contract is to refuse, the description is complete: it explains why no endpoint exists, what the tool will do instead, the remediation path, and every parameter. With no output schema needed, nothing an agent requires is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description carries the full burden — and it does: the Args block documents all four parameters (application, deployment, policy, target) and even supplies the allowed policy values (prefix_aware / round_robin / session_affinity) that the schema lacks as an enum.

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?

The description names a specific verb+resource (switch a deployment's request-routing policy) and then immediately discloses that the tool actually refuses with a teaching error, which distinguishes it from real mutators like deployment_redeploy or autoscale_config_update. The opening line is slightly misleading before the NOTE corrects it, so it falls short of a clean 5.

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 explicitly tells the agent when NOT to use the tool (there is no REST endpoint) and what to do instead (change the policy in the deployment's source and redeploy). That is actionable routing guidance, though it does not compare against specific sibling tools by name.

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