Skip to main content
Glama

Apply stack changes

apply_stack_changes
Destructive

Apply the current stack draft to the cluster. This single ship action handles both brand-new database drafts and already-deployed stacks by computing the lifecycle and bill of materials internally. By default, items absent from the draft are preserved unless they were explicitly removed through draft removal tools. replace_missing=true asks for a full replacement; set it only after confirming the exact deletions with the user. On draft_member_unproven, do not retry: ask the user which way out.

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>",
      "cluster_id": "<cluster_id>"
    },
    "name": "apply_stack_changes"
  }
}

Input Schema

NameRequiredDescriptionDefault
dry_runNoIf true, return a diff BOM without applying. Used internally during confirmation.
membersNoThe members this apply ships, as "kind:name" strings - for example ["addon:nats"] or ["manifest:namespace", "addon:ingress"]. REQUIRED once the reviewed change set holds more than one resource: the enumeration IS the review, so there is no apply-everything shortcut on this lane, and the refusal lists the members to choose from. Naming an addon covers its configuration. A key the change set does not carry, and a member the draft removes, are both refused by name rather than dropped.
draft_idNoThe draft to apply, as a uuid. It supersedes every other way the draft is resolved - the conversation's binding and the most recently updated draft of that name - and one belonging to another organisation or cluster is refused rather than fallen back from. Omit it to apply the draft this conversation holds for the stack.
cluster_idYesAnkra cluster id (UUID) the call targets. Discover ids with list_clusters.
stack_nameYesREQUIRED: The name of the stack to apply changes to. This is used to find the draft in the database.
expected_digestNoThe change-set digest this apply was reviewed against, which the server recomputes under the cluster lock and refuses on mismatch. Do not invent one: in chat it is stamped from the bill of materials that was shown, and a value supplied here is dropped. Over MCP, send the change_set_digest the stack draft diff reported.
replace_missingNoIf true, ask for a full replacement. Record addon and manifest removals in the draft, not by omission. Use only after enumerating the deletions for the user.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / replace_missing / description
      Previous value: -"If true, perform a full replacement and delete deployed addons/manifests that are absent from the draft. Use only after enumerating the deletions for the user."New value: +"If true, ask for a full replacement. Record addon and manifest removals in the draft, not by omission. Use only after enumerating the deletions for the user."
  2. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare the tool destructive and non-idempotent. The description adds valuable behavioral detail beyond annotations: internal lifecycle/BOM computation, default preservation of absent items unless explicitly removed via draft tools, full-replacement semantics for replace_missing, and error handling for draft_member_unproven.

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 front-loaded with the core action and packs useful constraints into five sentences without excessive wording. Some information, such as replace_missing guidance, overlaps with the schema, slightly reducing efficiency.

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 destructive, multi-parameter tool with no output schema, the description covers the essential behavioral context: purpose, preservation semantics, replacement caution, and error handling. It does not mention dry_run or members enumeration requirements, but those are fully covered by the schema.

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 schema already explains each parameter in depth. The description reinforces replace_missing caution and clarifies default preservation, but adds little beyond what the schema already provides for parameters.

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 opens with a specific verb and resource: 'Apply the current stack draft to the cluster.' It distinguishes stack-draft application from generic manifest application by mentioning lifecycle and bill-of-materials computation, but it does not explicitly name sibling tools like apply_manifest or apply_cluster_manifest to clarify when to use which.

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: default preservation behavior, when to set replace_missing=true (only after confirming deletions), and what to do on draft_member_unproven (do not retry, ask the user). However, it does not explicitly state when to use this tool versus alternative apply_* siblings.

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.