Connect Xata to AI agents

Connect Xata to Claude, Codex, Cursor, or other AI agents for your entire team. Metorial security, governance, observability, and gives your team a unified Magic MCP url to connect.

Supported Tools

list_tables

List Tables

List all tables in a database branch. Returns table names and optionally their column schemas.

update_record

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

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 Branch Details

Get detailed information about a specific database branch, including its schema, tables, and metadata.

delete_record

Delete Record

Delete a record from a Xata table by its ID.

create_table

Create Table

Create a new table in a database branch.

create_database

Create Database

Create a new database in the configured workspace. Optionally specify a region and initial branch name.

list_workspaces

List Workspaces

List all workspaces accessible to the authenticated user. Useful for discovering available workspaces and their IDs.

delete_table

Delete Table

Delete a table and all its records from a database branch. This action cannot be undone.

create_record

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 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 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

Delete Database

Permanently delete a database and all its branches, tables, and data. This action cannot be undone.

create_branch

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

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 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

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 Databases

List all databases in the configured workspace. Returns database names, regions, and metadata.

delete_branch

Delete Branch

Delete a database branch. This removes the branch and any data unique to it.

execute_transaction

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

Get Record

Retrieve a single record by its ID from a Xata table. Optionally select specific columns to return.

get_table_schema

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

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 Branches

List all branches of a Xata database. Returns branch names, creation times, and metadata.

More integrations teams use with Xata

GitHub

Manage repositories, issues, and pull requests. Create and configure branches, star repositories, review code, and merge changes. Automate CI/CD workflows with GitHub Actions, manage workflow runs, secrets, and artifacts. Track issues with labels, milestones, and assignees. Search across code, repositories, issues, and users. Manage organizations, teams, and memberships. Create and manage projects, gists, packages, deployments, and environments. Access security alerts including code scanning, secret scanning, and Dependabot alerts. Read and write file contents in repositories. Manage webhooks, notifications, and codespaces.

Sharepoint

Manage SharePoint sites, document libraries, lists, and files. Create, read, update, and delete lists and list items with custom columns. Upload, download, move, copy, and version files in document libraries. Search across sites, files, folders, lists, and list items using Microsoft Search. Manage permissions at site, list, and item levels with granular access control. Define and manage content types and site columns. Subscribe to webhooks for list and library change notifications. Retrieve site properties and search for sites across Microsoft 365.

Salesforce

Manage CRM data including Accounts, Contacts, Leads, Opportunities, Cases, and custom objects. Create, read, update, and delete records. Query data using SOQL and search across objects using SOSL. Perform bulk data operations for large-scale imports, exports, and migrations. Execute composite requests to batch multiple operations in a single API call. Access analytics, reports, and dashboards. Manage files and attachments associated with records. Interact with Chatter feeds, posts, and groups for social collaboration. Subscribe to real-time change events via Change Data Capture and Platform Events. Manage org metadata including custom objects, fields, layouts, and workflows. Query data using GraphQL for precise data retrieval across related objects.

Airtable

Create, read, update, and delete records in Airtable bases and tables. Manage base schemas including creating tables and fields. Filter records using formulas, sort by fields, and scope queries to specific views. Upsert records to find, create, or update in a single call. Upload attachments to records, read and write record comments, list accessible bases, and receive real-time base change events through webhooks.

Bitbucket

Manage Git repositories, pull requests, and CI/CD pipelines on Bitbucket Cloud. Create, fork, and configure repositories within workspaces and projects. Create, review, approve, merge, and decline pull requests with inline code comments. Browse source code, list commits, and manage branches and tags. Track issues with the built-in issue tracker. Trigger, monitor, and manage Bitbucket Pipelines. List workspace members, configure repository default reviewers and branch restrictions, create and manage repository webhooks, and search code across repositories.

Heroku

Deploy, manage, and scale applications on Heroku's cloud platform. Create and configure apps, scale dynos, provision add-ons (databases, caching, etc.), manage configuration variables, build and release code, add custom domains and SSL certificates, manage collaborators and team permissions, configure pipelines for continuous delivery, set up log drains, and sync data with Salesforce via Heroku Connect. Subscribe to webhooks for real-time notifications on app changes, builds, releases, dyno lifecycle events, and more.

Technical notes for Xata

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.

Connect Xata to production AI agents

See how Metorial gives Xata access the governance, tracing, and security controls teams need.

Frequently asked questions

Common questions about connecting Xata to AI agents with Metorial.

  1. Can Metorial connect Xata to AI agents?
    Yes. Metorial connects AI agents to Xata through a governed integration layer, so teams can use the provider while keeping access controlled and observable.
  2. Metorial is MCP compatible and lets teams expose approved provider tools to MCP-capable agents and clients through a controlled access layer.
  3. Metorial applies policies across users, groups, providers, agents, and individual tools, then records the context around every agent interaction.
  4. Yes. Metorial records provider activity so teams can inspect tool calls, troubleshoot integrations, and give security teams the visibility they need.