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:0x2429b9f6d104eaba57687088a08df40e3ef9ea1106d8c9eec95a8d5ef797b5d4
Input
PropertyTypeDescription
root*stringConfigured root name
maxDepthintegerMax depth to descend (default 3, max 10)
maxEntriesintegerMax total entries before truncation (default 500, max 5000)
infostringOptional per-line annotation. 'size' appends a human-readable size to file lines.
pathstringDirectory path relative to the root (omit for the root itself)
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.

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" },
        "path": { "type": "string", "description": "Directory path relative to the root (omit for the root itself)" },
        "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." }
      },
      "required": ["root"]
    },
    "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." }
      }
    }
  }
}

Navigation

Back to adapter details

Back to all adapters

Back to index