> ## Documentation Index
> Fetch the complete documentation index at: https://docs.auxilian.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# drop_column

> Permanently remove a column and its data from a table.

Removes a column from a table, along with its values in every row.

| | |
| - | - |
| Scope | `mcp:write` |
| Annotations | `destructiveHint: true` |
| Activity event | `column.dropped` |

<Warning>
  The column's data can't be recovered. Export the table first if you might need it. See [Export to CSV](/app/export).
</Warning>

## Parameters

<ParamField body="projectId" type="string" required>
  Project id from `list_projects`. You need write access.
</ParamField>

<ParamField body="table" type="string" required>
  Table name.
</ParamField>

<ParamField body="column" type="string" required>
  The column to drop. Can't be `id` or `created_at`.
</ParamField>

## Result

The table's updated definition. Same shape as the [`describe_table`](/mcp/tools/describe-table) result.

## Example

```json Arguments theme={null}
{ "projectId": "01k7m3x9q2v8d4h6n1r5t0w2yz", "table": "books", "column": "details" }
```

```json Result theme={null}
{
  "data": {
    "table": "books",
    "columns": [
      { "name": "id", "type": "uuid", "nullable": false, "default": "gen_random_uuid()" },
      { "name": "created_at", "type": "timestamptz", "nullable": false, "default": "now()" },
      { "name": "title", "type": "text", "nullable": false },
      { "name": "rating", "type": "integer" }
    ]
  }
}
```

## Errors

| Code | When |
| - | - |
| `ACCESS_DENIED` | You don't have write access, or the connection is read-only |
| `VALIDATION` | Unknown table or column, a system column, or the table's last remaining column of its own |

## Notes

* If the column has a foreign key, the foreign key is removed with it.
* A table must keep at least one column besides `id` and `created_at`. To remove the last one, use [`drop_table`](/mcp/tools/drop-table).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.