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-test.covia.ai/mcp
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "file_create",
"arguments": {
"input": "your input here"
}
}
}
cURL Example:
curl -X POST https://venue-test.covia.ai/mcp \\
-H "Content-Type: application/json" \\
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "file_create",
"arguments": {
"input": "your input here"
}
}
}'
Python Example:
import requests
import json
url = "https://venue-test.covia.ai/mcp"
payload = {
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "file_create",
"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-test.covia.ai/mcp';
const payload = {
jsonrpc: '2.0',
id: 1,
method: 'tools/call',
params: {
name: 'file_create',
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 File",
"description": "Create a new file under a configured filesystem root or at an authorised DLFS path. Fails if the target already exists. Omit content to create an empty file. When supplied, content is the standard asset content descriptor: inline UTF-8 text, any resolvable ref, or a sha256 blob from content storage; sha256 alongside inline/ref verifies integrity. Parent directories must exist.",
"creator": "Covia",
"operation": {
"adapter": "file:create",
"toolName": "file_create",
"input": {
"type": "object",
"properties": {
"root": { "type": "string", "description": "Configured root name; omit for a canonical DLFS path" },
"path": { "type": "string", "description": "Destination relative to root or a canonical DLFS path. May be omitted when content.fileName supplies it." },
"content": {
"type": "object",
"description": "Optional standard asset content descriptor. Omit it, or supply only fileName/contentType, for an empty file. Add inline, ref, or sha256 for content bytes. content.dlfs remains a compatibility alias for ref.",
"properties": {
"inline": { "type": "string", "description": "UTF-8 text held directly in the descriptor" },
"ref": { "type": "string", "description": "Any resolvable content reference, including assets, lattice paths, file:// paths, DLFS paths, and DID URLs" },
"dlfs": { "type": "string", "deprecated": true, "description": "Compatibility alias for ref used by existing asset metadata" },
"sha256": { "type": "string", "description": "Content-store hash when used alone, or an integrity pin for inline/ref content" },
"contentType": { "type": "string", "description": "Declared media type" },
"fileName": { "type": "string", "description": "Original file name; also supplies the destination when path is omitted" }
}
}
}
},
"output": {
"type": "object",
"properties": {
"ref": { "type": "string", "description": "Canonical reference to the created file" },
"written": { "type": "integer", "description": "Bytes written" },
"created": { "type": "boolean", "const": true },
"contentType": { "type": "string", "description": "Declared or resolved media type, when known" }
}
}
}
}