query
Run a read-only SQL SELECT or WITH query against your WhatsApp chat database and get matching rows as JSON. Aggregate or LIMIT results to search messages and media text safely.
Instructions
Run a read-only SQL statement against the WhatsApp workspace database and return rows as JSON. Writes are blocked at the connection level. Always aggregate or LIMIT; results are capped at 500 rows.
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": {
"sql": "<sql>"
},
"name": "query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | a single read-only SQL statement (SELECT / WITH); always aggregate or LIMIT | |
| limit | No | maximum rows to return, default 200, max 500 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | Yes | ||
| columns | Yes | ||
| truncated | No | true when the row or byte cap cut the result short — narrow the query |