Astra DB
v2.0.0Astra DB tools for agents: schema, find, vector search, guarded writes, and interactive views.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
connection_status Astra DB connection status
Check whether Astra DB credentials are configured and working: where the token, endpoint, and keyspace come from (env, .env, plugin settings, Astra CLI), which database is targeted, and a live connectivity check. Call it first when another tool reports not_configured or an auth error.
| Parameter | Type | Description |
|---|---|---|
check | boolean | Make a live request to verify the connection (default true). |
list_databases List Astra databases
List the Astra databases this token can access (DevOps API): name, id, status, regions with Data API endpoints, and keyspaces. Use it to choose the `database` argument of other tools.
| Parameter | Type | Description |
|---|---|---|
include | string | active (default) or all non-terminated databases. |
database_overview Astra DB overview
Map a database: keyspaces → collections (vector dimension/metric, vectorize model, lexical/rerank, estimated counts) and tables (column and vector-column counts). Start here to see what exists. Renders an interactive overview.
| Parameter | Type | Description |
|---|---|---|
database | string | Database to use: name, id, or Data API endpoint URL. Omit for the configured default. |
emit | string | html_file also writes a self-contained HTML page and returns a link to it — only for terminal-only hosts, when the user asks for a visual. |
includeCounts | boolean | Estimated document counts per collection (one request each). |
keyspaces | array | Only these keyspaces (default: all). |
maxPerKeyspace | integer | Max collections/tables listed per keyspace. |
describe_collection Describe collection
Show one collection's configuration and shape: vector settings, vectorize and rerank services, lexical, indexing allow/deny, default id type, estimated count, and a sample document with field types. Use before writing queries or code against it.
| Parameter | Type | Description |
|---|---|---|
collection * | string | Collection name. |
database | string | Database to use: name, id, or Data API endpoint URL. Omit for the configured default. |
emit | string | html_file also writes a self-contained HTML page and returns a link to it — only for terminal-only hosts, when the user asks for a visual. |
includeSample | boolean | Include one sample document (vectors omitted). |
keyspace | string | Keyspace. Omit for the configured/default keyspace. |
describe_table Describe table
Show one table's schema: columns and types, primary key (partition and clustering columns), indexes, vector columns, and sample rows. Use before writing queries or code against it.
| Parameter | Type | Description |
|---|---|---|
table * | string | Table name. |
database | string | Database to use: name, id, or Data API endpoint URL. Omit for the configured default. |
emit | string | html_file also writes a self-contained HTML page and returns a link to it — only for terminal-only hosts, when the user asks for a visual. |
includeSample | boolean | Include up to 3 sample rows (vectors omitted). |
keyspace | string | Keyspace. Omit for the configured/default keyspace. |
find Find documents or rows
Read documents (collections) or rows (tables) with an optional Data API filter, sort, and projection. Returns pages of 20 plus nextPageState for more. For similarity search use vector_search. Renders an interactive explorer.
| Parameter | Type | Description |
|---|---|---|
name * | string | Collection or table name. |
database | string | Database to use: name, id, or Data API endpoint URL. Omit for the configured default. |
emit | string | html_file also writes a self-contained HTML page and returns a link to it — only for terminal-only hosts, when the user asks for a visual. |
filter | object | Data API filter, e.g. {"status": "active", "year": {"$gte": 2020}}. Typed ids as {"$uuid": "…"} / {"$objectId": "…"}. |
keyspace | string | Keyspace. Omit for the configured/default keyspace. |
kind | string | Only needed when a collection and a table share the name; otherwise detected. |
limit | integer | Documents to return (rounded up to whole pages of 20). |
pageState | string | nextPageState from a previous call, to continue paging. |
projection | object | Fields to include (1) or exclude (0), e.g. {"title": 1, "author": 1}. |
sort | object | Non-vector sort, e.g. {"createdAt": -1}. For similarity use vector_search. |
vector_search Vector search
Similarity search by natural-language `query` (server-side vectorize), an explicit `vector`, or `documentId` (more like this). `hybrid` combines vector and lexical (BM25) results with reranking on collections that have both. A filter narrows candidates. Returns ranked hits with similarity scores; renders an interactive results view.
| Parameter | Type | Description |
|---|---|---|
name * | string | Collection or table name. |
database | string | Database to use: name, id, or Data API endpoint URL. Omit for the configured default. |
documentId | Find items similar to this existing document (collections). | |
emit | string | html_file also writes a self-contained HTML page and returns a link to it — only for terminal-only hosts, when the user asks for a visual. |
filter | object | Data API filter, e.g. {"status": "active", "year": {"$gte": 2020}}. Typed ids as {"$uuid": "…"} / {"$objectId": "…"}. |
hybrid | boolean | Collections with lexical + rerank: combined vector + BM25 search, reranked. |
idType | string | How to interpret documentId (auto follows the collection's defaultId). |
keyspace | string | Keyspace. Omit for the configured/default keyspace. |
kind | string | Only needed when a collection and a table share the name; otherwise detected. |
limit | integer | How many hits. |
projection | object | Fields to include (1) or exclude (0), e.g. {"title": 1, "author": 1}. |
query | string | Natural-language text; embedded server-side (vectorize). |
vector | array | A query embedding (must match the dimension). |
vectorColumn | string | Tables only: which vector column to search (default: the only one). |
count Count documents
Exact count of documents in a collection matching a filter, up to upperBound (Data API maximum 1000); unfiltered counts also report the estimated total.
| Parameter | Type | Description |
|---|---|---|
name * | string | Collection name. |
database | string | Database to use: name, id, or Data API endpoint URL. Omit for the configured default. |
filter | object | Data API filter, e.g. {"status": "active", "year": {"$gte": 2020}}. Typed ids as {"$uuid": "…"} / {"$objectId": "…"}. |
keyspace | string | Keyspace. Omit for the configured/default keyspace. |
upperBound | integer | Stop counting at this many (Data API maximum 1000). |
distinct_values Distinct values
Distinct values of a field (dot paths allowed) across up to scanLimit documents or rows, optionally filtered — useful for discovering categories before filtering.
| Parameter | Type | Description |
|---|---|---|
field * | string | Field path, e.g. "genre" or "author.country". |
name * | string | Collection or table name. |
database | string | Database to use: name, id, or Data API endpoint URL. Omit for the configured default. |
filter | object | Data API filter, e.g. {"status": "active", "year": {"$gte": 2020}}. Typed ids as {"$uuid": "…"} / {"$objectId": "…"}. |
keyspace | string | Keyspace. Omit for the configured/default keyspace. |
kind | string | Only needed when a collection and a table share the name; otherwise detected. |
maxValues | integer | Max distinct values returned. |
scanLimit | integer | Max documents scanned. |
list_vectorize_providers Vectorize providers
List the embedding (vectorize) and reranking providers and models available to the database, with dimensions and authentication options. Use before create_collection with a vectorize service.
| Parameter | Type | Description |
|---|---|---|
database | string | Database to use: name, id, or Data API endpoint URL. Omit for the configured default. |
kind | string |
code_examples Data API code examples
Canonical Data API client code for Python (astrapy), TypeScript (@datastax/astra-db-ts), Java, C#, and Go from the bundled, documentation-derived example library. Use when writing application code; snippets read ASTRA_DB_APPLICATION_TOKEN / ASTRA_DB_API_ENDPOINT from the environment.
| Parameter | Type | Description |
|---|---|---|
language * | string | Client language. |
query * | string | What the code should do, e.g. "create a vector collection with vectorize", "find with filter and sort". |
limit | integer | |
mode | string | content: include source; list: file names only. |
insert Insert documents or rows
Insert 1–1000 documents into a collection (or rows into a table), in chunks. On vectorize collections use "$vectorize": "text" to embed server-side; otherwise "$vector": [...] for your own embeddings. Reports inserted ids and any per-document errors.
| Parameter | Type | Description |
|---|---|---|
documents * | array | Documents (collections) or rows (tables). Use "$vectorize": "text" for server-side embeddings on vectorize collections. |
name * | string | Collection or table name. |
database | string | Database to use: name, id, or Data API endpoint URL. Omit for the configured default. |
keyspace | string | Keyspace. Omit for the configured/default keyspace. |
kind | string | Only needed when a collection and a table share the name; otherwise detected. |
ordered | boolean | Stop at the first error (default: insert what can be inserted). |
update Update documents or rows
Update the document/row matching a filter with operators ($set, $unset, $inc, $push, …). `many` updates every match (collections only); `many` or an empty filter requires the user's confirmation. `upsert` inserts when nothing matches.
| Parameter | Type | Description |
|---|---|---|
filter * | object | Data API filter, e.g. {"status": "active", "year": {"$gte": 2020}}. Typed ids as {"$uuid": "…"} / {"$objectId": "…"}. |
name * | string | Collection or table name. |
update * | object | Update operators, e.g. {"$set": {"status": "done"}, "$inc": {"views": 1}}. |
confirm | string | Set ONLY after you described the impact and the user approved it in a later message: the exact target name. The original request is not approval; never guess or self-approve. |
database | string | Database to use: name, id, or Data API endpoint URL. Omit for the configured default. |
keyspace | string | Keyspace. Omit for the configured/default keyspace. |
kind | string | Only needed when a collection and a table share the name; otherwise detected. |
many | boolean | Update every match (collections only). Requires confirmation. |
upsert | boolean | Insert when nothing matches (collections). |
delete Delete documents or rows
Delete the document/row matching a filter. `many` deletes every match; `many` or an empty filter requires the user's confirmation.
| Parameter | Type | Description |
|---|---|---|
filter * | object | Data API filter, e.g. {"status": "active", "year": {"$gte": 2020}}. Typed ids as {"$uuid": "…"} / {"$objectId": "…"}. |
name * | string | Collection or table name. |
confirm | string | Set ONLY after you described the impact and the user approved it in a later message: the exact target name. The original request is not approval; never guess or self-approve. |
database | string | Database to use: name, id, or Data API endpoint URL. Omit for the configured default. |
keyspace | string | Keyspace. Omit for the configured/default keyspace. |
kind | string | Only needed when a collection and a table share the name; otherwise detected. |
many | boolean | Delete every match. Requires confirmation. |
create_collection Create collection
Create a collection: plain JSON, vector (dimension + metric), or vectorize (server-side embeddings from a provider — see list_vectorize_providers), optionally with lexical (BM25) and rerank for hybrid search, indexing allow/deny, and a default id type. Idempotent when the settings match an existing collection.
| Parameter | Type | Description |
|---|---|---|
name * | string | New collection name (letters, digits, underscore). |
database | string | Database to use: name, id, or Data API endpoint URL. Omit for the configured default. |
defaultId | string | Auto-generated _id type. |
indexing | object | Index only (allow) or all but (deny) these fields. Deny large text fields you never filter on. |
keyspace | string | Keyspace. Omit for the configured/default keyspace. |
lexical | boolean | Enable BM25 lexical search (needed for hybrid). |
rerank | object | Reranking service (needed for hybrid). |
vector | object | Omit for a non-vector collection. |
create_table Create table
Create a table with typed columns (text, int, uuid, timestamp, map/list/set, vector…) and a primary key (partition columns plus optional clustering order). Then add indexes with create_index for columns you filter or vector-search on.
| Parameter | Type | Description |
|---|---|---|
columns * | object | Column types, e.g. {"id": "uuid", "title": "text", "tags": {"type": "set", "valueType": "text"}, "embedding": {"type": "vector", "dimension": 1024}}. |
name * | string | New table name. |
primaryKey * | A column name, or {"partitionBy": ["user_id"], "partitionSort": {"created_at": -1}}. | |
database | string | Database to use: name, id, or Data API endpoint URL. Omit for the configured default. |
ifNotExists | boolean | |
keyspace | string | Keyspace. Omit for the configured/default keyspace. |
create_index Create table index
Create an index on a table column: regular (filtering and sorting), vector (similarity search on a vector column), or text (BM25 lexical search). Collections index fields automatically.
| Parameter | Type | Description |
|---|---|---|
column * | string | Column to index. |
name * | string | Index name. |
table * | string | Table name (collections index automatically; use indexing on create_collection). |
database | string | Database to use: name, id, or Data API endpoint URL. Omit for the configured default. |
ifNotExists | boolean | |
keyspace | string | Keyspace. Omit for the configured/default keyspace. |
options | object | e.g. {"metric": "dot_product"} for vector, {"caseSensitive": false} for regular. |
type | string | regular (filtering), vector (similarity), text (BM25). |
drop Drop collection, table, or index
Permanently drop a collection, a table, or a table index, with all its data. Always requires the user's explicit confirmation.
| Parameter | Type | Description |
|---|---|---|
kind * | string | What to drop. |
name * | string | Name of the collection, table, or table index. |
confirm | string | Set ONLY after you described the impact and the user approved it in a later message: the exact target name. The original request is not approval; never guess or self-approve. |
database | string | Database to use: name, id, or Data API endpoint URL. Omit for the configured default. |
keyspace | string | Keyspace. Omit for the configured/default keyspace. |