Tool Details: file_set_metadata

Basic Information

Tool Name:file_set_metadata
Asset Name:Set File Metadata
Description:Set the application metadata of a file or directory in DLFS, under a DLFS-backed root or by canonical DLFS path, or clear it with null. Host and temp roots keep no metadata. The value is kept with the entry: a move or rename takes it along, replacing the file's content in place keeps it, and deleting the entry removes it. The entry's content and modified time are unchanged. file_stat returns it as 'metadata'.
Adapter:file
Asset Hash:0x29b015ca368da2bd86bd30ac4d2887d3c0c8dea8c90a3a6cdfa8608b423ef919
Input
PropertyTypeDescription
path*stringPath of an existing file or directory, relative to root, or a canonical DLFS path
rootstringConfigured DLFS-backed root name; omit for a canonical DLFS path
metadata*anyThe value to keep with the entry, replacing any it had. Use structured values (objects/arrays/scalars). Null clears it.
Output
PropertyTypeDescription
metadataanyThe metadata the entry now has, null for none

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_set_metadata",
    "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_set_metadata",
      "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_set_metadata",
        "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_set_metadata',
        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": "Set File Metadata",
  "description": "Set the application metadata of a file or directory in DLFS, under a DLFS-backed root or by canonical DLFS path, or clear it with null. Host and temp roots keep no metadata. The value is kept with the entry: a move or rename takes it along, replacing the file's content in place keeps it, and deleting the entry removes it. The entry's content and modified time are unchanged. file_stat returns it as 'metadata'.",
  "creator": "Covia",
  "operation": {
    "adapter": "file:setMetadata",
    "readOnly": false,
    "toolName": "file_set_metadata",
    "input": {
      "type": "object",
      "properties": {
        "root": { "type": "string", "description": "Configured DLFS-backed root name; omit for a canonical DLFS path" },
        "path": { "type": "string", "description": "Path of an existing file or directory, relative to root, or a canonical DLFS path" },
        "metadata": { "description": "The value to keep with the entry, replacing any it had. Use structured values (objects/arrays/scalars). Null clears it." }
      },
      "required": ["path", "metadata"]
    },
    "output": {
      "type": "object",
      "properties": {
        "metadata": { "description": "The metadata the entry now has, null for none" }
      }
    }
  }
}

Navigation

Back to adapter details

Back to all adapters

Back to index