Azure / Azure/data-api-builder

[Enh]: For auto-config entities support `stored-procedures`

Offen
#2,949 1 Kommentar 0 Reaktionen 1 zugewiesene Person Beansprucht von @RubenCerna2079 Auf GitHub ansehen
2.x auto-config mcp-server
Vorherrschende Sprache
C#
Sterne
1.5k
Forks
370
Ø Merge
3 T. 22 Std.
Gemergte PRs (30 T.)
9

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.