server_decompress_file
Decompress archive files on a Minecraft server to extract game files, mods, or configurations using the crafty-mcp server tool.
Instructions
Decompress/unzip an archive file on a Minecraft server
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| server_id | Yes | Server ID or UUID | |
| folder | Yes | Relative path to the archive file to decompress |
Implementation Reference
- src/tools/server-files.ts:158-174 (handler)The tool "server_decompress_file" is registered and handled within the `registerServerFileTools` function in `src/tools/server-files.ts`. It takes `server_id` and `folder` (path to archive) as inputs and sends a POST request to `/servers/${server_id}/files/zip`.
server.tool( "server_decompress_file", "Decompress/unzip an archive file on a Minecraft server", { server_id: z.string().describe("Server ID or UUID"), folder: z.string().describe("Relative path to the archive file to decompress"), }, async ({ server_id, folder }) => { try { const data = await client.post(`/servers/${server_id}/files/zip`, { folder }); return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] }; } catch (error) { const msg = error instanceof Error ? error.message : String(error); return { content: [{ type: "text", text: `Error: ${msg}` }], isError: true }; } } );