Skip to main content
Glama

container_status

Check if the Kali Linux Docker container is running to verify environment availability for security testing tools.

Instructions

Check the status of the Kali Linux Docker container.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The container_status tool handler, which calls docker.getStatus() and formats the output.
    server.tool(
      "container_status",
      "Check the status of the Kali Linux Docker container.",
      {},
      async () => {
        try {
          const status = await docker.getStatus();
          return {
            content: [{ type: "text", text: JSON.stringify(status, null, 2) }],
          };
        } catch (err) {
          return {
            content: [
              {
                type: "text",
                text: `Failed to get status: ${err instanceof Error ? err.message : String(err)}`,
              },
            ],
            isError: true,
          };
        }
      }
    );
  • The function registerContainerTools registers the container_status tool with the MCP server.
    export function registerContainerTools(
      server: McpServer,
      docker: DockerManager
    ) {
      server.tool(
        "container_start",
        "Start the Kali Linux Docker container. Must be called before running any commands.",
        {},
        async () => {
          try {
            const message = await docker.startContainer();
            return { content: [{ type: "text", text: message }] };
          } catch (err) {
            return {
              content: [
                {
                  type: "text",
                  text: `Failed to start container: ${err instanceof Error ? err.message : String(err)}`,
                },
              ],
              isError: true,
            };
          }
        }
      );
    
      server.tool(
        "container_stop",
        "Stop and remove the Kali Linux Docker container.",
        {},
        async () => {
          try {
            const message = await docker.stopContainer();
            return { content: [{ type: "text", text: message }] };
          } catch (err) {
            return {
              content: [
                {
                  type: "text",
                  text: `Failed to stop container: ${err instanceof Error ? err.message : String(err)}`,
                },
              ],
              isError: true,
            };
          }
        }
      );
    
      server.tool(
        "container_status",
        "Check the status of the Kali Linux Docker container.",
        {},
        async () => {
          try {
            const status = await docker.getStatus();
            return {
              content: [{ type: "text", text: JSON.stringify(status, null, 2) }],
            };
          } catch (err) {
            return {
              content: [
                {
                  type: "text",
                  text: `Failed to get status: ${err instanceof Error ? err.message : String(err)}`,
                },
              ],
              isError: true,
            };
          }
        }
      );
    }

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/Hannes221/kali-mcp'

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