Skip to main content
Glama

docker_stats

Monitor live CPU, memory, and PID usage for all running Docker containers on an instance, returning read-only JSON metrics for capacity checks and troubleshooting.

Instructions

Single-sample resource usage for every running container on one instance: CPU %, memory used/limit (bytes), memory %, and PID count. Read-only. Returns JSON: {containers: [{name, cpu_percent, mem_used_bytes, mem_limit_bytes, mem_percent, pids}]}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
instance_idYesInstance ID or name. '<account>/<name>' picks the server of one provider account; custom servers are 'custom/<name>'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.28.0
    • changedInput schema / properties / instance_id / description
      Previous value: -"Instance ID or name."New value: +"Instance ID or name. '<account>/<name>' picks the server of one provider account; custom servers are 'custom/<name>'."
  2. Addedv2.23.0

TDQS

A3.9/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses the read-only safety profile, the single-sample (non-streaming) behavior, and the exact JSON return shape. It does not cover auth/permission requirements or error behavior, but for a read-only stats tool the transparency is solid.

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?

Two sentences, front-loaded with the core purpose and metrics, followed by the return shape. Every clause earns its place with no filler.

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?

For a simple read-only tool with one fully documented parameter, the description supplies purpose, scope, safety, and return structure. No output schema exists, but the description provides the JSON shape, leaving nothing critical missing.

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?

There is one parameter with 100% schema description coverage, and the schema already documents instance_id formats. The description adds no additional parameter semantics, so the baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific resource and scope: 'single-sample resource usage for every running container on one instance' with the exact metrics returned (CPU %, memory used/limit, memory %, PID count). This clearly separates it from host-level get_server_memory and listing docker_ps, though no sibling is named explicitly.

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 'single-sample' framing implies a point-in-time snapshot use case, but there is no explicit when-to-use, when-not, or named alternative such as docker_ps for listing or get_server_memory for host memory. Usage must be inferred from the purpose statement.

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