Execute Statement
sqlite_executeRun a single modifying or DDL SQL statement against a SQLite database, such as INSERT, UPDATE, DELETE, CREATE, ALTER, or DROP, with named parameters to apply updates, deletes, and schema changes.
Instructions
Run one modifying SQL statement: INSERT, UPDATE, DELETE, REPLACE, CREATE, ALTER or DROP.
Use this for updates, deletes and schema changes. For a single INSERT prefer sqlite_insert_row, which validates columns and returns the new row. For reads use sqlite_query.
One statement per call: a batch would be silently truncated by SQLite, so extra statements are rejected. Use named placeholders ($name) with params instead of interpolating values.
Example: {"sql": "UPDATE books SET stock = stock - $n WHERE id = $id", "params": {"n": 2, "id": 5}} -> {"changes": 1}. A result of 0 changes means the WHERE clause matched nothing; call sqlite_query first to confirm the rows exist.
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": "sqlite_execute"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | One modifying or DDL statement. Named placeholders look like $id. | |
| params | No | Values for named placeholders, keyed without the "$", e.g. {"id": 5} |