Skip to main content
Glama

container_top

Read-only

List the processes running in a Docker container directly from the host, without needing a shell or ps binary in the image.

Instructions

List the processes running inside a container (the daemon runs ps on the host).

Works on any running container without executing anything in it, so it needs no shell or ps binary in the image — unlike container_exec with ps. Use container_stats for resource usage rather than process lists. Fails if the container is not running.

args: id_or_name - The container id or name ps_args - Extra ps arguments (e.g. "aux"); default is the daemon's standard ps invocation returns: dict - {"Titles": [ps column names], "Processes": [[one row of values per process]]}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ps_argsNo
id_or_nameYes
Behavior5/5

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

Annotations already mark readOnlyHint=true and destructiveHint=false, but the description adds meaningful implementation details: the daemon runs ps on the host, nothing is executed inside the container, no shell/ps binary required, and the failure condition for non-running containers. This goes beyond annotation coverage.

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 compact yet information-dense: purpose, usage guidance, failure mode, and parameter docs all included in a few sentences. The args section is clearly structured and each line adds value.

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 no output schema, the description defines the return dict structure ('Titles' and 'Processes'). It also covers prerequisites (container running), alternative tools, and parameter defaults, making it self-sufficient for 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?

The schema provides no descriptions (coverage 0%). The description compensates by explaining both parameters: id_or_name as container id/name and ps_args with an example ('aux') and the default behavior. This gives the agent full parameter understanding.

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 opens with 'List the processes running inside a container', a specific verb+resource statement. It further distinguishes from siblings by noting the host-side ps mechanism and explicitly contrasting with container_exec.

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?

Explicitly states when to use this tool: works on any running container without needing shell/ps binary, unlike container_exec with ps. It also gives an alternative for resource usage (container_stats) and warns that it fails on non-running containers.

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