Skip to main content
Glama
ConnorBoetig-dev

Unrestricted Development MCP Server

docker_compose_ps

List running containers in a Docker Compose stack to monitor service status and manage your development environment effectively.

Instructions

List containers in a docker-compose stack

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
servicesNoOnly show specific services
allNoShow all stopped containers
fileNoPath to compose file
cwdNoWorking directory

Implementation Reference

  • The main handler function that executes the docker compose ps command using the shared executeDockerCommand helper. Detects docker-compose vs docker compose V2.
    export async function dockerComposePs(args: z.infer<typeof dockerComposePsSchema>): Promise<ToolResponse> {
      const allFlag = args.all ? '-a' : '';
      const services = args.services ? args.services.join(' ') : '';
      const fileFlag = args.file ? `-f ${args.file}` : '';
      const composeCmd = await getComposeCmd();
    
      return executeDockerCommand(
        `${composeCmd} ${fileFlag} ps ${allFlag} ${services}`.trim(),
        args.cwd
      );
    }
  • Zod schema for input validation of docker_compose_ps tool parameters.
    export const dockerComposePsSchema = z.object({
      services: z.array(z.string()).optional().describe('Only show specific services'),
      all: z.boolean().optional().default(false).describe('Show all stopped containers'),
      file: z.string().optional().describe('Path to compose file'),
      cwd: z.string().optional().describe('Working directory')
    });
  • src/index.ts:491-494 (registration)
    Dispatch handler in main MCP server that routes calls to docker_compose_ps by name, validates args, and invokes the handler.
    if (name === 'docker_compose_ps') {
      const validated = dockerComposePsSchema.parse(args);
      return await dockerComposePs(validated);
    }
  • Tool definition object in dockerTools array used for listing available tools in MCP server.
    {
      name: 'docker_compose_ps',
      description: 'List containers in a docker-compose stack',
      inputSchema: {
        type: 'object',
        properties: {
          services: { type: 'array', items: { type: 'string' }, description: 'Only show specific services' },
          all: { type: 'boolean', default: false, description: 'Show all stopped containers' },
          file: { type: 'string', description: 'Path to compose file' },
          cwd: { type: 'string', description: 'Working directory' }
        }
      }
    },
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states what the tool does but doesn't describe how it behaves: no information about output format (e.g., table, JSON), error handling, permissions required, whether it's read-only or has side effects, or any rate limits. For a tool with 4 parameters and no annotation coverage, this leaves significant behavioral gaps.

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 a single, clear sentence that gets straight to the point with zero wasted words. It's appropriately sized for a simple listing tool and front-loads the core functionality without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (4 parameters, no output schema, no annotations), the description is minimally adequate but incomplete. It covers the basic purpose but lacks behavioral context, usage guidance, and output information. The 100% schema coverage helps, but for a tool that likely returns structured container data, the absence of output details is a notable gap.

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?

The description adds no parameter-specific information beyond what's already in the schema (which has 100% coverage). It doesn't explain the relationship between parameters (e.g., how 'services' interacts with 'all'), provide examples, or clarify edge cases. With complete schema documentation, the baseline is 3, but the description doesn't enhance understanding of parameter usage.

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?

The description clearly states the verb ('List') and resource ('containers in a docker-compose stack'), making the purpose immediately understandable. It distinguishes from sibling tools like docker_ps (which lists all Docker containers) by specifying the docker-compose context. However, it doesn't explicitly differentiate from all possible siblings like docker_compose_logs or docker_compose_up beyond the basic action.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when to choose docker_compose_ps over docker_ps (for system-wide containers) or how it relates to other docker-compose tools like docker_compose_logs or docker_compose_up. There's no context about prerequisites, typical workflows, or exclusions.

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/ConnorBoetig-dev/mcp2'

If you have feedback or need assistance with the MCP directory API, please join our Discord server