Azure / Azure/data-api-builder
[Enh]: For auto-config entities support `stored-procedures`
- Dominant language
- C#
- Stars
- 1.5k
- Forks
- 370
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 8
Description
## What?
Auto-entities automatically add tables. Extend this feature to also include stored procedures discovered from database metadata.
## Why?
* Enables customers who encapsulate logic in stored procedures to expose them without manual configuration.
* Expands compatibility with database architectures that rely heavily on procedures.
* Reduces configuration overhead when onboarding existing databases.
## How?
Add a `source-type` option that supports `table` (default) and `stored-procedure`.
### When `stored-procedure` is enabled:
* Procedures are discovered through metadata queries.
* Parameters are automatically included as inputs.
* The generated entity exposes an `execute` action.
* MCP tool names are generated using a template pattern.
### Add a template property for MCP tools.
```
template.mcp.custom-tool = {schema}{object}{parameter}
```
This provides both basic REST/GraphQL execution support as well as MCP tool support.
## Configuration
```json
{
"autoentities": {
"default": {
"source-type": ["stored-procedure"] // default: ["table"]
}
}
}
```
An autoentity may include more than one type.
### Example:
```json
{
"autoentities": {
"default": {
"source-type": ["table", "stored-procedure"]
}
}
}
```
## Command Line
```
dab auto-config --source-type "table,stored-procedure"
```
## Notes
* Stored procedures map to `execute` actions rather than CRUD operations.
* Procedure parameters are exposed as request inputs.
* Result sets returned by the procedure are returned as the API response.
Contributor guide
Assessment
This issue has not been assessed yet.