Skip to main content
Glama

remove_ai_route

Remove an AI gateway alias; use force to delete it even when running apps still reference it as a gateway model.

Instructions

Remove a machine AI gateway alias (submitter or admin).

    Refused with 409 ``ai_gateway.alias_in_use`` (naming the apps) while a
    running app's ``[ai.*]`` uses it, unless ``force``.
    

Input Schema

NameRequiredDescriptionDefault
aliasYesMachine alias an app names in ``[ai.<name>] model`` with ``provider = "gateway"``: a lowercase letter, then up to 31 of a-z, 0-9, '_' or '-'.
forceNotrue = remove even while a running app uses the alias (its AI calls then fail with 404 ``alias_not_found``).
idempotency_keyNoCaller-chosen key: a retry with the same key replays the first result instead of acting twice. Omit and a fresh key is minted per call, so each call acts.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses the permission requirement, the specific 409 error code (`ai_gateway.alias_in_use`), that dependent apps are named, and the force escape hatch. It stops short of stating irreversibility or the success-side effect, but the conflict behavior is unusually well documented.

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?

It is short and front-loads the verb and resource, then layers the conflict/force behavior. The line-broken 409 clause is slightly awkward to parse but nothing is wasted.

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 mutation tool with no annotations and no output schema, the description covers permissions, failure conditions, and the force override adequately. It omits what a successful removal does to existing configuration or whether it is reversible, which would complete the picture, but the essentials are present.

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 adds value by explaining the 409 behavior tied to the force parameter, giving semantic context beyond the schema's field-level text. The alias and idempotency parameters are already fully documented in the 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?

The description states a specific verb (Remove) and resource (machine AI gateway alias), and the 'remove' prefix clearly distinguishes it from the sibling set_ai_route. The permission qualifier 'submitter or admin' adds useful scope that an agent could not infer from the name alone.

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 clear operational context by explaining the 409 conflict condition and the force override, which tells the agent when removal will be refused and how to proceed. It does not explicitly contrast with alternatives like set_ai_route, keeping it shy of a 5.

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