Skip to main content
Glama

Reconfigure a Container

reconfigure_container
DestructiveIdempotent

Change an existing Cycle container: its runtime config (start command/args, environment variables, ports, hostname, public network mode, CPU/RAM resources, deploy policy (strategy, restart, health check), automated backups, shared file systems), its instance count, its image, its volumes (extend, read-only), or its metadata (name, identifier, annotations, lock, deprecate). Adding or removing volumes is a redeploy, not a reconfigure. The virtual-machine equivalent is reconfigure_virtual_machine.

Each group reaches Cycle through a different mechanism and differs in disruption; every change in the preview diff is tagged with an 'impact':

  • 'restart' — runtime config. Cycle's reconfigure REPLACES the container's entire config, so this tool fetches the current config, applies only the fields you pass, and submits the whole result; everything you don't pass keeps its value (including deployment constraints, integrations, and devices). Applying RESTARTS every instance; there is no way to change runtime config without a restart. volumes.max_size and volumes.read_only rewrite the volume set through Cycle's volumes.reconfigure task, which also restarts every instance. 'backups' (stateful containers only) merges the passed fields over the current backups integration — destination, command, schedule and restore_command must all be present once merged; backups:{disable:true} removes it. 'shared_file_systems' is the complete replacement set of mounts (keyed by the identifier a server exposes, see list_servers); preview checks that the servers the instances run on expose each identifier and says when to offer configure_server instead.

  • 'scale' — instance count. Instances cannot be changed by reconfiguring; the tool submits Cycle's scale task, which does not rewrite the config. More than 1 instance on a stateful container is allowed but NOT recommended (the tool applies it with a warning note) — prefer separate single-instance containers.

  • 'reimage' — moves the container onto a different image built from the image source it ALREADY uses, keeping its runtime config; instances restart on it. reimage:true imports a fresh image to pick up the latest. image_id reimages onto any live image from that same source, including an older one — that is how you ROLL BACK a bad image: preview with reimage:true, and the response's 'image_options' lists the source's live images newest first with build times and marks the running one; pass the chosen id as image_id (it takes precedence over reimage:true, so nothing is imported). A rollback keeps the CURRENT runtime config, so check the args, env and volume paths still suit the older image and reconfigure them in the same call if not. Switching image sources is a redeploy, not a reimage, and is refused. Stack-deployed containers are refused too — reimage them by building and redeploying the stack. If an import outlives the wait, the response carries the new image_id; call again with it to finish without importing a second copy.

  • 'volume' — volumes.extend grows a local volume's allocation in place with an instance task, no restart; sizes only increase and are capped by the volume's max_size. Passing volumes at all returns the current volumes, each with its max_size and per-instance used/allocated, so a preview with an empty volumes object is a read.

  • 'none' — metadata. Applies immediately: no job, no restart, instances untouched.

Always call with preview:true first — it fetches the current state and returns a field-by-field from/to diff with each change's impact, making NO changes. The diff is computed by this tool, not validated by Cycle; use it to confirm the change matches the user's intent. Get explicit confirmation, then call again without preview.

Changes from several groups are applied in order — metadata, runtime config, volumes, image, instances — and each step is reported in 'steps'. The run stops at the first failed step, so a partial result is possible; read 'steps' rather than assuming all-or-nothing.

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": {
      "environment": "<environment>",
      "container": "<container>"
    },
    "name": "reconfigure_container"
  }
}

Input Schema

NameRequiredDescriptionDefault
envNoEnvironment variables to set, merged into the existing ones (a tool convenience, not a Cycle feature).
argsNoReplacement arguments for the start command, e.g. '--replSet rs0 --bind_ip_all --ipv6'.
lockNotrue blocks delete_container until unlocked; false lifts the lock.
nameNoNew display name.
portsNoComplete replacement port list, e.g. ['27017:27017'] — pass every port wanted.
deployNoPlacement and lifecycle policy. Durations are strings like '30s' or '5m'. Omit unless the user asks.
publicNoNew public network access mode.
sysctlNoKernel sysctls applied inside the container, e.g. {"net.core.somaxconn": "4096"}. Only namespaced keys work (net.*, fs.mqueue.*, kernel IPC shm/msg/sem); vm.* keys such as vm.max_map_count are host-level and are rejected.
backupsNoAutomated backups: Cycle runs 'command' on 'schedule' and ships its STDOUT to 'destination'; 'restore_command' reads a backup from STDIN.
commandNoNew start command path, e.g. 'mongod'.
contextNoWhy are you calling this tool? Briefly describe the user's goal.
previewNoReturn the from/to diff with each change's impact and make NO changes. Always run this first.
reimageNoImport a fresh image from the container's current image source and move onto it. With preview:true, also returns 'image_options' without importing.
rlimitsNoProcess rlimits keyed by setrlimit(2) name, e.g. {"RLIMIT_NOFILE": {"soft": 65535, "hard": 65535}}. Cannot be raised from inside the container. Elasticsearch/OpenSearch bootstrap checks need RLIMIT_NOFILE >= 65535.
volumesNoVolume changes keyed by mount path. An empty object just reports the current volumes and usage.
hostnameNoNew private-network hostname.
image_idNoExisting live image from the same source to reimage onto — a rollback target from 'image_options', or the image_id of an import that outlived the wait. Takes precedence over reimage.
containerYesContainer to reconfigure.
deprecateNoMark the container deprecated (true) or undo it (false).
instancesNoDesired instance count.
resourcesNoPer-instance CPU and RAM. reserve is set aside on the server at placement; limit is the hard cap. Omit unless the user asks.
unset_envNoEnvironment variable names to remove.
identifierNoNew identifier slug. On a stack-deployed container this desynchronizes it from the stack file, which keys containers by identifier.
annotationsNoReplacement annotation map (user metadata); replaces every existing annotation.
environmentYesEnvironment the container lives in.
wait_secondsNoMax seconds to wait, across every step this call performs. 0 returns as soon as the jobs are accepted.
conversation_idNoConversation tracking id. Omit on your first tool call; every result then includes a conversation_id line — pass that exact value on all later calls in this conversation.
shared_file_systemsNoComplete replacement set of shared file systems, keyed by the identifier a server exposes — pass every mount wanted; {} removes them all.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • removedInput schema / properties / cpu_shares
      Removed value: -{
      -  "description": "New CPU limit in shares: 10 = one logical CPU (thread); Cycle's default is 2. Only when the user asks for a CPU limit.",
      -  "minimum": 1,
      -  "type": "integer"
      -}
    • addedInput schema / properties / deploy
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Placement and lifecycle policy. Durations are strings like '30s' or '5m'. Omit unless the user asks.",
      +  "properties": {
      +    "health_check": {
      +      "additionalProperties": false,
      +      "description": "Command Cycle runs in each instance to judge its health. disable:true removes it.",
      +      "properties": {
      +        "command": {
      +          "description": "Exit 0 means healthy. Pass the command itself; wrapping it in sh -c does not work. Required when adding a health check.",
      +          "type": "string"
      +        },
      +        "delay": {
      +          "description": "Before the first check after start. Defaults to 10s.",
      +          "type": "string"
      +        },
      +        "disable": {
      +          "type": "boolean"
      +        },
      +        "interval": {
      +          "description": "Between checks. Defaults to 30s.",
      +          "type": "string"
      +        },
      +        "restart": {
      +          "description": "Restart an instance once it is unhealthy. Defaults to false.",
      +          "type": "boolean"
      +        },
      +        "retries": {
      +          "description": "Failed attempts before unhealthy. Defaults to 3.",
      +          "minimum": 0,
      +          "type": "integer"
      +        },
      +        "timeout": {
      +          "description": "Per attempt. Defaults to 5s.",
      +          "type": "string"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "restart": {
      +      "additionalProperties": false,
      +      "description": "What Cycle does when the main process exits.",
      +      "properties": {
      +        "condition": {
      +          "description": "always: restart on any exit. failure: only on a non-zero exit. never: leave it stopped (one-shot jobs such as migrations).",
      +          "enum": [
      +            "always",
      +            "failure",
      +            "never"
      +          ],
      +          "type": "string"
      +        },
      +        "delay": {
      +          "description": "Wait between attempts. Defaults to 10s.",
      +          "type": "string"
      +        },
      +        "max_attempts": {
      +          "description": "Defaults to 3.",
      +          "minimum": 0,
      +          "type": "integer"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "strategy": {
      +      "description": "How instances are placed: first-available (Cycle's default), resource-density (balance server usage), high-availability (spread across availability zones; needs 2+ instances on 2+ servers), distributed (spread across regions; 2+ instances), edge (spread by region, no minimum), node (one instance on every matching server), manual (no automatic placement).",
      +      "enum": [
      +        "first-available",
      +        "resource-density",
      +        "high-availability",
      +        "distributed",
      +        "edge",
      +        "node",
      +        "manual"
      +      ],
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
    • removedInput schema / properties / ram
      Removed value: -{
      -  "description": "New RAM limit, e.g. '1G'. Only when the user asks for one.",
      -  "type": "string"
      -}
    • addedInput schema / properties / resources
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Per-instance CPU and RAM. reserve is set aside on the server at placement; limit is the hard cap. Omit unless the user asks.",
      +  "properties": {
      +    "cpu": {
      +      "additionalProperties": false,
      +      "description": "In shares: 10 = one logical CPU (thread).",
      +      "properties": {
      +        "limit": {
      +          "minimum": 1,
      +          "type": "integer"
      +        },
      +        "reserve": {
      +          "description": "At most limit. Defaults to the current reserve, or 2.",
      +          "minimum": 1,
      +          "type": "integer"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "ram": {
      +      "additionalProperties": false,
      +      "description": "Sizes like '512M' or '2G'.",
      +      "properties": {
      +        "limit": {
      +          "type": "string"
      +        },
      +        "reserve": {
      +          "description": "At most limit.",
      +          "type": "string"
      +        }
      +      },
      +      "type": "object"
      +    }
      +  },
      +  "type": "object"
      +}
  2. Changed1 schema field changed
    • addedInput schema / properties / shared_file_systems
      Added value: +{
      +  "additionalProperties": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "mount_point": {
      +        "description": "Absolute path inside the container, e.g. '/data/shared'; created if missing.",
      +        "type": "string"
      +      },
      +      "writable": {
      +        "description": "true lets the container write to it; false mounts it read-only.",
      +        "type": "boolean"
      +      }
      +    },
      +    "required": [
      +      "mount_point"
      +    ],
      +    "type": "object"
      +  },
      +  "description": "Complete replacement set of shared file systems, keyed by the identifier a server exposes — pass every mount wanted; {} removes them all.",
      +  "type": "object"
      +}
  3. Changed1 schema field changed
    • changedInput schema / properties / cpu_shares / description
      Previous value: -"New CPU limit in shares: 10 = one full thread/vCPU; Cycle's default is 2. Only when the user asks for a CPU limit."New value: +"New CPU limit in shares: 10 = one logical CPU (thread); Cycle's default is 2. Only when the user asks for a CPU limit."
  4. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Goes far beyond the destructiveHint/idempotentHint annotations: it discloses that runtime config changes RESTART every instance, that reconfigure replaces the whole config so unpassed fields are preserved by read-modify-write, that backups merge and require a full field set, that the run stops at the first failed step leaving a partial result, and the order in which groups apply. It also documents the preview diff being tool-computed rather than Cycle-validated, and the import-outlives-wait retry path.

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 impact-grouped bullets ('restart', 'scale', 'reimage', 'volume', 'none') give strong structure and the changeable surface is front-loaded. It is dense and long, and a few passages (rollback narrative, import-timeout caveat) could be tightened, but nearly every sentence carries operationally relevant information for a 28-parameter destructive 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 high-complexity, destructive, 28-parameter mutation with no output schema, the description covers the preview workflow, per-group disruption, step ordering, partial-failure semantics, wait_seconds scope and the response fields an agent must read ('steps', 'image_options', image_id). Nothing essential to calling it 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, and the description earns extra credit for cross-parameter semantics the schema cannot express: image_id taking precedence over reimage, an empty volumes object acting as a read, shared_file_systems being a complete replacement keyed by server identifier, and the merged-field requirement for backups. It does not walk through every one of the 28 parameters, but the schema already carries those.

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?

Opens with a specific verb and resource ('Change an existing Cycle container') and enumerates the changeable groups: runtime config, instance count, image, volumes, metadata. It explicitly bounds itself against neighbouring operations ('Adding or removing volumes is a redeploy, not a reconfigure') and names reconfigure_virtual_machine as the VM analogue, so an agent can distinguish it from siblings without opening a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit mandatory workflow — always call with preview:true first, confirm the diff with the user, then call again without preview. It also states when to route elsewhere: configure_server for shared file systems, redeploy for volume add/remove and image-source switches, build-and-redeploy for stack containers, and separate containers instead of scaling a stateful one.

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.

Resources