sample_table_rows
Fetch up to N rows from a database table to see real values and data shape before writing a query; no filters or ordering.
Instructions
Fetch up to N rows of a table to learn its data shape.
Use it to see what real values look like before writing a query: no filter, no ordering. To fetch specific rows use execute_read_query with a WHERE clause; for more than 1000 rows use open_query_cursor and fetch_rows; to find which table holds a value use search_value. A table that does not exist is an error.
Returns meta and rows, one object per row keyed by column name, in no
guaranteed order. n defaults to 10 and the answer holds at most 1000 rows: a
larger n is clamped to 1000. meta.truncated is true only when n was over
1000 and was clamped; it reports that clamp, not whether the table holds more rows.
Rows arrive on the text channel only, inside the untrusted-data banner: this
tool emits no structuredContent. Values render as on execute_read_query (bytea as
\x hex text).
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": {
"database": "<database>",
"table": "<table>"
},
"name": "sample_table_rows"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| n | No | How many rows to return: default 10, at most 1000. | |
| table | Yes | Table or view name exactly as list_tables shows it (case-sensitive, no quotes), optionally schema-qualified: 'orders' or 'public.orders'. | |
| database | Yes | Name of a configured database, exactly as list_databases returns it (case-sensitive). Not a DSN, host or server-side database name. An unknown name is an error that lists the configured names. |