feat: Add includeHeaders parameter to capture ETag values for Microsoft Graph operations #121
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR implements support for capturing ETag values and other HTTP response headers from Microsoft Graph API operations, enabling proper optimistic concurrency control for updates.
Problem Solved
Fixes #120 - Previously, ETag values were not accessible through the MCP interface, preventing reliable updates to Planner tasks and other Microsoft Graph resources that require optimistic concurrency.
Changes Made
1. Added
includeHeaders
Parametersrc/graph-tools.ts
includeHeaders
boolean parameter to all GET operations2. Enhanced Response Processing
src/graph-client.ts
graphRequest
method to capture and return ETag valuesincludeHeaders: true
, response includes_etag
field with ETag valueUsage Example
Before (ETag not accessible):
After (ETag support):
Testing
✅ Verified functionality:
Backward Compatibility
✅ Fully backward compatible:
Impact
This change enables:
Technical Notes
W/"base64-encoded-value"
_etag
field whenincludeHeaders: true
Closes #120