-
Notifications
You must be signed in to change notification settings - Fork 117
Open
Description
Email filtering functionality broken in MCP server
Environment
- Client: Claude Desktop
Problem Description
The MCP server fails to properly filter emails when using the list-mail-messages tool. Multiple filtering approaches result in various errors, making it impossible to retrieve emails from specific senders.
Steps to Reproduce
- Connect Claude Desktop to the MCP server
- Request: "Find last 5 e-mails from [email protected]"
- Observe the MCP server attempting various filtering methods
Expected Behavior
The server should successfully filter and return the last 5 emails from the specified sender.
Actual Behavior
Multiple failed attempts with different error responses:
Attempt 1 - OData Filter
Request:
{
"top": 5,
"filter": "from/emailAddress/address eq '[email protected]'",
"select": null,
"orderby": null
}Response:
Error executing code: Cannot convert undefined or null to object
Attempt 2 - Simplified Filter
Request:
{
"top": 5,
"filter": "from/emailAddress/address eq '[email protected]'"
}Response:
{"error":"Microsoft Graph API error: 504 Gateway Timeout"}Attempt 3 - Search Parameter
Request:
{
"top": 5,
"search": "from:[email protected]"
}Response:
{"error":"Microsoft Graph API error: 400 Bad Request"}Attempt 4 - Large Result Set
Request:
{ "top": 50 }Response:
result exceeds maximum length of 1048576
Analysis
The issues suggest multiple problems:
- Null/undefined handling: The first error indicates improper handling of null/undefined values in filter parameters
- OData filter syntax: The filter syntax may be incorrect for Microsoft Graph API
- Search parameter format: The search syntax doesn't match Graph API expectations
- Response size limits: Large responses exceed the MCP response size limit
- API timeout: Some requests result in gateway timeouts
Metadata
Metadata
Assignees
Labels
No labels