data_query
Run a database query on one of your servers — passwordless. It executes the engine's own client on the host over Termalin's keyless tunnel, using the database's local trust (Postgres peer auth via sudo -u postgres, MySQL/MariaDB unix-socket via sudo mysql, redis-cli, mongosh, sqlite3) — so no database password is needed or stored anywhere. Without sudo (shared hosting) the client runs as the login user, so MySQL/MariaDB uses its ~/.my.cnf. Read-only by default: only SELECT/SHOW-style statements run unless allowWrites is set (full-access keys only). SQL engines return CSV/TSV with a header. For MongoDB pass a shell expression, e.g. db.products.find({}).limit(20).toArray().
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": {
"host": "<host>",
"query": "<query>"
},
"name": "data_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host | Yes | Server id from hosts_list | |
| query | Yes | The statement / command / expression to run | |
| engine | No | Database engine on that server (default postgres) | |
| database | No | Database name (for sqlite: the .db file path) | |
| username | No | SSH login user (defaults to the tunnel's user, else root) | |
| allowWrites | No | Allow a non-read statement (full-access keys only; default false) | |
| timeoutSeconds | No | Max seconds to wait (default 60, at most 300). Some chat apps stop waiting sooner — run long jobs with job_start instead. |