DAB Agent (Data API Builder)GitHub Copilot chat participant What is Data API Builder?Data API Builder (DAB) is a free, open-source tool from Microsoft that instantly creates:
All from a single JSON configuration file - no code required! DAB is a foundational component of Microsoft Fabric, making it enterprise-ready and high-performance. Supported Databases: SQL Server, Azure SQL, PostgreSQL, MySQL, Cosmos DB Features
|
| Skill | Purpose |
|---|---|
| dab-init | Initialize new DAB configurations |
| dab-add | Add database objects as API entities |
| dab-update | Modify entities, relationships, mappings |
| dab-configure | Change runtime settings |
| dab-validate | Validate configuration files |
| dab-start | Start the DAB engine |
Plus comprehensive documentation on:
- Entity configuration and permissions
- Relationship setup (one-to-many, many-to-many)
- MCP server integration
- Best practices and troubleshooting
Usage Examples
Initialize DAB
@dab Initialize a new DAB configuration
Creates a new configuration with auto-detected connection string from .env.
Add Database Objects
@dab Add the Products table with read permissions
Add tables, views, or stored procedures as API entities.
Configure Relationships
@dab Set up a relationship where Author has many Books
Set up one-to-many, many-to-many, or self-referencing relationships.
Enable MCP for AI
@dab Enable MCP and expose my stored procedures as AI tools
Configure MCP endpoints so AI assistants can query your database.
Troubleshoot Issues
@dab I'm getting a connection error, help me fix it
Get targeted help for common DAB problems.
Ask Questions
@dab How do I implement row-level security?
Get expert guidance powered by AI with full DAB documentation context.
Quick Start
Install the DAB CLI:
dotnet tool install -g Microsoft.DataApiBuilderCreate a
.envfile with your connection string:DATABASE_CONNECTION_STRING=Server=localhost;Database=MyDb;Integrated Security=true;TrustServerCertificate=trueInitialize: Type
@dab Initialize DABin Copilot ChatAdd entities: Type
@dab Add the Products table with read permissionsStart the API: Type
@dab Start the serverAccess your API:
- REST:
http://localhost:5000/api/Products - GraphQL:
http://localhost:5000/graphql
- REST:
Commands
| Command | Description |
|---|---|
DAB: Open DAB Chat |
Opens GitHub Copilot Chat with @dab prefilled |
Requirements
- Visual Studio Code 1.95.0 or higher
- GitHub Copilot Chat extension
- DAB CLI (recommended)
MCP Integration
Enable MCP to let AI assistants (Claude, Copilot, Cursor, etc.) interact with your database:
@dab Enable MCP for my database
After enabling, configure your AI client with:
{
"mcpServers": {
"my-database": {
"url": "http://localhost:5000/mcp"
}
}
}
Expose Stored Procedures as AI Tools
# Add the stored procedure
dab add GetBookById --source dbo.usp_GetBookById --source.type stored-procedure --permissions "anonymous:execute"
# Enable as MCP tool
dab update GetBookById --mcp.custom-tool true
Now AI assistants can call your stored procedure as a tool!
Learn More
| Resource | Link |
|---|---|
| Official Documentation | learn.microsoft.com/azure/data-api-builder |
| CLI Reference | dab command-line |
| Configuration Schema | Configuration reference |
| REST API | REST endpoints |
| GraphQL API | GraphQL endpoints |
| GitHub Repository | Azure/data-api-builder |
Related Extensions
This extension is part of the Data API Builder Extension Suite:
- DAB Omnibus - All commands in one package
- DAB Init - Initialize configurations
- DAB Add - Add entities
- DAB Start - Start/stop engine
- DAB Validate - Validate configs
- DAB Health - Health checks
- DAB Visualize - Visualize entities
- DAB POCO - Generate C# classes
License
MIT - See LICENSE.txt