List Files in a Project
litewrite_list_filesList files and directories in a Litewrite project to explore its structure. Provide a project ID and optionally a subdirectory or recursive flag.
Instructions
List the files and directories in a Litewrite project (POST /api/internal/files/list).
Args:
projectId (string, required): The project id (from litewrite_list_projects).
directory (string, optional): Subdirectory to list from the project root, e.g. "chapters".
recursive (boolean, optional): When true, list all nested files; default true.
Returns an array of {path, type: 'file'|'directory', size?}.
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": {
"projectId": "<projectId>"
},
"name": "litewrite_list_files"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| directory | No | Subdirectory to list, relative to project root | |
| projectId | Yes | The Litewrite project id | |
| recursive | No | List all nested files (default true) |