Query records
query_recordsFilter, sort, group, and summarize records in CSV, JSON, JSONL, or NDJSON files to inspect evaluation outputs, compute pass rates, and extract statistics.
Instructions
Filter, sort, group and summarise records in a tabular data file.
Useful for evaluation outputs such as results.jsonl: e.g. filter
passed == false, group_by task category, or get the mean of a score.
Booleans average as 0/1, so stats_field on a pass/fail flag gives the
pass rate.
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": {
"path": "<path>"
},
"name": "query_records"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | A .csv, .tsv, .json, .jsonl or .ndjson file. | |
| limit | No | Max records returned. | |
| fields | No | Fields to return; dotted paths allowed. | |
| filters | No | All filters must match (logical AND). | |
| sort_by | No | Field to sort matches by. | |
| group_by | No | Count matches per distinct value of this field. | |
| descending | No | ||
| stats_field | No | Numeric field to summarise (count/mean/min/max) over matches. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| stats | No | ||
| fields | Yes | Top-level fields seen in the file. | |
| matched | Yes | ||
| records | Yes | ||
| truncated | Yes | ||
| group_counts | No | ||
| total_records | Yes |