Azure / Azure/data-api-builder

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

Aperta
#2,949 1 commento 0 reazioni 1 assegnatario Rivendicata da @RubenCerna2079 Vedi su GitHub
2.x auto-config mcp-server
Lingua principale
C#
Stelle
1.5k
Fork
370
Merge medio
3g 22h
PR unite (30g)
9

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.