Tool Details: vault_write

Basic Information

Tool Name:vault_write
Asset Name:Write Vault File
Description:Write a file to the user's personal vault. Creates the file if it does not exist; overwrites if it does. Use vault:mkdir first to create parent directories. Supply exactly one of content, value, bytes (base64), or contentRef. Large binary uploads should use WebDAV PUT.
Adapter:vault
Asset Hash:0x48726ff18c2f1a1ed26de13096927df8afafde15ebcdbdc9dbc3d20d1c0b75e9
Input
PropertyTypeDescription
path*stringFile path within the vault (e.g. 'documents/report.json')
valueanyJSON-serialisable value to write as UTF-8 JSON
contentstringUTF-8 text to write
bytesstringBase64-encoded bytes to write
assetstringLegacy alias for contentRef
contentRefstringResolvable content reference to stream, including an asset, file:// root path, or DLFS path
Output
PropertyTypeDescription
createdbooleanTrue if file was newly created
writtenintegerBytes 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-1.covia.ai/mcp

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "vault_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": "vault_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": "vault_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: 'vault_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 Vault File",
  "description": "Write a file to the user's personal vault. Creates the file if it does not exist; overwrites if it does. Use vault:mkdir first to create parent directories. Supply exactly one of content, value, bytes (base64), or contentRef. Large binary uploads should use WebDAV PUT.",
  "creator": "Covia",
  "operation": {
    "adapter": "vault:write",
    "toolName": "vault_write",
    "input": {
      "type": "object",
      "properties": {
        "path": { "type": "string", "description": "File path within the vault (e.g. 'documents/report.json')" },
        "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 file was newly created" }
      }
    }
  }
}

Navigation

Back to adapter details

Back to all adapters

Back to index