Tool Details: dlfs_create

Basic Information

Tool Name:dlfs_create
Asset Name:Create DLFS File
Description:Create a new file in a DLFS drive. 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:dlfs
Asset Hash:0x9ad6996ff72b30f1b3412a214e41cd731d1b16149174458423ec7752b04a62fc
Input
PropertyTypeDescription
pathstringDestination within the drive. 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.
drive*stringDrive name or authorised DID-scoped drive reference
Output
PropertyTypeDescription
refstringCanonical DLFS reference to the created file
createdboolean-
writtenintegerBytes written
contentTypestringDeclared or resolved media type, when known

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-3.covia.ai/mcp

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "dlfs_create",
    "arguments": {
      "input": "your input here"
    }
  }
}
cURL Example:
curl -X POST https://venue-3.covia.ai/mcp \\
  -H "Content-Type: application/json" \\
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "dlfs_create",
      "arguments": {
        "input": "your input here"
      }
    }
  }'
Python Example:
import requests
import json

url = "https://venue-3.covia.ai/mcp"
payload = {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
        "name": "dlfs_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-3.covia.ai/mcp';
const payload = {
    jsonrpc: '2.0',
    id: 1,
    method: 'tools/call',
    params: {
        name: 'dlfs_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 DLFS File",
  "description": "Create a new file in a DLFS drive. 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": "dlfs:create",
    "toolName": "dlfs_create",
    "input": {
      "type": "object",
      "properties": {
        "drive": { "type": "string", "description": "Drive name or authorised DID-scoped drive reference" },
        "path": { "type": "string", "description": "Destination within the drive. 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" }
          }
        }
      },
      "required": ["drive"]
    },
    "output": {
      "type": "object",
      "properties": {
        "ref": { "type": "string", "description": "Canonical DLFS 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" }
      }
    }
  }
}

Navigation

Back to adapter details

Back to all adapters

Back to index