Skip to main content

Droost: Database Update

droost_db_update Write (gated)

Module: Droost core

Raw SQL UPDATE with the same guardrails as db_delete (confirm + WHERE required). Entity fields belong to droost_entity_update — this is for maintenance surgery. Gated + CLI-only.

Example call
{
    "tool": "droost_db_update",
    "arguments": {
        "query": "UPDATE node_field_data SET sticky = 0 WHERE type = 'tool'",
        "confirm": true
    }
}
Example response — captured live on this site
{
    "success": false,
    "message": "This tool is disabled. Enable it with: drush config:set droost.settings allow_destructive true (or via Admin → Configuration → Development → Droost), then reload the MCP server in your editor — the running server caches this flag at startup and will keep refusing until it is restarted. (To disable later, use --input-format=yaml false so the value is stored as a real boolean.)",
    "data": null
}

Runs a single UPDATE statement. An UPDATE with no WHERE clause is refused unless "confirm" is true. Disabled unless droost.settings.allow_destructive is on, and only over the CLI/STDIO transport.

Input schema (JSON Schema)
{
    "type": "object",
    "properties": {
        "query": {
            "type": "string",
            "description": "A single UPDATE statement, e.g. \"UPDATE node_field_data SET status = 1 WHERE nid = 5\"."
        },
        "confirm": {
            "type": "boolean",
            "description": "Set true to allow an UPDATE that has no WHERE clause (affects every row)."
        }
    },
    "required": [
        "query"
    ]
}