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-1.covia.ai/mcp
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "archive_extract",
"arguments": {
"input": "your input here"
}
}
}
cURL Example:
curl -X POST https://venue-1.covia.ai/mcp \\
-H "Content-Type: application/json" \\
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "archive_extract",
"arguments": {
"input": "your input here"
}
}
}'
Python Example:
import requests
import json
url = "https://venue-1.covia.ai/mcp"
payload = {
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "archive_extract",
"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-1.covia.ai/mcp';
const payload = {
jsonrpc: '2.0',
id: 1,
method: 'tools/call',
params: {
name: 'archive_extract',
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": "Extract Archive",
"description": "Extract a zip or jar archive into a filesystem directory. The archive source is exactly one of: a 'root'+'path' file, a resolvable 'contentRef', or inline base64 'bytes'. Files are written under 'destRoot' (a writable root) at optional 'destPath', which is created if needed. Extraction is jailed to the destination (zip-slip protected — entries that escape are rejected) and capped against zip bombs. Returns the number of entries extracted, total bytes written, and a (capped) list of extracted file paths.",
"creator": "Covia",
"operation": {
"adapter": "archive:extract",
"toolName": "archive_extract",
"input": {
"type": "object",
"properties": {
"root": { "type": "string", "description": "Source archive root (with 'path')" },
"path": { "type": "string", "description": "Source archive path relative to 'root'" },
"contentRef": { "type": "string", "description": "Resolvable reference to the archive bytes, including an asset, file:// root path, or DLFS path" },
"asset": { "type": "string", "deprecated": true, "description": "Legacy alias for contentRef" },
"bytes": { "type": "string", "description": "Base64-encoded source archive bytes" },
"destRoot": { "type": "string", "description": "Destination root to extract into (must be writable)" },
"destPath": { "type": "string", "description": "Destination directory relative to 'destRoot' (default: root itself)" }
},
"required": ["destRoot"]
},
"output": {
"type": "object",
"properties": {
"extracted": { "type": "integer", "description": "Number of entries processed" },
"bytes": { "type": "integer", "description": "Total uncompressed bytes written" },
"destRoot": { "type": "string", "description": "Destination root" },
"files": { "type": "array", "description": "Extracted file paths (capped)", "items": { "type": "string" } },
"truncated": { "type": "boolean", "description": "True if more files were extracted than are listed" }
}
}
}
}