← All procedures
sqlite.execute
Execute a SQL statement (INSERT, UPDATE, DELETE)
MCPCLI- Package
- @procedures/sqlite · README
- Path
["sqlite","execute"]- CLI
mark sqlite execute --sql <string>- MCP tool
sqlite.execute on the dev-tools server- As data
{"$proc":["sqlite","execute"],"input":{}}
Use it
In TypeScript
import { Client, LocalTransport, PROCEDURE_REGISTRY } from "@procedures/client";
import "@procedures/sqlite/register"; // registers its procedures
const client = new Client(new LocalTransport({ registry: PROCEDURE_REGISTRY }));
const result = await client.exec(["sqlite","execute"], { sql: "<sql>" });
console.log(JSON.stringify(result));From the command line
$ mark sqlite execute --sql <string>
As data, in a program
{ "$proc": ["sqlite", "execute"], "input": { "sql": "<sql>" } }Input
Output
JSON Schemas
{
"input": {
"type": "object",
"properties": {
"sql": {
"type": "string",
"description": "The SQL statement or script (INSERT, UPDATE, DELETE, CREATE TABLE, ...)"
},
"params": {
"description": "The values of the ? placeholders of the SQL, in order",
"type": "array",
"items": {}
},
"dbPath": {
"description": "The SQLite database file (default: the CLI log database, ~/logs/cli/cli.db). A query does not make a missing file, and a write makes it.",
"type": "string"
}
},
"required": [
"sql"
]
},
"output": {
"type": "object",
"properties": {
"changes": {
"type": "number",
"description": "The number of rows that the statements changed"
}
},
"required": [
"changes"
],
"additionalProperties": {}
}
}