Skip to main content
Glama

container_update

Adjust a running container's resource limits, including memory, CPU shares, and restart policy, without recreating it; changes take effect immediately on Linux.

Instructions

Update resource limits on a container without recreating it.

Changes take effect immediately on Linux (cgroups); not all fields are updatable on every platform. Common updates keys: mem_limit (bytes, e.g. 134217728 for 128 MB), memswap_limit (memory+swap in bytes; -1 = unlimited), cpu_shares (relative weight, default 1024), cpu_period / cpu_quota (microseconds for CFS throttling), cpuset_cpus (e.g. "0-1"), restart_policy (dict with Name such as "on-failure"/"always"/"unless-stopped" and optional MaximumRetryCount). To change image, env, or volumes the container must be recreated (container_remove + container_run).

Args: id_or_name: Container id or name to update updates: Resource fields to update; see description for valid keys

Returns: dict: The container's full inspect payload after the update

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
updatesYes
id_or_nameYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.0.0

TDQS

A4.6/5.0
Behavior4/5

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

With only readOnlyHint=false and destructiveHint=false in annotations, the description needs to carry behavioral detail, and it does: changes take effect immediately on Linux (cgroups), not all fields are updatable on every platform, and the update does not recreate the container. It does not contradict annotations. It stops short of describing failure modes or whether the container must be running, so it is strong but not exhaustive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core purpose, followed by a compact platform caveat, a well-grouped update-key reference, and explicit Args/Returns sections. Despite the length needed for a 0% schema, every sentence is informative and logically ordered.

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 two-parameter tool with no output schema, the description covers parameter semantics, return value, platform variability, and the recreate alternative. It is complete enough for correct invocation, though the non-exhaustive 'common updates keys' list leaves the exact full set of update fields to the API rather than the definition.

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?

The input schema provides only names and types with 0% description coverage, so the description compensates by giving the id_or_name meaning and documenting the main updates keys with units, defaults, examples, and the restart_policy dict shape. It loses a point because it frames the key list as 'common' rather than a complete contract for the free-form updates object.

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 opening sentence names a specific action and target ('Update resource limits on a container without recreating it') and the following lines enumerate exactly which fields are in scope. This clearly distinguishes it from container_remove/container_run and other container mutators in the sibling list.

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?

It explicitly states when the tool is appropriate (resource-limit updates without recreation) and when it is not: changing image, env, or volumes requires container_remove + container_run. It also warns that updatable fields vary by platform, giving the agent a decision rule rather than leaving it to infer.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools