From e9aec269e1d06503026c389a2dd3eb7391806b42 Mon Sep 17 00:00:00 2001 From: Quentin Machu Date: Tue, 10 Mar 2026 03:13:32 -0400 Subject: [PATCH] feat: auto-expand assignees in work item queries Always include 'assignees' in the expand parameter for get_work_item and list_work_items. This ensures callers receive UserLite objects with display names instead of bare UUIDs, making the API response immediately useful without a follow-up members lookup. --- plane_mcp/tools/work_items.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/plane_mcp/tools/work_items.py b/plane_mcp/tools/work_items.py index 49ceac1..a4763c2 100644 --- a/plane_mcp/tools/work_items.py +++ b/plane_mcp/tools/work_items.py @@ -178,6 +178,13 @@ def retrieve_work_item( """ client, workspace_slug = get_plane_client_context() + # Always expand assignees to get UserLite objects instead of bare UUIDs. + if expand: + if "assignees" not in expand: + expand = f"{expand},assignees" + else: + expand = "assignees" + params = RetrieveQueryParams( expand=expand, fields=fields, @@ -221,6 +228,13 @@ def retrieve_work_item_by_identifier( """ client, workspace_slug = get_plane_client_context() + # Always expand assignees to get UserLite objects instead of bare UUIDs. + if expand: + if "assignees" not in expand: + expand = f"{expand},assignees" + else: + expand = "assignees" + params = RetrieveQueryParams( expand=expand, fields=fields,