Skip to main content
Glama

upsert alias

upsert_alias
Idempotent

Create or repoint a model alias to shift production traffic to a new model without redeploying, while optionally adding canary, quality gate, or evidence policy controls.

Instructions

Create or repoint a model alias by name (idempotent upsert) so production traffic moves to a new model without a redeploy; optionally attach a canary split, a quality gate, or an evidence-required policy. PUT /v1/aliases (API-key scope: aliases:write). Returns: 200 with the alias object: { id, name, target_model, canary_model, canary_percent, description, gate_criterion_id, gate_mode, gate_min_samples, gate_rollback_threshold, gate_window_hours, gate_verdict, gate_verdict_at, model_version_id, require_evidence, last_evidence_run_id, created_at, updated_at } Notes: MOVES PRODUCTION TRAFFIC: the gateway resolves aliases within ~10s. Requires the key's minting user to be workspace OWNER/ADMIN (403 otherwise). Same status 200 whether created or updated. 412 Precondition Failed (code precondition_failed) when the evidence policy refuses the repoint; a brand-new alias is never blocked by the policy. 400 for schema failures, canary_percent > 0 without canary_model, canary equal to target, unavailable model, gate criterion never aligned, or auto-mode eligibility refusals (judge not trustworthy, drift-flagged, trace-unit, or judge trained the destination). 404 "Gate criterion not found". Billing always follows the model that actually ran; an alias is routing only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesAlias name, 3..64 chars of letters/digits/dots/dashes/underscores, must start and end alphanumeric, no '/'. Upsert key within the workspace.
gate_modeNo"recommend" (default) only surfaces verdicts; "auto" lets the gate repoint the alias itself and requires a trustworthy, non-drift-flagged, request-unit judge that did not train the destination model.
descriptionNoFree-text note, max 200 chars (nullable).
canary_modelNoModel id for the canary arm (nullable). Must differ from target_model and be an available model. Required (non-null) whenever canary_percent > 0.
target_modelYesModel id that receives the main share of traffic. Must be an available model or the call fails with "Model '<id>' is not available."
canary_percentNoInteger 0..100 share of traffic sent to canary_model. Default 0. Ignored (stored as 0) when canary_model is null.
override_reasonNoAudited escape hatch for the evidence policy: a written justification of at least 10 characters lets the repoint through and records an audit event. Blank/missing is NOT an override. Shorter than 10 chars is a 400.
gate_min_samplesNoScored requests both arms need before a verdict. Integer 10..1000, default 50.
require_evidenceNoEvidence policy. Omitted = leave the existing alias's setting unchanged (false on create). When on, a repoint that sends traffic to a model it is not already reaching is refused unless a finished comparison in the last 30 days proves the destination against the incumbent.
gate_criterion_idNoId of a criterion in this workspace that scores both arms online. Null = no gate. The criterion must have been aligned at least once.
gate_window_hoursNoTrailing window of online scores a verdict is computed over. Integer 1..720, default 168.
gate_rollback_thresholdNoRoll back when the canary's upper CI bound on pass rate is below this. Number 0..1, default 0.7.
Install Server

TDQS

A4.4/5.0
Behavior5/5

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

The description goes far beyond annotations by disclosing that the gateway resolves aliases in ~10s, that a 200 is returned for both create and update, that evidence policy can block repointing with a 412, that a brand-new alias is never blocked, and that billing follows the model that actually ran. This is rich, non-obvious behavioral context.

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?

The description is long due to the tool's complexity, but it is well structured and front-loaded: purpose first, then HTTP/scope, return shape, then behavioral notes and error semantics. Each section earns its place, though the dense list of 400-mode failures makes it slightly heavier than necessary.

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?

Given 12 parameters, meaningful behavioral side effects, and no output schema, the description is remarkably complete: it covers the return object, auth requirements, idempotency, timing, billing, and the main 400/404/412 failure modes. An agent has enough information to invoke this tool correctly and understand consequences.

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

Parameters3/5

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

Schema description coverage is 100%, so the input schema already fully documents all 12 parameters. The description adds high-level context about optional canary/gate/evidence attachments and the returned alias object, but does not meaningfully expand on individual parameter semantics beyond what the schema provides.

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 opens with a specific verb plus resource: 'Create or repoint a model alias by name (idempotent upsert)'. It clearly distinguishes this from the sibling list_alias and delete_alias operations, and states the production purpose of moving traffic without redeployment.

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?

The description gives strong contextual guidance: when to use it ('so production traffic moves to a new model without a redeploy'), optional uses (canary split, quality gate, evidence policy), and the OWNER/ADMIN prerequisite. It does not explicitly name alternative tools or state when not to use it, but the use case is clear enough.

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

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/omnia-v/errorbar-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server