Skip to main content
Glama

docker_compose_ps

Check the status of Docker Compose services to monitor running containers and their health in a specified directory.

Instructions

Show status of Docker Compose services

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
directoryNoDirectory containing docker-compose.yml

Implementation Reference

  • The actual implementation of the tool 'docker_compose_ps' which executes the 'docker compose ps' command.
    export async function composePs(args: Record<string, unknown>): Promise<string> {
      const directory = (args.directory as string) || ".";
      try {
        const { stdout } = await execFileAsync("docker", ["compose", "ps", "--format", "table"], {
          cwd: directory,
          timeout: 30000,
        });
        return stdout.trim() || "No compose services found.";
      } catch (error) {
        const msg = error instanceof Error ? error.message : String(error);
        throw new Error(`Failed to run docker compose ps: ${msg}`);
      }
    }
  • The schema registration for 'docker_compose_ps'.
      name: "docker_compose_ps",
      description: "Show status of Docker Compose services",
      inputSchema: {
        type: "object" as const,
        properties: {
          directory: { type: "string", description: "Directory containing docker-compose.yml" },
        },
      },
    },
  • The dispatch logic for 'docker_compose_ps' in the handler function.
    case "docker_compose_ps": return composePs(a);

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/batu-sonmez/infraclaude'

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