> For the complete documentation index, see [llms.txt](https://docs.dapta.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dapta.ai/dapta-mcp/skills/dapta-databases.md).

# Dapta Databases

Ask Claude to read and change the Dapta databases where your automations keep their state: find tables, read rows, add, update and delete rows, and create new databases and tables.

Dapta databases are where automations keep their state between runs: the locks a flow sets, how many attempts a lead has had, when to dial next. Once Dapta is connected, you can ask Claude to read and change them.

{% hint style="info" %}
Every write uses a **preview, then confirm** flow. After a change, Claude reads the rows back to confirm what was written.
{% endhint %}

## Find and read data

Ask Claude which databases and tables you have, what columns a table holds, and what is in it. Claude describes the columns before trusting them, and pages and filters large tables so a single page is never mistaken for the whole table.

**Try saying:**

* "Which Dapta databases does this workspace have?"
* "What columns does the leads table have?"
* "Show me the rows where attempts is greater than 3."

**You get back:** The list of databases and tables, a table's columns, or the rows you asked for, with a note when there are more rows than shown.

**Writes data?** No, read-only.

**Behind the scenes:** `list_dapta_databases`, `list_dapta_database_tables`, `describe_dapta_table`, `query_dapta_table_rows`.

***

## Add, update and delete rows

Ask Claude to change the rows in a table.

When you add rows, you can also name a column that identifies each row, such as a phone number. A new row whose value already exists in the table updates that row instead of adding a second copy, and a row with no match is added. That column has to point to exactly one row, because Dapta tables don't enforce unique values: Claude refuses the change if a value matches more than one existing row, if two of the new rows share a value, or if a row has no value in that column. Remove the duplicates first, or use a column whose values are unique. You can add up to 100 rows at a time.

**Try saying:**

* "Add these three leads to the follow-up table."
* "Add these leads, and update the ones whose phone number is already in the table."
* "Reset the attempts counter for this phone number."
* "Delete the rows marked as test."

**You get back:** A preview of exactly which rows will be added, changed or removed. When you add rows by a key column, the preview shows which rows are new and which update an existing row. After you confirm, Claude applies the change and reads the rows back.

**Writes data?** Yes, via preview then confirm. Updating and deleting rows changes or removes existing data, and adding rows by a key column can change existing rows.

**Behind the scenes:** `preview_insert_dapta_rows` (with an `upsert_key` to update matching rows) and `commit_insert_dapta_rows`, `preview_update_dapta_rows` and `commit_update_dapta_rows`, `preview_delete_dapta_rows` and `commit_delete_dapta_rows`.

***

## Create a database or a table

Ask Claude to create a new Dapta database, or a new table in an existing one.

**Try saying:**

* "Create a Dapta database called Campaign State."
* "Create a table for call attempts with phone, attempts and next call date."

**You get back:** A preview of the database or table and its columns. After you confirm, it is created.

**Writes data?** Yes, via preview then confirm. Creating adds new data and changes nothing that exists.

**Behind the scenes:** `preview_create_dapta_database` and `commit_create_dapta_database`, `preview_create_dapta_table` and `commit_create_dapta_table`.

***

## Related

{% content-ref url="/pages/SM3rsbeMDyrcfIoYHgTg" %}
[Flow Studio](/dapta-mcp/skills/flow-studio.md)
{% endcontent-ref %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.dapta.ai/dapta-mcp/skills/dapta-databases.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
