microsoft / microsoft/work-iq

Graph API errors are masked because they are placed in `structuredContent` instead of `content`

Open
#180 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PowerShell
Stars
1k
Forks
132
Avg merge
5d 19h
Merged PRs (30d)
6

Description

When a tool call (like fetch or create) results in a Graph API error (e.g. 400 Bad Request due to an invalid object ID), the WorkIQ MCP server returns the raw error JSON inside the structuredContent  field and leaves the standard content array empty.
Because standard MCP clients (like the Copilot CLI) expect text in the content field, the actual Graph API error is completely swallowed and replaced with a generic "An error occurred invoking 'fetch'".
Expected behavior:
The MCP server should extract the human-readable error message from the Graph API response (e.g.  "Graph API Error 400: Invalid object identifier '<alias>@<domain>'" ) and include it as a text block in the standard content array so that LLMs and clients can gracefully recover and self-correct.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the MCP response handling for the fetch and create tool calls, then trace how Graph API errors are assigned to structuredContent and content. Reproduce a 400 invalid-object-ID response and verify that the human-readable error appears as a text block in content while clients can recover from it.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.