container_stop
Stop and remove the Kali Linux Docker container to halt security testing sessions and free system resources.
Instructions
Stop and remove the Kali Linux Docker container.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/container.ts:30-50 (registration)Tool definition and handler registration for 'container_stop' in the MCP server. It calls docker.stopContainer().
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, }; } } ); - src/docker-manager.ts:76-88 (handler)The actual implementation of stopping and removing the Docker container, used by the 'container_stop' tool.
async stopContainer(): Promise<string> { const container = await this.getContainer(); if (!container) { return "No Kali container found."; } const info = await container.inspect(); if (info.State.Running) { await container.stop(); } await container.remove(); return "Kali container stopped and removed."; }