fix(microsoft-planner): align with live Graph API docs, add plan CRUD + categories#5486
Conversation
… + categories - fix update_task never returning updated task (missing Prefer: return=representation) - fix wrong @odata.type on task assignments (missing leading #) - fix update_plan/update_plan_details/update_bucket/update_task_details crashing on 204 No Content responses to PATCH (Graph sometimes ignores Prefer header) - add .trim() on path IDs across tools invoked outside the block - add create_plan, update_plan, delete_plan, get_plan_details, update_plan_details tools (If-Match/etag handled correctly on update/delete) - add appliedCategories support on create_task/update_task - all new tools verified against Graph API Permissions tables to require only scopes we already request (Group.ReadWrite.All, Group.Read.All, Tasks.ReadWrite) - regenerate integration docs
7 tools were pinned to the generic 'nested-error-object' extractor instead of MICROSOFT_GRAPH_ERRORS, losing Graph's inner-error detail (e.g. ETag mismatch specifics) that sibling Microsoft integrations (Excel, OneDrive, SharePoint) already surface correctly.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview Task and Graph fixes: Block UX: New plan operations and fields ( Several tools switch from the generic error extractor to Reviewed by Cursor Bugbot for commit b10667f. Configure here. |
Greptile SummaryThis PR fixes several bugs in the Microsoft Planner integration (missing
Confidence Score: 5/5Safe to merge — all PATCH tools now correctly handle 204 responses, the @odata.type fix and Prefer header addition are straightforward corrections, and the five new plan tools follow the established tool pattern consistently. The bug fixes are targeted and verified: the Prefer header is now in every PATCH tool, the @odata.type prefix correction matches the Graph API spec, and the 204 guard prevents JSON-parse crashes. The new plan tools are additive with no regressions to existing tools and use the same request/response structure as the bucket and task tools. No files require special attention. The five new tool files and the updated block routing are straightforward, and the previously flagged missing errorExtractor and appliedCategories issues have been addressed in the HEAD commit. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[MicrosoftPlannerBlock getToolParams] --> B{operation}
B --> C[create_plan new]
B --> D[update_plan new]
B --> E[get_plan_details new]
B --> F[update_plan_details new]
B --> G[delete_plan new]
B --> H[create_task / update_task updated]
B --> I[update_bucket / update_task_details updated]
C --> C1[POST /planner/plans - 201 + plan body]
D --> D1[PATCH /planner/plans/id - Prefer return=representation - 200 or 204]
E --> E1[GET /planner/plans/id/details - 200 + planDetails + etag]
F --> F1[PATCH /planner/plans/id/details - Prefer return=representation - 200 or 204]
G --> G1[DELETE /planner/plans/id - If-Match etag - 204]
H --> H1[Fixed @odata.type prefix - Added Prefer header - New appliedCategories]
I --> I1[Fixed MICROSOFT_GRAPH_ERRORS extractor - Fixed 204 handling]
D1 --> D2{body empty?}
D2 -->|Yes 204| D3[return planId from params]
D2 -->|No 200| D4[parse and return plan]
F1 --> F2{body empty?}
F2 -->|Yes 204| F3[return planId from params]
F2 -->|No 200| F4[parse and return planDetails]
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
A[MicrosoftPlannerBlock getToolParams] --> B{operation}
B --> C[create_plan new]
B --> D[update_plan new]
B --> E[get_plan_details new]
B --> F[update_plan_details new]
B --> G[delete_plan new]
B --> H[create_task / update_task updated]
B --> I[update_bucket / update_task_details updated]
C --> C1[POST /planner/plans - 201 + plan body]
D --> D1[PATCH /planner/plans/id - Prefer return=representation - 200 or 204]
E --> E1[GET /planner/plans/id/details - 200 + planDetails + etag]
F --> F1[PATCH /planner/plans/id/details - Prefer return=representation - 200 or 204]
G --> G1[DELETE /planner/plans/id - If-Match etag - 204]
H --> H1[Fixed @odata.type prefix - Added Prefer header - New appliedCategories]
I --> I1[Fixed MICROSOFT_GRAPH_ERRORS extractor - Fixed 204 handling]
D1 --> D2{body empty?}
D2 -->|Yes 204| D3[return planId from params]
D2 -->|No 200| D4[parse and return plan]
F1 --> F2{body empty?}
F2 -->|Yes 204| F3[return planId from params]
F2 -->|No 200| F4[parse and return planDetails]
Reviews (5): Last reviewed commit: "fix(microsoft-planner): don't return a s..." | Re-trigger Greptile |
- fix empty priority/percentComplete string coercing to 0 (Number('')) at
the block layer, which Planner treats as urgent/0% instead of leaving unset
- support removing applied categories on update via a "-category3" prefix,
since Graph only clears a label when its key is explicitly set to false
- add missing MICROSOFT_GRAPH_ERRORS extractor to delete_plan/get_plan_details
|
@greptile review |
|
@cursor review |
…response Graph's If-Match update changes the resource's etag even when it returns 204 No Content instead of the updated representation. Returning the request's (now-stale) etag as if it were current would let a chained update silently send a wrong If-Match and fail with 412. Return an empty etag instead so update_task's own etag-required guard forces a re-fetch.
|
@greptile review |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit b10667f. Configure here.
|
@greptile review |
|
@greptile review |
Summary
update_tasknever returning the updated task (missingPrefer: return=representation)@odata.typeon task assignments (missing leading#)update_plan/update_plan_details/update_bucket/update_task_detailscrashing on204 No Contentresponses to PATCH (Graph sometimes ignores thePreferheader).trim()on path-interpolated IDs across tools that can be invoked directlycreate_plan,update_plan,delete_plan,get_plan_details,update_plan_detailstools, with correct If-Match/etag handlingappliedCategoriessupport oncreate_task/update_taskAll new tools verified against Microsoft Graph's per-endpoint Permissions tables to require only the scopes we already request (
Group.ReadWrite.All,Group.Read.All,Tasks.ReadWrite) — no new scopes added.Type of Change
Testing
Tested manually. Ran three independent full-integration validation passes against live Microsoft Graph API docs (all 18 tools, backwards-compatibility audit, block/tool wiring + cross-integration consistency) before opening this PR.
Checklist