Azure / Azure/data-api-builder

Mark MCP tools as readonly for M365 federated connector support.

Abierto
#3,798 1 comentario 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
C#
Estrellas
1.5k
Forks
370
Merge medio
3 d 22 h
PR fusionados (30 d)
9

Descripción

## Title
MCP tools missing `annotations` (readOnlyHint/destructiveHint) required by MCP spec and consumers like M365 Copilot Federated Connectors

## Summary
DAB's built-in MCP DML tools (`describe_entities`, `read_records`, `aggregate_records`, and presumably `create_record`/`update_record`/`delete_record`) do not emit an `annotations` object in their `tools/list` response. This blocks integration with MCP consumers that require tool annotations for safety validation — specifically, Microsoft 365 Copilot's federated connector, which rejects or silently drops tools lacking `readOnlyHint`.

## Current behavior
`tools/list` response for built-in tools has no `annotations` field, e.g.:

```json
{
"name": "read_records",
"description": "...",
"inputSchema": { ... }
}
```
## Expected behavior

Each tool should include an annotations object per the MCP spec, e.g.:

```json
{
"name": "read_records",
"description": "...",
"inputSchema": { ... },
"annotations": {
"readOnlyHint": true
}
}
```
At minimum, describe_entities, read_records, and aggregate_records should be marked readOnlyHint: true. Any write tools (create_record, update_record, delete_record) should be marked readOnlyHint: false and destructiveHint set appropriately (true for delete/update, false for create).

## Impact

Without this, DAB's MCP server cannot be registered as a custom connector in Microsoft 365 Copilot (and likely other MCP consumers enforcing the same validation), since these platforms require explicit read-only annotations before allowing a tool to be surfaced/executed.

## Environment
DAB version: 2.x (MCP support)
Consumer: Microsoft 365 Copilot federated connector (custom MCP connector)

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comienza con la respuesta tools/list del servidor MCP y localiza las definiciones integradas de herramientas DML para describe_entities, read_records, aggregate_records, create_record, update_record y delete_record. Compara su salida con los requisitos de anotaciones de MCP y, a continuación, verifica que las herramientas de solo lectura y de escritura expongan los valores esperados de readOnlyHint y destructiveHint.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
csharp
Área
api
Tipo de issue
Nueva funcionalidad
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Activo
Claridad
Bastante claro
Aptitud para principiantes
65/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.