Tool Details: file_tree

Basic Information

Tool Name:file_tree
Asset Name:Tree of File Root
Description:Render a tab-indented text tree of a directory under a configured filesystem root. Designed for LLM consumption — directories end with '/' and files are listed by name only. Set 'info': 'size' to append file sizes (e.g. '(1.2 KB)'). Walk is capped by 'maxDepth' (default 3, max 10) and 'maxEntries' (default 500, max 5000); when the entries cap is hit the response sets truncated=true. Path may be omitted to walk from the root.
Adapter:file
Asset Hash:0xea37bdc806e00fea9a11796fbd92772280632506e8a5fceb9d60b22cb6de27a3
Input
PropertyTypeDescription
pathstringDirectory relative to root or dlfs/<drive>[/<path>]
infostringOptional per-line annotation. 'size' appends a human-readable size to file lines.
maxDepthintegerMax depth to descend (default 3, max 10)
maxEntriesintegerMax total entries before truncation (default 500, max 5000)
rootstringConfigured root name; omit for a canonical DLFS path
Output
PropertyTypeDescription
treestringTab-indented text tree. Each line is one entry: '<tabs><name>' for files, '<tabs><name>/' for directories.
truncatedbooleanTrue if the entries cap was reached and the walk stopped early. The agent should narrow the path or lower maxDepth and try again.
warningsarrayNon-fatal advisories. Present when entries disappeared during traversal and were omitted.

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": "file_tree",
    "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": "file_tree",
      "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": "file_tree",
        "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: 'file_tree',
        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": "Tree of File Root",
  "description": "Render a tab-indented text tree of a directory under a configured filesystem root. Designed for LLM consumption — directories end with '/' and files are listed by name only. Set 'info': 'size' to append file sizes (e.g. '(1.2 KB)'). Walk is capped by 'maxDepth' (default 3, max 10) and 'maxEntries' (default 500, max 5000); when the entries cap is hit the response sets truncated=true. Path may be omitted to walk from the root.",
  "creator": "Covia",
  "operation": {
    "adapter": "file:tree",
    "toolName": "file_tree",
    "input": {
      "type": "object",
      "properties": {
        "root": { "type": "string", "description": "Configured root name; omit for a canonical DLFS path" },
        "path": { "type": "string", "description": "Directory relative to root or dlfs/<drive>[/<path>]" },
        "maxDepth": { "type": "integer", "description": "Max depth to descend (default 3, max 10)" },
        "maxEntries": { "type": "integer", "description": "Max total entries before truncation (default 500, max 5000)" },
        "info": { "type": "string", "enum": ["size"], "description": "Optional per-line annotation. 'size' appends a human-readable size to file lines." }
      },
      "anyOf": [
        { "required": ["root"] },
        { "required": ["path"] }
      ]
    },
    "output": {
      "type": "object",
      "properties": {
        "tree": { "type": "string", "description": "Tab-indented text tree. Each line is one entry: '<tabs><name>' for files, '<tabs><name>/' for directories." },
        "truncated": { "type": "boolean", "description": "True if the entries cap was reached and the walk stopped early. The agent should narrow the path or lower maxDepth and try again." },
        "warnings": {
          "type": "array",
          "items": { "type": "string" },
          "description": "Non-fatal advisories. Present when entries disappeared during traversal and were omitted."
        }
      }
    }
  }
}

Navigation

Back to adapter details

Back to all adapters

Back to index