> ## Documentation Index
> Fetch the complete documentation index at: https://docs.augent.app/llms.txt
> Use this file to discover all available pages before exploring further.

# list_files

> List media files in a directory. Finds all common audio and video formats by default.

## Example

**Request:**

```json theme={null}
{
  "directory": "~/Downloads"
}
```

**Response:**

```json theme={null}
{
  "directory": "/Users/you/Downloads",
  "count": 3,
  "files": [
    { "path": "/Users/you/Downloads/episode1.webm", "name": "episode1.webm", "size_mb": 14.5 },
    { "path": "/Users/you/Downloads/episode2.mp4", "name": "episode2.mp4", "size_mb": 8.2 },
    { "path": "/Users/you/Downloads/podcast.mp3", "name": "podcast.mp3", "size_mb": 22.1 }
  ]
}
```

***

## Parameters

| Parameter   | Required | Default                  | Description                                      |
| ----------- | -------- | ------------------------ | ------------------------------------------------ |
| `directory` | Yes      | —                        | Directory path to search                         |
| `pattern`   | No       | all common media formats | Glob pattern for matching files (e.g. `"*.wav"`) |
| `recursive` | No       | `false`                  | Search subdirectories                            |

***

## Notes

<Tip>Default formats: `.mp3`, `.m4a`, `.wav`, `.webm`, `.mp4`, `.mkv`, `.ogg`, `.flac`</Tip>

<Tip>Use `pattern` to override with a custom glob (e.g. `"*.wav"`).</Tip>

<Tip>Use `recursive: true` to search subdirectories.</Tip>
