sample_rows
Pull a subset of rows from a loaded dataset using random, head, tail, or stratified sampling. Select specific columns to keep responses small and explore data quickly.
Instructions
Pull a sample from a loaded source.
modes: 'random' (USING SAMPLE), 'head', 'tail', 'stratified' (requires stratify_by).
`columns` scopes the projection — useful on wide sources (20+ cols) where
returning everything inflates the JSON response. Default returns all columns.
Output size: scales with n × columns; default ~5KB on a typical narrow source.
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": {
"source_id": "<source_id>"
},
"name": "sample_rows"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| n | No | ||
| mode | No | random | |
| columns | No | ||
| source_id | Yes | ||
| stratify_by | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||