list_directory
List files and directories from a specified path with optional glob filtering. Sort by name, modification time, or size and reverse order for tailored directory listings.
Instructions
List files and directories with optional glob pattern filtering (e.g., *.pas, *.dfm). Parameters: path (required), pattern (optional, default: *), sortBy ("name" default, "mtime" newest first, "size" largest first), reverse (bool, flips the order).
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 | ||
| sortBy | No | ||
| pattern | No | ||
| reverse | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| files | Yes |