# GET /files/list

List a Scripts directory or project.

This is a device HTTP route. Set `DEVICE_URL` to your reachable device URL; [connection and examples](https://mcp.applesauceos.com/doc/http.md) explain how. Do not append this path to the public MCP URL.

## Parameters

| Parameter | Type | Meaning |
| --- | --- | --- |
| `path` | query string | Relative directory; default empty string for Scripts. |
| `limit` | query string | Integer 1..500; default 100. |
| `offset` | query string | Integer 0..10000; default 0. |

## Response

JSON {directory,entries:[{path,name,directory,size,modifiedAt}],total,nextOffset}. nextOffset is null at the end.

## Example

```sh
curl --fail-with-body "$DEVICE_URL/files/list?path=&limit=100&offset=0"
```

Paths are relative to Scripts. Absolute paths, parent traversal and symlink traversal are rejected. [File rules](https://mcp.applesauceos.com/doc/http-guide.md#files-and-project-directories) apply to every file endpoint.

Check the HTTP status and any JSON error. [HTTP workflows and error handling](https://mcp.applesauceos.com/doc/http-guide.md) explain shared limits. [All endpoints](https://mcp.applesauceos.com/doc/http.md).
