list_directory
Lists the contents of a specified directory to view files and subdirectories. Requires proper path configuration for secure access.
Instructions
List contents of a directory.
Requires MCP_ALLOWED_PATHS to be configured with permitted directories.
Args:
path: Directory path to list
Returns:
Formatted directory listing or error message
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"path": "<path>"
},
"name": "list_directory"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |