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, 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.

Input Schema

NameRequiredDescriptionDefault
envNoEnvironment variables to set, merged into the existing ones (a tool convenience, not a Cycle feature).
ramNoNew RAM limit, e.g. '1G'. Only when the user asks for one.
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.
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.
unset_envNoEnvironment variable names to remove.
cpu_sharesNoNew CPU limit in shares: 10 = one logical CPU (thread); Cycle's default is 2. Only when the user asks for a CPU limit.
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. 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"
      +}
  2. 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."
  3. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already mark this destructive, non-read-only, open-world, idempotent, but the description adds far beyond that: the restart cost of every runtime change, the full-config replacement semantics, per-group impact tags, ordered multi-group application, and that 'the run stops at the first failed step, so a partial result is possible'. This is exactly the behavioral disclosure a 28-param 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?

Front-loaded with the purpose and organized by impact group with consistent tagging, so a reader can locate the relevant paragraph quickly. It is long and dense, but for a tool with five distinct change mechanisms and 28 parameters the length is largely earned rather than padded.

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?

Covers the full complexity envelope: ordered step application, partial-failure behavior, reporting via 'steps', preview/confirmation protocol, rollback workflow, and long-running import recovery ('call again with it to finish without importing a second copy'). No output schema exists, yet the description still explains the salient response fields, leaving nothing an agent needs in order to call it correctly.

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 still adds semantics the schema cannot: precedence ('image_id... takes precedence over reimage:true'), the merge requirement for backups after merge, that 'passing volumes at all returns the current volumes' (an empty object is a read), and that shared_file_systems is a complete replacement set checked against the servers the instances run on.

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+resource ('Change an existing Cycle container') and enumerates the exact change groups it governs (runtime config, instance count, image, volumes, metadata). It explicitly distinguishes itself from adjacent operations – redeploy for adding/removing volumes and switching image sources, and names 'reconfigure_virtual_machine' as the VM equivalent – so an agent can separate it from siblings without opening any 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?

States the mandatory workflow ('Always call with preview:true first... Get explicit confirmation, then call again without preview') and the reason (the diff is computed by this tool, not validated by Cycle). It also routes away when appropriate: 'offer configure_server instead', redeploy for source switches, and rejections for stack-deployed containers.

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