anthropics / anthropics/claude-ai-mcp

read_resource silently truncates mail folder collections

Aperta
#747 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
bug
Lingua principale
Nessun dato sulla lingua
Stelle
471
Fork
77
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

### What happened?

read_resource on a mail folder URI returns truncated collections with no pagination and no truncation marker. Two caps:

children caps at 10, alphabetically. No @odata.nextLink, no continuation token. A ?$top=100 query string on the URI is ignored.
messages caps at 50. Observed 50 returned against totalItemCount: 60, and 50 against totalItemCount: 84.

outlook_email_search against the same folder does this correctly — it returns moreResults, nextOffset and totalResultCount, and pages. The two tools disagree about whether the caller is entitled to know the result is incomplete.

### What did you expect to happen?

Either the complete collection, or a paginated response carrying the same completeness signals the search tool already emits.

### Steps to reproduce

1. read_resource uri mail:///folders/msgfolderroot on a mailbox with more than 10 root folders — exactly 10 children, no continuation.
2. Repeat as mail:///folders/msgfolderroot?$top=100 — query string ignored, identical 10.
3. read_resource uri mail:///folders/ — full list returned, confirming the data is reachable.
4. read_resource uri mail:///folders/{folderId} for a folder with >50 items — 50 messages returned, totalItemCount shows the true figure, nothing marks the gap.
5. outlook_email_search scoped to the same folder — correct pagination and totals.

### Area

Resource Handling

### MCP Server (if applicable)

Microsoft 365 (Anthropic-hosted, microsoft365.mcp.claude.com)

### Error messages or logs

```shell

```

### Additional context

Microsoft Graph documents a default page size of 10 for mailFolders and supplies @odata.nextLink: https://learn.microsoft.com/en-us/graph/api/user-list-mailfolders?view=graph-rest-1.0 — the connector appears to issue one unpaginated call and discard the link. Graph supplies the same for messages.

Suggested fix: follow @odata.nextLink (or honour $top) in the children path; add an offset or cursor to the folder-read path; emit moreResults / nextOffset on both.

Impact: sufficient on its own to produce a confident false negative. A user asks whether anyone replied in a folder holding more than 50 messages, the model reads 50, and answers from an incomplete set with nothing indicating incompleteness.

Related: [link Issue A].

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Start by locating the read_resource and outlook_email_search entry points for Microsoft 365 mail folders, then compare how each handles Graph collection responses and pagination. Done means read_resource no longer silently returns incomplete children or messages and exposes completeness signals comparable to the search tool; no source files are identified in the issue.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Ambito
api, backend
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Tranquilla
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.