Skip to main content
Glama

container_top

Read-only

List processes running inside a Docker container without executing commands in it, using host ps. Works on any running container, no shell required.

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: 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

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.9.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already mark the tool as read-only and non-destructive. The description adds valuable behavioral context: the daemon runs `ps` on the host, nothing is executed inside the container, and the call fails on stopped containers. This goes beyond the annotations without contradicting them.

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 and front-loaded: purpose, usage notes, parameters, and return format are clearly separated. Every sentence contributes meaningful information without redundancy.

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?

Since there is no output schema, the description explicitly defines the return dict. It covers key behavior, failure condition, dependencies, and usage guidance. The only small gap is the lack of prose explanation for `id_or_name`, which is otherwise implied by the tool name and required flag.

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%, so the description must compensate. It thoroughly explains `ps_args` including the default, but does not explicitly explain the required `id_or_name` parameter. The parameter name is self-explanatory, but a clear prose description would be expected at this coverage level.

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?

Clearly states the specific function: listing processes inside a container, and notes the host-side `ps` mechanism. It also distinguishes itself from `container_exec` and `container_stats`, so an agent can select it without ambiguity.

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?

Provides explicit when-to-use and when-not-to-use guidance: works without executing in the container, requires no shell or `ps` binary, and should be replaced by `container_stats` for resource usage. Also warns that it fails if the container is not running.

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