Skip to main content
Glama

container_update

Update resource limits (CPU, memory, restart policy) on a running container instantly, avoiding recreation. Pass container ID and the fields to change.

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
Behavior4/5

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

The description adds behavior beyond annotations: changes take effect immediately on Linux (cgroups), not all fields are updatable on every platform, and the container is not recreated. Annotations only indicate readOnlyHint=false and destructiveHint=false; the description enriches this with timing and platform constraints. A minor gap is lack of mention of error cases or permissions, but it earns a 4.

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 structured with a purpose sentence, a caveat paragraph, a detailed list of keys, and an args/returns block. Every sentence adds value, and formatting with code spans and line breaks improves scannability. It is long but appropriately so for a tool with a complex `updates` object.

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?

Given the minimal schema (no descriptions, no output schema) and basic annotations, the description provides essential context: valid keys, platform behavior, return value type, and when to use alternative tools. It covers the tool's core semantics thoroughly, leaving little ambiguity for agent invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% (no property descriptions), so the description carries the full burden. It lists common `updates` keys with concrete examples (e.g., mem_limit, cpu_shares, restart_policy) and explains the `restart_policy` dict structure. The args section also clarifies both parameters, fully compensating for the sparse schema.

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 description begins with 'Update resource limits on a container without recreating it', using a specific verb ('update'), a clear resource ('container'), and a meaningful qualifier ('resource limits', 'without recreating it'). This distinguishes it from sibling tools like container_rename, container_restart, and container_remove.

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 guidance is given: 'To change image, env, or volumes the container must be recreated (`container_remove` + `container_run`)' names specific alternatives. It also notes platform differences for updatable fields, helping the agent choose when this tool is appropriate.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/L337-org/docker-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server