query_table
Retrieve rows from a MySQL table using structured equality filters, selected columns, ordering, and row limits—no SQL strings required.
Instructions
Query rows from a table with structured parameters — no SQL strings are accepted. WHERE conditions are equality-only key/value pairs ({ status: "active" }); use columns to narrow the output; limit defaults to 20 and is hard-capped at 200 rows. Workflow: describe_table first to learn column names, then query with a small limit and narrow columns, expanding only when needed.
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": {
"table": "<table>"
},
"name": "query_table"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max rows to return. Default 20, hard cap 200. | |
| table | Yes | Table name (from list_tables) | |
| where | No | Equality filters as { column: value } pairs, combined with AND. e.g. { "status": "active", "user_id": 42 }. No operators or SQL fragments — values are parameterized and never interpolated. | |
| offset | No | Rows to skip. Default 0. Prefer WHERE filters over offset for large tables. | |
| columns | No | Columns to return, e.g. ["id", "name"]. Default: all columns ("*"). Max 50. | |
| order_by | No | Ordering as "column" or "column DESC", e.g. "id DESC". Default: no ordering. |