Tool Details: vault_create

Basic Information

Tool Name:vault_create
Asset Name:Create Vault File
Description:Create a new file in the user's personal vault. 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.
Adapter:vault
Asset Hash:0x905ee5637741dc07fa8bff7b26758b59eb2c8af81182ca07caab2b30401c599f
Input
PropertyTypeDescription
pathstringDestination within the vault. May be omitted when content.fileName supplies it.
contentobjectOptional 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.
Output
PropertyTypeDescription
contentTypestringDeclared or resolved media type, when known
createdboolean-
writtenintegerBytes written
refstringCanonical DLFS reference to the created vault file

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": "vault_create",
    "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": "vault_create",
      "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": "vault_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-4.covia.ai/mcp';
const payload = {
    jsonrpc: '2.0',
    id: 1,
    method: 'tools/call',
    params: {
        name: 'vault_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 Vault File",
  "description": "Create a new file in the user's personal vault. 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": "vault:create",
    "toolName": "vault_create",
    "input": {
      "type": "object",
      "properties": {
        "path": { "type": "string", "description": "Destination within the vault. 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 DLFS reference to the created vault file" },
        "written": { "type": "integer", "description": "Bytes written" },
        "created": { "type": "boolean", "const": true },
        "contentType": { "type": "string", "description": "Declared or resolved media type, when known" }
      }
    }
  }
}

Navigation

Back to adapter details

Back to all adapters

Back to index