Read-only SQL on an Odoo database
hodiploy_run_sqlRuns ONE read-only query (SELECT, WITH, VALUES, TABLE or EXPLAIN without ANALYZE) on an Odoo database of the instance and returns the rows as JSON (default 100, at most 1000; long values shortened). It runs as a role that reads every table and can write nothing, end no session and read no server file, with a 20-second limit. Use it to look at the data behind a problem (records, sequences, stuck states). Every query is recorded in the instance's activity log.
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": {
"instance_id": "<instance_id>",
"query": "<query>"
},
"name": "hodiploy_run_sql"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | One statement, no ";" inside, no backslash. | |
| database | No | Odoo database name. Optional when the instance has only one. | |
| max_rows | No | ||
| service_id | No | Hodiploy service id from hodiploy_list_instances. Optional when the user has a single Hodiploy service. | |
| instance_id | Yes | Instance id from hodiploy_list_instances. |