Skip to main content
Glama

Rollback Deployment

lexq_deploy_rollback
Destructive

Roll the group back to the version that was live before the current one. Call lexq_groups_get first: currentVersionName is live now, previousVersionName is what a rollback restores, and a rollback is rejected while canRollback is false. A rollback needs a previous version that is still ACTIVE and whose effective end has not passed (P-058).

Pass the currentVersionId and currentDeploymentId from that call as expectedCurrentVersionId and expectedCurrentDeploymentId. If anyone deployed, rolled back or undeployed in between, the rollback is rejected with 409 and nothing changes: P-062 if another version or no version is live, P-063 if the same version is live but from a newer deployment. Read the group again and check with the user before retrying.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "groupId": "<groupId>",
      "expectedCurrentVersionId": "<expectedCurrentVersionId>",
      "expectedCurrentDeploymentId": "<expectedCurrentDeploymentId>",
      "memo": "<memo>"
    },
    "name": "lexq_deploy_rollback"
  }
}

Input Schema

NameRequiredDescriptionDefault
memoYesRollback reason (required)
groupIdYesPolicy group ID
expectedCurrentVersionIdYescurrentVersionId from your last read of the group
expectedCurrentDeploymentIdYescurrentDeploymentId from your last read of the group

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / expectedCurrentDeploymentId
      Added value: +{
      +  "description": "currentDeploymentId from your last read of the group",
      +  "format": "uuid",
      +  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      +  "type": "string"
      +}
    • addedInput schema / properties / expectedCurrentVersionId
      Added value: +{
      +  "description": "currentVersionId from your last read of the group",
      +  "format": "uuid",
      +  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "groupId",
      -  "memo"
      -]New value: +[
      +  "groupId",
      +  "expectedCurrentVersionId",
      +  "expectedCurrentDeploymentId",
      +  "memo"
      +]
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

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

The annotations only say destructiveHint=true; the description adds substantial context beyond that: the optimistic-concurrency contract via expected ids, the 409 rejection semantics with 'nothing changes', and the distinct P-058/P-062/P-063 failure conditions. It also tells the agent to re-read state and confirm with the user before retrying, which is exactly the behavioral guidance a destructive tool needs.

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?

Purpose and precondition are front-loaded, then error handling, then retry advice — a logical order. It is dense with error codes and policy references (P-058, P-062, P-063), which is justified for a destructive operation but makes it heavier than strictly necessary for a four-parameter tool.

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 destructive, non-read-only mutation with no output schema, the description covers what is required: preconditions to verify, ids to supply, failure modes, and post-failure protocol. Nothing an agent needs in order to call this safely is missing.

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, but the description adds real meaning by explaining where expectedCurrentVersionId and expectedCurrentDeploymentId come from (the currentVersionId/currentDeploymentId of a prior group read) and what happens when they no longer match. The memo parameter's purpose is left entirely to 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 first sentence names a specific verb (roll back) and a specific target state (the version live before the current one), which separates it from siblings like lexq_deploy_publish and lexq_deploy_undeploy. An agent knows exactly what state the group ends in after a successful call.

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 an explicit prerequisite sequence ('Call lexq_groups_get first') and names the blocking condition (canRollback false, previous version must be ACTIVE with unexpired effective end). It stops short of contrasting directly with lexq_deploy_undeploy or lexq_deploy_publish, so the agent must infer when to prefer rollback over those alternatives.

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.