List files
list_filesList files under a specified path on local or remote Linux hosts, sorted by name, size, or modification time to aid troubleshooting.
Instructions
List files under a specified path with various sorting options.
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>",
"host": "<host>"
},
"name": "list_files"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host | Yes | System to run on: 'localhost' for the system the MCP server runs on, or a remote host to connect to via SSH | |
| path | Yes | Absolute path to the directory to analyze | |
| sort | No | Sort direction - 'ascending' or 'descending' (default: 'ascending') | ascending |
| top_n | No | Optional limit on number of files to return (1-1000, only used with size ordering) | |
| order_by | No | Sort order - 'size', 'name', or 'modified' (default: 'name') | name |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nodes | Yes | ||
| total | No |