get_files
List and search Directus file library entries with filters, sorting, field selection, and pagination, returning metadata (ID, filename, type, size, storage) rather than binary contents.
Instructions
Lists files in the Directus file library (directus_files) with filtering, sorting, field selection, search and pagination, returning their metadata rather than their binary contents. Use import_data to load rows from a CSV or JSON file, and get_collection_items for files referenced from a content collection. Returns at most 25 files unless limit says otherwise. Each entry carries the file id, filename, type, size and storage location, which is what an asset URL is built from.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_files"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sort | No | Sort fields | |
| limit | No | Number of files to return (default: 25) | |
| fields | No | Fields to return | |
| filter | No | Filter conditions | |
| offset | No | Number of files to skip | |
| search | No | Search query |