List related records
list_related_recordsRetrieve records linked to an entity through a specific relation, such as a Product's categories or files, with filtering, field selection, sorting, and paging to explore connected data.
Instructions
List records linked to a record through a relation, e.g. a Product's categories or files.
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": {
"entity": "<entity>",
"id": "<id>",
"relation": "<relation>"
},
"name": "list_related_records"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Record ID | |
| asc | No | Ascending sort (default false when sortBy is set) | |
| limit | No | Page size (1-100) | |
| where | No | AtroCore filter conditions, ANDed. Each item: {type, attribute, value}. Types: equals, notEquals, like (use % wildcards), in, notIn, isNull, isNotNull, greaterThan, lessThan, between, linkedWith, isTrue, isFalse, or, and. Example: [{"type":"equals","attribute":"status","value":"ready"}]. Add "isAttribute":true to filter by attribute ID. | |
| entity | Yes | Entity type, e.g. Product, Category, Brand, File. Use list_entities to discover. | |
| offset | No | Records to skip; use next_offset from the previous page | |
| select | No | Fields to return. Defaults to a compact set; see describe_entity. | |
| sortBy | No | Field to sort by | |
| relation | Yes | Relation name from describe_entity, e.g. categories |