Skip to main content
Glama

containers_list

View all Docker containers to monitor running instances and manage container status. Use this tool to check active and stopped containers for system oversight.

Instructions

List all Docker containers

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
allNoShow all containers (including stopped ones)

Implementation Reference

  • Registers the 'containers_list' tool including its input schema and description.
    { name: 'containers_list', description: 'List all Docker containers', inputSchema: { type: 'object', properties: { all: { type: 'boolean', description: 'Show all containers (including stopped ones)', }, }, }, },
  • MCP server handler for the 'containers_list' tool; extracts 'all' parameter and delegates to DockerService.listContainers, formats response.
    case 'containers_list': { const { all } = request.params.arguments as { all?: boolean }; const output = await this.dockerService.listContainers(all); return { content: [{ type: 'text', text: output }], }; }
  • Core implementation of listing Docker containers using 'docker ps' command with optional --all flag.
    async listContainers(showAll = false): Promise<string> { return this.executeCommand( `ps ${showAll ? '-a' : ''} --format "{{.ID}}\t{{.Image}}\t{{.Status}}\t{{.Names}}"` ); }

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/Toowiredd/chatgpt-mcp-server'

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