list_tables
List Tables
List all tables in a database branch. Returns table names and optionally their column schemas.
list_tables
List all tables in a database branch. Returns table names and optionally their column schemas.
update_record
Update an existing record in a Xata table by its ID. Only the provided fields will be updated; other fields remain unchanged. Use upsert mode to create the record if it doesn't exist.
aggregate_table
Run analytics aggregations on a table using the search/analytics engine. Supports count, sum, average, min, max, unique count, date histograms, top values, percentiles, and nested sub-aggregations.
get_branch
Get detailed information about a specific database branch, including its schema, tables, and metadata.
delete_record
Delete a record from a Xata table by its ID.
create_table
Create a new table in a database branch.
create_database
Create a new database in the configured workspace. Optionally specify a region and initial branch name.
list_workspaces
List all workspaces accessible to the authenticated user. Useful for discovering available workspaces and their IDs.
delete_table
Delete a table and all its records from a database branch. This action cannot be undone.
create_record
Insert a new record into a Xata table. Optionally specify a custom ID; otherwise, one is auto-generated. Supports bulk inserts by providing an array of records.
ask_ai
Ask a natural language question about data in a Xata table and get an AI-generated answer. The AI searches relevant records and synthesizes a response. Supports follow-up questions using session IDs for conversational context.
query_records
Query and filter records from a Xata table. Supports filtering with operators, sorting, column selection, and cursor-based pagination. Use this to retrieve records matching specific criteria or to list all records in a table.
delete_database
Permanently delete a database and all its branches, tables, and data. This action cannot be undone.
create_branch
Create a new database branch using Xata's copy-on-write branching. The new branch shares storage with its parent and only stores differences. Dev branches can scale to zero when inactive.
vector_search
Perform vector-based similarity search on a table column that contains vector embeddings. Use this for semantic search, recommendation systems, or any nearest-neighbor lookup. Requires a column of type "vector" with a fixed dimension.
add_table_column
Add a new column to an existing table. Supports all Xata column types including string, int, float, bool, text, email, datetime, vector, link, file, and json.
summarize_table
Run strongly consistent calculations (count, sum, average, min, max) on groups of data. Use this for real-time statistics and group-by operations without relying on the eventually consistent search store.
list_databases
List all databases in the configured workspace. Returns database names, regions, and metadata.
delete_branch
Delete a database branch. This removes the branch and any data unique to it.
execute_transaction
Execute multiple record operations (insert, update, delete, get) as a single atomic transaction. All operations succeed together or fail together, ensuring data consistency.
get_record
Retrieve a single record by its ID from a Xata table. Optionally select specific columns to return.
get_table_schema
Get the schema (column definitions) of a specific table. Useful for understanding the structure of a table before querying or inserting data.
search_records
Run a free-text search across a single table or the entire database branch. Powered by the Elasticsearch-based search engine with support for fuzziness, column boosting, and filters. Results are ranked by relevancy.
list_branches
List all branches of a Xata database. Returns branch names, creation times, and metadata.
Manage serverless PostgreSQL databases with branching, schema migrations, and record CRUD operations. Create, query, update, and delete records across tables with support for filtering, sorting, and pagination. Perform free-text search, vector similarity search, and aggregations across database content. Ask AI-powered natural language questions about your data. Create and manage database branches using copy-on-write for dev environments and experimentation. Execute zero-downtime, reversible schema migrations. Manage file attachments with CDN delivery. Summarize and aggregate data with grouping and statistical operations. Manage workspaces, projects, databases, and members. Set up replication and data streaming from external PostgreSQL sources. Configure webhooks for event notifications.
Common questions about connecting Xata to AI agents with Metorial.