Skip to main content
Glama

container_stats

Retrieve a read-only snapshot of CPU, memory, network, block I/O, and PID usage for a specified container, matching docker stats --no-stream for quick diagnostics.

Instructions

One sample of CPU, memory, network, block I/O and PIDs, like docker stats --no-stream. Read-only.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "container": "<container>"
    },
    "name": "container_stats"
  }
}

Input Schema

NameRequiredDescriptionDefault
containerYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does declare 'Read-only' plus the single-sample (non-streaming) nature of the call. It does not cover edge behaviors such as what happens for a stopped container or whether the container arg accepts names vs IDs, keeping it short of a 5.

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?

A single tightly packed sentence that front-loads the payload contents and closes with the key constraint (read-only). No filler whatsoever.

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?

The tool is simple, an output schema exists to document return values, and the description states read-only status and snapshot semantics. The remaining gap is the undocumented container parameter and behavior on non-running containers.

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

Parameters3/5

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

Schema description coverage is 0% for the single `container` parameter, so the description must compensate but only does so indirectly through the docker-stats analogy, implying a container name or ID. It adds no explicit syntax, format, or running-state requirement.

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 names a specific verb+resource combination — taking a single sample of CPU, memory, network, block I/O and PIDs — and the `docker stats --no-stream` analogy makes the exact shape of the operation unambiguous. It is clearly distinguishable from siblings like container_events, container_health and get_container_logs.

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

Usage Guidelines3/5

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

The `--no-stream` analogy implies a one-shot snapshot rather than continuous monitoring, which gives implicit when-to-use guidance. However, it never states when to prefer this over container_health or get_container_logs, and gives no prerequisites (e.g., container must be running).

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