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

  • '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

TableJSON 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 full thread/vCPU; 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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations declare destructive/openWorld/idempotent but say nothing about mechanism; the description supplies the rest: config is fully replaced so unpassed fields persist, every runtime change restarts instances, scale uses Cycle's scale task, volumes.extend is in-place with no restart, metadata applies with no job, and partial application is possible because the run stops at the first failed step.

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?

Long, but the size is justified by a 27-parameter mutation tool and it is front-loaded with the purpose, then organized into impact-tagged bullets ('restart', 'scale', 'reimage', 'volume', 'none'). Some sentences restate schema content (e.g. volume/max_size behavior appears in both), which is the only slack.

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?

With no output schema, the description carries the return-value burden itself, describing the preview from/to diff, the 'image_options' list with build times and running-image marker, the 'steps' array, and the new image_id returned when an import outlives the wait. Nothing an agent needs to call this correctly 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 semantics the schema alone doesn't convey: which parameter group triggers which Cycle mechanism, that backups merges over the current integration while annotations replaces, that image_id takes precedence over reimage, and the impact tag each change carries. It stops short of documenting the two required identity params beyond what the schema states.

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?

States a specific verb and resource ('Change an existing Cycle container') and enumerates the changeable groups (runtime config, instance count, image, volumes, metadata). It explicitly names the sibling equivalent (reconfigure_virtual_machine) and distinguishes reimage from redeploy, so an agent can separate it from delete_container, manage_external_volumes, and deploy_application.

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?

Explicit when-to-use ('Always call with preview:true first... Get explicit confirmation, then call again without preview') and when-not ('Adding or removing volumes is a redeploy, not a reconfigure'; 'Switching image sources is a redeploy... and is refused'; stack-deployed containers refused). It also routes to the right alternative for VMs and for rollbacks.

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