Skip to main content
Glama

Clone stack

clone_stack
Destructive

Clone a stack from the current cluster to another cluster in the organisation as a stack DRAFT. Nothing is deployed on the target unless deploy_after_clone is set: the result is a saved draft visible on the target cluster's Stacks page. The user must hold ai.execute and stacks.write on the target cluster. Addon configurations are included; encrypted values that cannot be transferred are stripped with warnings, and name conflicts on the target are auto-resolved with suffixes. By default the clone carries CONFIGURATION ONLY and none of the stack's volumes or databases. Set include_data to true to carry the data too: Ankra takes a restore point of the source stack and restores it onto the clone, which additionally needs backups.operate and is refused when the target cluster already has a stack of this name. Review and apply the draft on the target cluster to deploy it.

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": {
      "stack_name": "<stack_name>",
      "target_cluster_id": "<target_cluster_id>",
      "cluster_id": "<cluster_id>"
    },
    "name": "clone_stack"
  }
}

Input Schema

NameRequiredDescriptionDefault
cluster_idYesAnkra cluster id (UUID) the call targets. Discover ids with list_clusters.
stack_nameYesName of the stack on the current cluster to clone.
include_dataNoCarry the stack's DATA as well as its configuration. Ankra takes a fresh restore point of the source stack and restores it onto the clone, and the result carries the run that does it. Default false, which copies configuration only. Needs the backups.operate permission and a ready backup vault, and is refused when the target cluster already has a stack of this name.
data_selectionNoWhich data the clone carries. Omitting this key is NOT the same as sending an empty object: omit it to take the stack's own backup policy, and send one only to override that policy. A selection is applied WHOLE and never merged, so one that names no persistent_volume_claims carries no volumes.
new_stack_nameNoOptional name for the cloned stack on the target cluster. Defaults to the source name; auto-renamed on conflict.
protect_sourceNoTurn backup protection on for the SOURCE stack when it has none, so the restore point this clone takes is the first of a series rather than a one-off. Default false.
backup_vault_idNoUUID of the backup vault the clone's restore point lives in. Omit to use the stack's own backup policy vault, and then the organisation's only ready vault.
data_clone_modeNoWhere the data comes from when include_data is true. 'fresh' (the default) takes a new restore point of the source stack now. 'latest' restores the newest complete restore point the source already has, reading nothing from the source cluster; anything written since is not in it.
target_cluster_idYesUUID of the cluster to clone the stack to (must differ from the current cluster).
deploy_after_cloneNoDeploy the cloned stack on the target once the clone lands - after the restore when include_data is true. Default false, which leaves a draft to review and apply.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Beyond the annotations (destructive=true, not idempotent, not read-only) it discloses concrete consequences: a draft is created but nothing deployed, required permissions ai.execute and stacks.write (plus backups.operate for data), encrypted values stripped with warnings, and name conflicts auto-resolved with suffixes. It also explains the restore-point mechanism and the refusal condition, which is exactly the kind of detail annotations cannot carry.

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 critical fact (a draft, nothing deployed) is front-loaded in sentence one, and the rest proceeds logically: permissions, data handling, then data mode, then next steps. It runs long and repeats some schema content about include_data, but nearly every sentence carries actionable information.

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 10-parameter destructive tool with a nested data_selection object and no output schema, the description covers side effects, permissions, refusal conditions, and the draft/apply workflow well. The remaining gap is return information: it says the result is a draft on the target's Stacks page but never states what identifier or object comes back, which matters since no output schema exists.

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% and each parameter already documents its own defaults, permissions, and edge cases, so the description's parameter discussion (include_data default, deploy_after_clone leaving a draft) largely restates structured data. It adds a little by linking include_data to the restore-point workflow and to deploy ordering, but not enough to exceed the high-coverage baseline.

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 and resource plus the direction of the operation: 'Clone a stack from the current cluster to another cluster in the organisation as a stack DRAFT.' That framing (existing source stack -> other cluster -> draft) separates it in an agent's mind from create_stack, install_stack, and adopt_stack_profile without needing to name them.

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 strong when/when-not context: nothing is deployed unless deploy_after_clone is set, data is carried only with include_data, and the call is refused when the target already has a stack of that name with data cloning. What is missing is any explicit routing to alternatives (e.g., create_stack or export_stack_profile_iac) when cloning is the wrong choice.

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.