Watch the columns of one table for data events
database_watch_createCreate or replace the row-change capture watch for one ordinary application table in the selected Dev or Prod database. Repeating it with different columns or operations replaces the existing trigger and changes which future row values and events are published; this can overwrite an active watch configuration. Only the selected columns (at most 32) are published under the returned data. event type. Historical rows are not emitted and watched columns must not be dropped while active. A sleeping database wakes and normal compute metering applies. Requires confirmed: true and idempotency_key; keep the original key after an uncertain response. A reached Stop budget refuses with project_budget_exceeded.
Example tool call
This call uses example arguments supplied in the tool’s input schema.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"table": "orders",
"columns": [
"id",
"total"
],
"environment": "dev"
},
"name": "database_watch_create"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table | Yes | Ordinary table owned by the application, created by a deployed migration. | |
| schema | No | Schema of the table, public when omitted. The schemas pgcf, ohmyhost, information_schema and pg_* cannot be watched. | public |
| columns | Yes | Columns published with every event, exactly as written; names are case-sensitive. | |
| confirmed | Yes | ||
| operations | No | Row changes that publish an event; all three when omitted. | |
| project_id | Yes | Project identifier. | |
| environment | Yes | ||
| idempotency_key | Yes | Identifies one mutation and its canonical request payload. |