Execute one bounded database write in Dev or Prod
database_writeExecute one INSERT, UPDATE or DELETE/upsert in the chosen Dev or Prod database. Requires Owner project permission, confirmed: true and an idempotency key. At most 1000 directly affected rows and five seconds. Returns a durable receipt, not rows. If outcome is unknown, never automatically repeat with another key: inspect the data with a read-only query and retain the operation ID. Same-key retries only observe the existing attempt. Schema changes use GitHub migrations; compute wakes and is metered normally. Application RLS policies also apply to writes. If the selected environment has no database, follow database_not_set_up.
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": {
"project_id": "<project_id>",
"idempotency_key": "<idempotency_key>",
"environment": "<environment>",
"statement": "<statement>",
"parameters": "<parameters>",
"confirmed": "<confirmed>"
},
"name": "database_write"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| confirmed | Yes | ||
| statement | Yes | One direct INSERT, UPDATE or DELETE, max 64 KiB UTF-8; entire JSON request is limited to 65,600 bytes. | |
| parameters | Yes | JSON values, at most 8 levels and 10000 nodes, max 64 KiB encoded. | |
| project_id | Yes | Project identifier. | |
| environment | Yes | ||
| idempotency_key | Yes | Identifies one mutation and its canonical request payload. |