Tool Details: archive_zip

Basic Information

Tool Name:archive_zip
Asset Name:Create Zip Archive
Description:Build a zip archive from files and/or directories under a filesystem root. 'root' names the source root; 'path' (single) or 'paths' (array) name the files/directories to include — entry names preserve the given relative paths (zip -r style), directories are added recursively. Output goes to a file when 'destRoot'+'destPath' are given (must be a writable root); otherwise a content-addressed asset is produced and its reference returned (optionally named via 'name'). Capped against runaway entry counts.
Adapter:archive
Asset Hash:0xebab3851a763e32e1500883d4018750cf0d511128a002eb0cd77cbb43a224729
Input
PropertyTypeDescription
root*stringSource root containing the files to zip
destRootstringOutput root for the .zip file (omit to produce an asset)
destPathstringOutput .zip path relative to 'destRoot'
pathsarrayFiles/directories to include (relative to 'root')
pathstringA single file/directory to include (relative to 'root')
namestringAsset name when producing an asset (default 'archive.zip')
Output
PropertyTypeDescription
bytesintegerSize of the resulting zip in bytes
assetstringCompatibility alias for ref
refstringContent-addressed asset reference (when producing an asset)
destPathstringOutput path (when writing a file)
destRootstringOutput root (when writing a file)
entriesintegerNumber of entries written

MCP Tool Usage Examples

This tool can be called via the MCP (Model Context Protocol) endpoint. Here are examples of how to use it:

JSON-RPC Call Example:

POST to https://venue-4.covia.ai/mcp

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "archive_zip",
    "arguments": {
      "input": "your input here"
    }
  }
}
cURL Example:
curl -X POST https://venue-4.covia.ai/mcp \\
  -H "Content-Type: application/json" \\
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "archive_zip",
      "arguments": {
        "input": "your input here"
      }
    }
  }'
Python Example:
import requests
import json

url = "https://venue-4.covia.ai/mcp"
payload = {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
        "name": "archive_zip",
        "arguments": {
            "input": "your input here"
        }
    }
}

response = requests.post(url, json=payload)
result = response.json()
print(result)
JavaScript/Node.js Example:
const fetch = require('node-fetch');

const url = 'https://venue-4.covia.ai/mcp';
const payload = {
    jsonrpc: '2.0',
    id: 1,
    method: 'tools/call',
    params: {
        name: 'archive_zip',
        arguments: {
            input: 'your input here'
        }
    }
};

fetch(url, {
    method: 'POST',
    headers: {
        'Content-Type': 'application/json'
    },
    body: JSON.stringify(payload)
})
.then(response => response.json())
.then(data => console.log(data));

Asset Metadata

{
  "name": "Create Zip Archive",
  "description": "Build a zip archive from files and/or directories under a filesystem root. 'root' names the source root; 'path' (single) or 'paths' (array) name the files/directories to include — entry names preserve the given relative paths (zip -r style), directories are added recursively. Output goes to a file when 'destRoot'+'destPath' are given (must be a writable root); otherwise a content-addressed asset is produced and its reference returned (optionally named via 'name'). Capped against runaway entry counts.",
  "creator": "Covia",
  "operation": {
    "adapter": "archive:zip",
    "toolName": "archive_zip",
    "input": {
      "type": "object",
      "properties": {
        "root": { "type": "string", "description": "Source root containing the files to zip" },
        "path": { "type": "string", "description": "A single file/directory to include (relative to 'root')" },
        "paths": { "type": "array", "description": "Files/directories to include (relative to 'root')", "items": { "type": "string" } },
        "destRoot": { "type": "string", "description": "Output root for the .zip file (omit to produce an asset)" },
        "destPath": { "type": "string", "description": "Output .zip path relative to 'destRoot'" },
        "name": { "type": "string", "description": "Asset name when producing an asset (default 'archive.zip')" }
      },
      "required": ["root"]
    },
    "output": {
      "type": "object",
      "properties": {
        "entries": { "type": "integer", "description": "Number of entries written" },
        "bytes": { "type": "integer", "description": "Size of the resulting zip in bytes" },
        "ref": { "type": "string", "description": "Content-addressed asset reference (when producing an asset)" },
        "asset": { "type": "string", "deprecated": true, "description": "Compatibility alias for ref" },
        "destRoot": { "type": "string", "description": "Output root (when writing a file)" },
        "destPath": { "type": "string", "description": "Output path (when writing a file)" }
      }
    }
  }
}

Navigation

Back to adapter details

Back to all adapters

Back to index