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": "file_write",
"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": "file_write",
"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": "file_write",
"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: 'file_write',
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": "Write File",
"description": "Write a file under a configured filesystem root or to an authorised DLFS path. Creates the file if absent and overwrites it otherwise. Parent directories must exist. Supply exactly one of content, value, bytes, or contentRef.",
"creator": "Covia",
"operation": {
"adapter": "file:write",
"toolName": "file_write",
"input": {
"type": "object",
"properties": {
"root": { "type": "string", "description": "Configured root name; omit for a canonical DLFS path" },
"path": { "type": "string", "description": "Path relative to root, dlfs/<drive>/<path>, or <ownerDID>/dlfs/<drive>/<path>" },
"content": { "type": "string", "description": "UTF-8 text to write" },
"value": { "description": "JSON-serialisable value to write as UTF-8 JSON" },
"bytes": { "type": "string", "description": "Base64-encoded bytes to write" },
"contentRef": { "type": "string", "description": "Resolvable content reference to stream, including an asset, file:// root path, or DLFS path" },
"asset": { "type": "string", "deprecated": true, "description": "Legacy alias for contentRef" }
},
"required": ["path"]
},
"output": {
"type": "object",
"properties": {
"written": { "type": "integer", "description": "Bytes written" },
"created": { "type": "boolean", "description": "True if the file was newly created" }
}
}
}
}