# delete_row

Source: https://modulify.ai/docs/mcp/database/delete-row

Permanently deletes one row from a table in a site database, identified by its primary key.

- Title: Delete a row from a collection
- Scope: `data:write`
- Access: Destructive

The row is gone for good, with no undo. The tool tells the client to read it with `list_rows` first, tell you exactly what it is about to remove, and call this only once you have said yes.

A key matching no row is not an error: the call succeeds with `deleted` false, so read that field rather than the status. A row other collections point at either refuses to delete or, where the link cascades, takes those linked rows with it. The primary key column must be the table's own single-column primary key, so a call never deletes more than one row.

Files the row uses from the `CMS` folder of storage are deleted with it, unless another row of the same collection still uses them. See [Duplicate, export or delete an item](https://modulify.ai/docs/data/cms#duplicate-export-or-delete-an-item).

## Inputs

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `projectId` | string | Yes | The site id. |
| `schema` | string | No | The schema the collection lives in, exactly as `list_collections` reports it. Leave it out to use the site database's own default, which is right unless `list_collections` showed something else. A site on the newer database always uses its default. |
| `name` | string | Yes | The table name. |
| `primaryKeyValue` | string | Yes | The primary key value of the row to delete. |
| `primaryKeyColumn` | string | No | The primary key column, when it is not the default `id`. It must be the table's own single-column primary key, so it never matches more than one row. |