Skip to content

Add support for capturing ETag values from Microsoft Graph responses #120

@JeremyVyska

Description

@JeremyVyska

Problem Description

Currently, the MCP server doesn't expose HTTP response headers from Microsoft Graph API calls. This creates a significant limitation when trying to update resources that require optimistic concurrency control, such as:

  • Planner tasks (mcp_ms365_update-planner-task)
  • Planner task details (mcp_ms365_update-planner-task-details)
  • Calendar events
  • Other Microsoft Graph resources that require ETag values

Current Behavior

  • GET operations return JSON response bodies but not HTTP headers
  • ETag values are not accessible through the MCP interface
  • Update operations fail with 400 errors when trying to use * as ETag value
  • Users cannot perform reliable updates to Planner tasks or other resources

Expected Behavior

  • Optional access to response headers, particularly ETag values
  • Ability to perform proper optimistic concurrency updates
  • Backward compatibility with existing tool usage

Use Case Example

Planner Task Updates:

  1. Get a Planner task to see current state
  2. Need the ETag value from response headers to update it
  3. Update the task using the ETag in If-Match header
  4. Currently impossible due to missing ETag access

Impact

  • Planner task management workflows are severely limited
  • Cannot implement robust task update patterns
  • Data consistency issues when multiple agents/users work with same resources

Proposed Solution

Add an optional includeHeaders parameter to GET operations that:

  • Captures response headers when requested
  • Returns ETag values in a standardized format
  • Maintains backward compatibility
  • Enables proper Microsoft Graph update patterns

This would unlock full Planner task management capabilities and other Microsoft Graph update scenarios.

Technical Details

  • Affects: src/graph-client.ts and src/graph-tools.ts
  • Backward compatible: Optional parameter, existing usage unchanged
  • Response format: Adds _etag field when includeHeaders: true

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions