sort_by
Sort an array of objects in a loaded JSON document by a chosen field and dot-notation path, with optional descending order, to order records for review.
Instructions
Sort an array of objects by a field.
Args: alias: The alias of the loaded document. path: Dot-notation path to the array of objects. field: The field to sort by (e.g. "price", "name"). descending: Sort in descending order (default False = ascending).
Returns: The sorted array.
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": {
"alias": "<alias>",
"path": "<path>",
"field": "<field>"
},
"name": "sort_by"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| alias | Yes | ||
| field | Yes | ||
| descending | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |