Skip to main content
Glama

update_container

Destructive

Adjust a Docker container's CPU and memory limits, capture prior values for rollback, and preview changes with dry_run before applying.

Instructions

[WRITE][risk=medium] Update a container's resource limits, capturing prior limits.

Captures the current CPU/memory HostConfig limits before the change so the harness records an undo (restore the prior limits). Pass dry_run=True to preview.

Args: container_id: Container id or name. resources: Resource limits to set — allowed keys: Memory, MemorySwap, MemoryReservation, NanoCpus, CpuQuota, CpuPeriod, CpuShares, CpusetCpus, CpusetMems (Docker update fields). dry_run: If True, preview without changing. target: Target name from config; omit for the default.

Input Schema

NameRequiredDescriptionDefault
targetNo
dry_runNo
resourcesYes
container_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, destructiveHint=true, idempotentHint=false, so the safety profile is covered. The description adds genuine value beyond that: it explains that current HostConfig limits are captured so an undo can restore them, tags the operation risk=medium, and offers dry_run previewing. It stops short of describing failure modes or permissions.

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 definition is front-loaded with the [WRITE][risk=medium] tag and the core purpose before the undo rationale and Args block. Every line contributes — no filler, and the args are grouped compactly.

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 mutation tool with a nested object, no output schema, and 0% schema coverage, the description supplies the essential missing context (undo behavior, dry-run, per-parameter meaning). It is adequate; only the absence of permission/error behavior keeps it from being fully complete.

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 description coverage is 0%, so the description carries the burden and mostly succeeds: container_id is clarified as id-or-name, dry_run as preview-only, target as a config name with a default, and resources enumerates the accepted Docker update keys. The nested resources object is only partially bounded, keeping it just short of full coverage.

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 states a specific verb and resource ('Update a container's resource limits') plus a distinguishing behavioral detail ('capturing prior limits'). An agent can immediately tell this apart from siblings like restart_container, stop_container, or inspect_container.

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

Usage Guidelines4/5

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

It gives clear operational context ('Pass dry_run=True to preview') and notes target defaults, which tells the agent how to use it safely. It does not, however, state when to prefer this over alternatives such as recreate_stack for a broader change, so there are no explicit exclusions.

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