Skip to main content

Droost: Database Schema

droost_db_schema Read-only

Module: Droost core

Table structures straight from the database: columns, types, indexes — or the table list when called bare. Pair with droost_db_read to write correct SQL the first time.

Example call
{
    "tool": "droost_db_schema",
    "arguments": {
        "table": "node_field_data"
    }
}
Example response — captured live on this site
{
    "success": true,
    "message": "Table \"node_field_data\": 18 column(s).",
    "data": {
        "table": "node_field_data",
        "columns": [
            {
                "name": "nid",
                "type": "int",
                "nullable": false,
                "default": null
            },
            {
                "name": "vid",
                "type": "int",
                "nullable": false,
                "default": null
            },
            {
                "name": "type",
                "type": "varchar",
                "nullable": false,
                "default": null
            },
            {
                "name": "langcode",
                "type": "varchar",
                "nullable": false,
                "default": null
            },
            {
                "name": "status",
                "type": "tinyint",
                "nullable": false,
                "default": null
            },
            {
                "name": "uid",
                "type": "int",
                "nullable": false,
                "default": null
            },
            {
                "name": "title",
                "type": "varchar",
                "nullable": false,
                "default": null
            },
            {
                "name": "created",
                "type": "int",
                "nullable": false,
… (truncated — run it yourself for the rest)

Reports the database schema. No arguments: list tables. With "table": that table's columns (name, type, nullable, default). Read-only.

Input schema (JSON Schema)
{
    "type": "object",
    "properties": {
        "table": {
            "type": "string",
            "description": "Table name to describe, e.g. \"node_field_data\". Omit to list tables."
        },
        "limit": {
            "type": "integer",
            "description": "Max table names to return when listing (default 200, max 2000)."
        }
    }
}