analyze_relationships
Maps how collections relate across your Directus instance, showing which fields link them and their relationship type. Use it before creating, changing, or deleting fields and collections.
Instructions
Maps relationships across the instance: which collections point at which, through which fields, and of which type (o2o, o2m, m2o, m2m, m2a). Pass collection to narrow it to one collection and its neighbours, or omit it for the whole graph. Use it before create_relationship, before deleting a field or collection, or when a nested query returns an unexpected shape; analyze_collection_schema covers one collection in depth. Read-only, and it reads the data model only, never items. System collections are excluded unless includeSystemCollections is true.
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": "analyze_relationships"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| collection | No | Specific collection to analyze | |
| includeSystemCollections | No | Include system collections |