Extract archive
extract_archiveExtracts a local archive into a new folder named after it, supporting zip, tar, 7z, rar, gz, bz2, xz and zst. Use it to unpack stored files; encrypted archives require a password.
Instructions
Extract an archive on the local disk into a new folder named after it. Use when: unpacking; look with list_archive_members first. Instead: list_archive_members to look; decrypt_file for .axenc files. A remote archive: copy_path_to_backend (needs --mcp-tools transfer and --mcp-write) first. Requires: --mcp-tools archive. Behavior: only adds. The folder is the name minus its suffix ('x.tar.gz' -> 'x'; 'notes.txt.gz' -> 'notes.txt' holding the file); taken, it becomes 'x-1', 'x-2' ...; a repeat makes a new folder. An encrypted archive needs password. Zip-slip, over 10,000 members or 1 GiB unpacked, or zip bombs are refused, leaving nothing. Time limit: 30 min. Returns: {path (the new folder), files}, plus skipped_links and note (how many links were left out) when there were links.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "extract_archive"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | The archive on the local disk (absolute, or relative to the MCP root): zip family, tar.*, 7z, rar, gz, bz2, xz or zst. Required unless path_b64 is given. | |
| dest_dir | No | An existing local folder that receives the new folder (absolute, or relative to the MCP root). Default: the archive's folder. | |
| password | No | The password of an encrypted 7z or ZIP (e.g. one create_archive made with a password). Without it such an archive fails with 'the archive is encrypted with a password'; a wrong one fails too. Never logged or returned. | |
| path_b64 | No | path as base64 of its raw bytes, for non-UTF-8 names; replaces path. | |
| dest_dir_b64 | No | dest_dir as base64 of its raw bytes, for non-UTF-8 names; replaces dest_dir. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | ||
| path | Yes | ||
| files | Yes | ||
| skipped_links | No |