download_file
Retrieve files from the Kali Linux container to access scan results, output files, and security tool data for analysis and reporting.
Instructions
Read/download a file from the Kali Linux container. Useful for retrieving scan results and output files.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path of the file inside the container |
Implementation Reference
- src/tools/filesystem.ts:36-60 (handler)The "download_file" tool registration and handler implementation using docker.readFile.
server.tool( "download_file", "Read/download a file from the Kali Linux container. Useful for retrieving scan results and output files.", { path: z.string().describe("Absolute path of the file inside the container"), }, async ({ path }) => { try { const content = await docker.readFile(path); return { content: [{ type: "text", text: content }], }; } catch (err) { return { content: [ { type: "text", text: `Failed to download file: ${err instanceof Error ? err.message : String(err)}`, }, ], isError: true, }; } } );