Skip to main content

Droost: Database Create (INSERT)

droost_db_create Write (gated)

Module: Droost core

Raw SQL INSERT for the rare case no entity or config API path exists (custom tables, fixtures). Prefer droost_entity_create for anything entity-shaped — this bypasses hooks and validation. Gated + CLI-only.

Example call
{
    "tool": "droost_db_create",
    "arguments": {
        "query": "INSERT INTO droost_demo (name, value) VALUES ('answer', '42')"
    }
}
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 INSERT statement. Disabled unless droost.settings.allow_destructive is on, and only over the CLI/STDIO transport. For SELECTs use droost_db_read; for DDL use droost_eval.

Input schema (JSON Schema)
{
    "type": "object",
    "properties": {
        "query": {
            "type": "string",
            "description": "A single INSERT statement, e.g. \"INSERT INTO my_table (a, b) VALUES (1, 2)\"."
        }
    },
    "required": [
        "query"
    ]
}