Skip to main content
Glama

Docker Container Stats

docker_container_stats

Retrieve CPU, memory, network receive, and transmit stats for one Docker container to monitor resource usage and spot performance issues. Use its 64-bit container ID for accurate results.

Instructions

查看单个容器的资源占用统计(cpuUsage / usedMem / networkRx / networkTx)。

注意:必须传 64 位容器 ID。传容器名时上游只返回 {"result":"succ"} 空壳,不报错,容易误判成"没有数据"。

Input Schema

NameRequiredDescriptionDefault
hostNoNAS 主机地址(IP 或域名)
portNoNAS 端口,如 5667(HTTPS)/5666(HTTP)/443
schemeNo传输协议
profileNo独立 session profile 名称,默认使用 default
container_idYes容器 ID(64 位十六进制,取自 docker_containers 的 id 字段;传容器名会静默返回空)

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.2

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose a valuable failure mode: passing a container name returns {"result":"succ"} with no error, easily mistaken for 'no data'. It does not cover auth/session requirements or the read-only nature beyond the verb 查看.

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 tight paragraphs: purpose first, then a single high-value warning. No filler, and the front-loading lets an agent grasp scope before the caveat.

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?

Output schema exists so return values need not be explained, and the crucial ID pitfall is covered. What remains thin is routing guidance against the many sibling docker_* stats tools, but for a single-container stats call this is nearly complete.

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 coverage is 100% and the schema already documents container_id as a 64-bit hex value taken from docker_containers.id, including the name-silently-fails note. The description largely reiterates that; baseline 3 is appropriate when the schema does the heavy lifting.

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 verb and resource (查看单个容器的资源占用统计) and enumerates the exact metrics returned (cpuUsage / usedMem / networkRx / networkTx). The scoping word 单个 (single) implicitly separates it from the aggregate docker_stats, but 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?

Provides a strong critical constraint (must pass 64-bit ID, name silently yields an empty shell), which is a usage prerequisite. However it gives no guidance on when to choose this tool over docker_stats, docker_container_top, or docker_container_inspect.

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