Azure / Azure/data-api-builder

Mark MCP tools as readonly for M365 federated connector support.

Open
#3,798 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
1.5k
Forks
370
Avg merge
3d 17h
Merged PRs (30d)
8

Description

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.