From 113fe3992b8899086b2373e3bd41ac706c54e396 Mon Sep 17 00:00:00 2001 From: HHZ Date: Wed, 24 Jun 2026 06:47:19 +0100 Subject: [PATCH 1/6] Add Planner GET filtering guidance Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- plugins/workiq/skills/workiq/SKILL.md | 4 +--- plugins/workiq/skills/workiq/references/tasks-work-iq.md | 8 ++++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/plugins/workiq/skills/workiq/SKILL.md b/plugins/workiq/skills/workiq/SKILL.md index c912264..46e37f3 100644 --- a/plugins/workiq/skills/workiq/SKILL.md +++ b/plugins/workiq/skills/workiq/SKILL.md @@ -1,6 +1,6 @@ --- name: workiq -description: WorkIQ - Microsoft 365 tool surface for agents. Use for any workplace question or write action where data lives in M365. Supports semantic `ask` plus structured tools (`fetch`, create/update/delete, actions, functions, path/schema discovery) for mail, meetings/calendar, documents/files, Teams chats/channels, OneDrive/SharePoint, and people. Read triggers, "what did [person] say", priorities/top of mind, meeting decisions/action items, summarize thread/chat, find emails/docs, list meetings/messages/files/channels, project status/updates, "what changed since". Write triggers, send/reply/forward email, create/update/accept/decline meetings, mark read, delete drafts/items, send/post/reply/react in Teams, set presence, upload/download via web URL. Discovery triggers, available endpoints/paths, fields, required/updatable properties, request body, operation parameters, schema/data model. When in doubt about workplace context, try WorkIQ first. Prefer `ask` for synthesis; use entity tools for exact reads/writes. +description: WorkIQ - Microsoft 365 tool surface for agents. Use for any workplace question or write action where data lives in M365. Supports semantic `ask` plus structured tools (`fetch`, create/update/delete, actions, functions, path/schema discovery) for mail, meetings/calendar, documents/files, Teams chats/channels, Planner tasks/plans, OneDrive/SharePoint, and people. Read triggers, "what did [person] say", priorities/top of mind, meeting decisions/action items, summarize thread/chat, find emails/docs, list meetings/messages/files/channels, project status/updates, "what changed since". Write triggers, send/reply/forward email, create/update/accept/decline meetings, mark read, delete drafts/items, send/post/reply/react in Teams, set presence, upload/download via web URL. Discovery triggers, available endpoints/paths, fields, required/updatable properties, request body, operation parameters, schema/data model. When in doubt about workplace context, try WorkIQ first. Prefer `ask` for synthesis; use entity tools for exact reads/writes. compatibility: > Uses the hosted WorkIQ MCP endpoint. No local package is required for MCP tool calls. @@ -52,7 +52,6 @@ See [Resolving tool names in your host](#resolving-tool-names-in-your-host) belo | Listing files in a OneDrive/SharePoint folder | "List files in my OneDrive 'Specs' folder" | `fetch` | | Listing tasks/plans/buckets in Planner | "List my Planner tasks due this week" | `fetch` | | Listing / creating / completing Planner tasks | "Add a task to follow up with finance", "Mark my task done", "List my Planner tasks" | entity tools on `/planner/...` — see `references/tasks-work-iq.md` | -| List my To Do task lists | "Show me my to-do lists" | `fetch` (`/me/todo/lists`) — subject to server policy | | Get a personal contact by name | "Get the contact card for Morgan Avery" | `fetch` (`/me/contacts?$filter=...`) — subject to server policy | | List or manage Outlook categories | "What Outlook categories do I have?" | `fetch` (`/me/outlook/masterCategories`); writes subject to server policy | | Org chart / direct reports / manager lookup | "Who are Rob's direct reports?" | `fetch` (`/users/{id}/directReports`) | @@ -228,7 +227,6 @@ Entity tools provide **fast, direct access to specific M365 data** via Work IQ A | Planner | `/me/planner/plans`, `/planner/tasks` | list/create/update/complete/delete — see `references/tasks-work-iq.md` | | Teams | `/me/chats`, `/chats/{chatId}/messages`, `/me/joinedTeams`, `/teams/{teamId}/channels/{channelId}/messages`, `/me/presence` | chats vs channels are different surfaces — see `references/teams-work-iq.md` | | People | `/me`, `/users/{id}`, `/users/{id}/directReports`, `/me/manager`, `/me/contacts` | profile, org, contacts — see directory-vs-contacts warning below | -| To Do | `/me/todo/lists`, `/me/todo/lists/{listId}/tasks` | list/create/update/delete — **commonly policy-denied**, see note below | | Outlook categories | `/me/outlook/masterCategories` | list/get/create/update/delete — writes commonly policy-denied | | Files | `/me/drive`, `/drives/{id}`, `/sites/{id}` | list/get JSON metadata only — binary content (file bytes, attachment payloads) is not released yet, see the deny rule below | | Change tracking | `/me/mailFolders/inbox/messages/delta`, `/me/calendarView/delta?...`, `/me/contacts/delta` | "what's new/changed since" — via `call_function` only, never `fetch` | diff --git a/plugins/workiq/skills/workiq/references/tasks-work-iq.md b/plugins/workiq/skills/workiq/references/tasks-work-iq.md index f9e08cc..818fdbf 100644 --- a/plugins/workiq/skills/workiq/references/tasks-work-iq.md +++ b/plugins/workiq/skills/workiq/references/tasks-work-iq.md @@ -23,6 +23,14 @@ with…", "mark … done", or "list my tasks", that is M365 data: route it to Wo Planner task body fields: `planId`, `title`, `bucketId`, `assignments`, `dueDateTime`, `percentComplete` (`0` = not started, `50` = in progress, `100` = complete). +- **Fetch plans first** via `/me/planner/plans`, then fetch group plans via + `/groups/{group-id}/planner/plans` when group plans are referred. +- **Private tasks and "Assigned to me" tasks:** use `/me/planner/tasks`. +- **Enforce filtering on Planner collection GETs:** + - `GET /planner/plans` requires `$filter=owner eq '{Group or UserId}'`. + - `GET /planner/tasks` requires a `$filter` containing `planId`. + - `GET /planner/buckets` requires a `$filter` containing `planId`. + - **Mark a Planner task done:** `update_entity` with `{"percentComplete":100}`. - **Planner gotcha:** `update_entity` / `delete_entity` on Planner resources require the current `@odata.etag` (an `If-Match` precondition). Fetch the task first to From 8a514a0e64d016df48b2565d3d1677d0a9fb62aa Mon Sep 17 00:00:00 2001 From: HHZ Date: Wed, 24 Jun 2026 07:03:49 +0100 Subject: [PATCH 2/6] Mirror Planner guidance in WorkIQ preview Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- plugins/workiq-preview/skills/workiq-preview/SKILL.md | 4 +--- .../skills/workiq-preview/references/tasks-work-iq.md | 8 ++++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/plugins/workiq-preview/skills/workiq-preview/SKILL.md b/plugins/workiq-preview/skills/workiq-preview/SKILL.md index 8ae8485..51890cf 100644 --- a/plugins/workiq-preview/skills/workiq-preview/SKILL.md +++ b/plugins/workiq-preview/skills/workiq-preview/SKILL.md @@ -1,6 +1,6 @@ --- name: workiq-preview -description: WorkIQ - Microsoft 365 tool surface for agents. Use for any workplace question or write action where data lives in M365. Supports semantic `ask` plus structured tools (`fetch`, create/update/delete, actions, functions, path/schema discovery) for mail, meetings/calendar, documents/files, Teams chats/channels, OneDrive/SharePoint, and people. Read triggers, "what did [person] say", priorities/top of mind, meeting decisions/action items, summarize thread/chat, find emails/docs, list meetings/messages/files/channels, project status/updates, "what changed since". Write triggers, send/reply/forward email, create/update/accept/decline meetings, mark read, delete drafts/items, send/post/reply/react in Teams, set presence, upload/download via web URL. Discovery triggers, available endpoints/paths, fields, required/updatable properties, request body, operation parameters, schema/data model. When in doubt about workplace context, try WorkIQ first. Prefer `ask` for synthesis; use entity tools for exact reads/writes. +description: WorkIQ - Microsoft 365 tool surface for agents. Use for any workplace question or write action where data lives in M365. Supports semantic `ask` plus structured tools (`fetch`, create/update/delete, actions, functions, path/schema discovery) for mail, meetings/calendar, documents/files, Teams chats/channels, Planner tasks/plans, OneDrive/SharePoint, and people. Read triggers, "what did [person] say", priorities/top of mind, meeting decisions/action items, summarize thread/chat, find emails/docs, list meetings/messages/files/channels, project status/updates, "what changed since". Write triggers, send/reply/forward email, create/update/accept/decline meetings, mark read, delete drafts/items, send/post/reply/react in Teams, set presence, upload/download via web URL. Discovery triggers, available endpoints/paths, fields, required/updatable properties, request body, operation parameters, schema/data model. When in doubt about workplace context, try WorkIQ first. Prefer `ask` for synthesis; use entity tools for exact reads/writes. compatibility: > Uses the hosted WorkIQ MCP endpoint. No local package is required for MCP tool calls. @@ -52,7 +52,6 @@ See [Resolving tool names in your host](#resolving-tool-names-in-your-host) belo | Listing files in a OneDrive/SharePoint folder | "List files in my OneDrive 'Specs' folder" | `fetch` | | Listing tasks/plans/buckets in Planner | "List my Planner tasks due this week" | `fetch` | | Listing / creating / completing Planner tasks | "Add a task to follow up with finance", "Mark my task done", "List my Planner tasks" | entity tools on `/planner/...` — see `references/tasks-work-iq.md` | -| List my To Do task lists | "Show me my to-do lists" | `fetch` (`/me/todo/lists`) — subject to server policy | | Get a personal contact by name | "Get the contact card for Morgan Avery" | `fetch` (`/me/contacts?$filter=...`) — subject to server policy | | List or manage Outlook categories | "What Outlook categories do I have?" | `fetch` (`/me/outlook/masterCategories`); writes subject to server policy | | Org chart / direct reports / manager lookup | "Who are Rob's direct reports?" | `fetch` (`/users/{id}/directReports`) | @@ -228,7 +227,6 @@ Entity tools provide **fast, direct access to specific M365 data** via Work IQ A | Planner | `/me/planner/plans`, `/planner/tasks` | list/create/update/complete/delete — see `references/tasks-work-iq.md` | | Teams | `/me/chats`, `/chats/{chatId}/messages`, `/me/joinedTeams`, `/teams/{teamId}/channels/{channelId}/messages`, `/me/presence` | chats vs channels are different surfaces — see `references/teams-work-iq.md` | | People | `/me`, `/users/{id}`, `/users/{id}/directReports`, `/me/manager`, `/me/contacts` | profile, org, contacts — see directory-vs-contacts warning below | -| To Do | `/me/todo/lists`, `/me/todo/lists/{listId}/tasks` | list/create/update/delete — **commonly policy-denied**, see note below | | Outlook categories | `/me/outlook/masterCategories` | list/get/create/update/delete — writes commonly policy-denied | | Files | `/me/drive`, `/drives/{id}`, `/sites/{id}` | list/get JSON metadata only — binary content (file bytes, attachment payloads) is not released yet, see the deny rule below | | Change tracking | `/me/mailFolders/inbox/messages/delta`, `/me/calendarView/delta?...`, `/me/contacts/delta` | "what's new/changed since" — via `call_function` only, never `fetch` | diff --git a/plugins/workiq-preview/skills/workiq-preview/references/tasks-work-iq.md b/plugins/workiq-preview/skills/workiq-preview/references/tasks-work-iq.md index f9e08cc..818fdbf 100644 --- a/plugins/workiq-preview/skills/workiq-preview/references/tasks-work-iq.md +++ b/plugins/workiq-preview/skills/workiq-preview/references/tasks-work-iq.md @@ -23,6 +23,14 @@ with…", "mark … done", or "list my tasks", that is M365 data: route it to Wo Planner task body fields: `planId`, `title`, `bucketId`, `assignments`, `dueDateTime`, `percentComplete` (`0` = not started, `50` = in progress, `100` = complete). +- **Fetch plans first** via `/me/planner/plans`, then fetch group plans via + `/groups/{group-id}/planner/plans` when group plans are referred. +- **Private tasks and "Assigned to me" tasks:** use `/me/planner/tasks`. +- **Enforce filtering on Planner collection GETs:** + - `GET /planner/plans` requires `$filter=owner eq '{Group or UserId}'`. + - `GET /planner/tasks` requires a `$filter` containing `planId`. + - `GET /planner/buckets` requires a `$filter` containing `planId`. + - **Mark a Planner task done:** `update_entity` with `{"percentComplete":100}`. - **Planner gotcha:** `update_entity` / `delete_entity` on Planner resources require the current `@odata.etag` (an `If-Match` precondition). Fetch the task first to From f875ba9ca4d5e4747d730ba529edae8ed83a2388 Mon Sep 17 00:00:00 2001 From: HHZ Date: Wed, 24 Jun 2026 14:45:33 +0530 Subject: [PATCH 3/6] fixing after testing --- plugins/workiq-preview/skills/workiq-preview/SKILL.md | 2 +- .../skills/workiq-preview/references/tasks-work-iq.md | 1 - plugins/workiq/skills/workiq/SKILL.md | 2 +- plugins/workiq/skills/workiq/references/tasks-work-iq.md | 1 - 4 files changed, 2 insertions(+), 4 deletions(-) diff --git a/plugins/workiq-preview/skills/workiq-preview/SKILL.md b/plugins/workiq-preview/skills/workiq-preview/SKILL.md index 51890cf..dbef469 100644 --- a/plugins/workiq-preview/skills/workiq-preview/SKILL.md +++ b/plugins/workiq-preview/skills/workiq-preview/SKILL.md @@ -1,6 +1,6 @@ --- name: workiq-preview -description: WorkIQ - Microsoft 365 tool surface for agents. Use for any workplace question or write action where data lives in M365. Supports semantic `ask` plus structured tools (`fetch`, create/update/delete, actions, functions, path/schema discovery) for mail, meetings/calendar, documents/files, Teams chats/channels, Planner tasks/plans, OneDrive/SharePoint, and people. Read triggers, "what did [person] say", priorities/top of mind, meeting decisions/action items, summarize thread/chat, find emails/docs, list meetings/messages/files/channels, project status/updates, "what changed since". Write triggers, send/reply/forward email, create/update/accept/decline meetings, mark read, delete drafts/items, send/post/reply/react in Teams, set presence, upload/download via web URL. Discovery triggers, available endpoints/paths, fields, required/updatable properties, request body, operation parameters, schema/data model. When in doubt about workplace context, try WorkIQ first. Prefer `ask` for synthesis; use entity tools for exact reads/writes. +description: WorkIQ - Microsoft 365 tool surface for agents. Use for any workplace question or write action where data lives in M365. Supports semantic `ask` plus structured tools (`fetch`, create/update/delete, actions, functions, path/schema discovery) for mail, meetings/calendar, documents/files, Teams chats/channels, OneDrive/SharePoint, and people. Read triggers, "what did [person] say", priorities/top of mind, meeting decisions/action items, summarize thread/chat, find emails/docs, list meetings/messages/files/channels, project status/updates, "what changed since". Write triggers, send/reply/forward email, create/update/accept/decline meetings, mark read, delete drafts/items, send/post/reply/react in Teams, set presence, upload/download via web URL. Discovery triggers, available endpoints/paths, fields, required/updatable properties, request body, operation parameters, schema/data model. When in doubt about workplace context, try WorkIQ first. Prefer `ask` for synthesis; use entity tools for exact reads/writes. compatibility: > Uses the hosted WorkIQ MCP endpoint. No local package is required for MCP tool calls. diff --git a/plugins/workiq-preview/skills/workiq-preview/references/tasks-work-iq.md b/plugins/workiq-preview/skills/workiq-preview/references/tasks-work-iq.md index 818fdbf..820dce2 100644 --- a/plugins/workiq-preview/skills/workiq-preview/references/tasks-work-iq.md +++ b/plugins/workiq-preview/skills/workiq-preview/references/tasks-work-iq.md @@ -29,7 +29,6 @@ Planner task body fields: `planId`, `title`, `bucketId`, `assignments`, `dueDate - **Enforce filtering on Planner collection GETs:** - `GET /planner/plans` requires `$filter=owner eq '{Group or UserId}'`. - `GET /planner/tasks` requires a `$filter` containing `planId`. - - `GET /planner/buckets` requires a `$filter` containing `planId`. - **Mark a Planner task done:** `update_entity` with `{"percentComplete":100}`. - **Planner gotcha:** `update_entity` / `delete_entity` on Planner resources diff --git a/plugins/workiq/skills/workiq/SKILL.md b/plugins/workiq/skills/workiq/SKILL.md index 46e37f3..d84429a 100644 --- a/plugins/workiq/skills/workiq/SKILL.md +++ b/plugins/workiq/skills/workiq/SKILL.md @@ -1,6 +1,6 @@ --- name: workiq -description: WorkIQ - Microsoft 365 tool surface for agents. Use for any workplace question or write action where data lives in M365. Supports semantic `ask` plus structured tools (`fetch`, create/update/delete, actions, functions, path/schema discovery) for mail, meetings/calendar, documents/files, Teams chats/channels, Planner tasks/plans, OneDrive/SharePoint, and people. Read triggers, "what did [person] say", priorities/top of mind, meeting decisions/action items, summarize thread/chat, find emails/docs, list meetings/messages/files/channels, project status/updates, "what changed since". Write triggers, send/reply/forward email, create/update/accept/decline meetings, mark read, delete drafts/items, send/post/reply/react in Teams, set presence, upload/download via web URL. Discovery triggers, available endpoints/paths, fields, required/updatable properties, request body, operation parameters, schema/data model. When in doubt about workplace context, try WorkIQ first. Prefer `ask` for synthesis; use entity tools for exact reads/writes. +description: WorkIQ - Microsoft 365 tool surface for agents. Use for any workplace question or write action where data lives in M365. Supports semantic `ask` plus structured tools (`fetch`, create/update/delete, actions, functions, path/schema discovery) for mail, meetings/calendar, documents/files, Teams chats/channels, OneDrive/SharePoint, and people. Read triggers, "what did [person] say", priorities/top of mind, meeting decisions/action items, summarize thread/chat, find emails/docs, list meetings/messages/files/channels, project status/updates, "what changed since". Write triggers, send/reply/forward email, create/update/accept/decline meetings, mark read, delete drafts/items, send/post/reply/react in Teams, set presence, upload/download via web URL. Discovery triggers, available endpoints/paths, fields, required/updatable properties, request body, operation parameters, schema/data model. When in doubt about workplace context, try WorkIQ first. Prefer `ask` for synthesis; use entity tools for exact reads/writes. compatibility: > Uses the hosted WorkIQ MCP endpoint. No local package is required for MCP tool calls. diff --git a/plugins/workiq/skills/workiq/references/tasks-work-iq.md b/plugins/workiq/skills/workiq/references/tasks-work-iq.md index 818fdbf..820dce2 100644 --- a/plugins/workiq/skills/workiq/references/tasks-work-iq.md +++ b/plugins/workiq/skills/workiq/references/tasks-work-iq.md @@ -29,7 +29,6 @@ Planner task body fields: `planId`, `title`, `bucketId`, `assignments`, `dueDate - **Enforce filtering on Planner collection GETs:** - `GET /planner/plans` requires `$filter=owner eq '{Group or UserId}'`. - `GET /planner/tasks` requires a `$filter` containing `planId`. - - `GET /planner/buckets` requires a `$filter` containing `planId`. - **Mark a Planner task done:** `update_entity` with `{"percentComplete":100}`. - **Planner gotcha:** `update_entity` / `delete_entity` on Planner resources From c7b51fdec81458c05c019c0c209179e031ded818 Mon Sep 17 00:00:00 2001 From: HHZ Date: Wed, 24 Jun 2026 15:41:52 +0530 Subject: [PATCH 4/6] adding forbiddne create paths --- .../skills/workiq-preview/references/tasks-work-iq.md | 6 ++++++ plugins/workiq/skills/workiq/references/tasks-work-iq.md | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/plugins/workiq-preview/skills/workiq-preview/references/tasks-work-iq.md b/plugins/workiq-preview/skills/workiq-preview/references/tasks-work-iq.md index 820dce2..5e78d0b 100644 --- a/plugins/workiq-preview/skills/workiq-preview/references/tasks-work-iq.md +++ b/plugins/workiq-preview/skills/workiq-preview/references/tasks-work-iq.md @@ -29,6 +29,12 @@ Planner task body fields: `planId`, `title`, `bucketId`, `assignments`, `dueDate - **Enforce filtering on Planner collection GETs:** - `GET /planner/plans` requires `$filter=owner eq '{Group or UserId}'`. - `GET /planner/tasks` requires a `$filter` containing `planId`. +- **Forbidden create plans/tasks paths** Do not use `create_entity`, `update_entity`, `delete_entity` for the following paths + - /me/planner/plans + - /me/planner/tasks + - /users/{user-id}/planner/plans + - /users/{user-id}/planner/tasks + - /groups/{group-id}/planner/plans - **Mark a Planner task done:** `update_entity` with `{"percentComplete":100}`. - **Planner gotcha:** `update_entity` / `delete_entity` on Planner resources diff --git a/plugins/workiq/skills/workiq/references/tasks-work-iq.md b/plugins/workiq/skills/workiq/references/tasks-work-iq.md index 820dce2..5e78d0b 100644 --- a/plugins/workiq/skills/workiq/references/tasks-work-iq.md +++ b/plugins/workiq/skills/workiq/references/tasks-work-iq.md @@ -29,6 +29,12 @@ Planner task body fields: `planId`, `title`, `bucketId`, `assignments`, `dueDate - **Enforce filtering on Planner collection GETs:** - `GET /planner/plans` requires `$filter=owner eq '{Group or UserId}'`. - `GET /planner/tasks` requires a `$filter` containing `planId`. +- **Forbidden create plans/tasks paths** Do not use `create_entity`, `update_entity`, `delete_entity` for the following paths + - /me/planner/plans + - /me/planner/tasks + - /users/{user-id}/planner/plans + - /users/{user-id}/planner/tasks + - /groups/{group-id}/planner/plans - **Mark a Planner task done:** `update_entity` with `{"percentComplete":100}`. - **Planner gotcha:** `update_entity` / `delete_entity` on Planner resources From cdfaabaddef16db58514f0ff1baff5018afc2e47 Mon Sep 17 00:00:00 2001 From: HHZ Date: Thu, 25 Jun 2026 16:39:33 +0530 Subject: [PATCH 5/6] Improving group plan fetching --- .../references/tasks-work-iq.md | 23 +++++++++++++++---- plugins/workiq/skills/workiq/SKILL.md | 5 ++-- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/plugins/workiq-preview/skills/workiq-preview/references/tasks-work-iq.md b/plugins/workiq-preview/skills/workiq-preview/references/tasks-work-iq.md index 5e78d0b..4476ad0 100644 --- a/plugins/workiq-preview/skills/workiq-preview/references/tasks-work-iq.md +++ b/plugins/workiq-preview/skills/workiq-preview/references/tasks-work-iq.md @@ -23,8 +23,22 @@ with…", "mark … done", or "list my tasks", that is M365 data: route it to Wo Planner task body fields: `planId`, `title`, `bucketId`, `assignments`, `dueDateTime`, `percentComplete` (`0` = not started, `50` = in progress, `100` = complete). -- **Fetch plans first** via `/me/planner/plans`, then fetch group plans via - `/groups/{group-id}/planner/plans` when group plans are referred. +- **Find the plan before using `ask` (required for named-plan requests):** + 1. Fetch owned plans with `/me/planner/plans?$select=id,title,owner`. + 2. Search that full result locally for the requested title or keywords. Do not stop after the + first page if the response includes `@odata.nextLink`. + 3. If the plan is not in `/me/planner/plans`, resolve likely backing groups before using `ask`. + Fetch `/me/joinedTeams?$select=id,displayName,description` to get group IDs for Teams the + user has joined, guess likely team/group names, then fetch + `/groups/{group-id}/planner/plans?$select=id,title,owner` to get the plan ID. Do not pass + `$top` to `/me/joinedTeams`. + 4. If `/me/joinedTeams` misses, use known group IDs when provided or fetch the user's joined + groups and then fetch `/groups/{group-id}/planner/plans?$select=id,title,owner`. + 5. If you have an owner/group ID but not the group-plans path, use + `/planner/plans?$filter=owner eq '{Group or UserId}'&$select=id,title,owner`. + 6. Only use `ask` after the structured `/me/planner/plans`, assigned-task `planId`, group-backed + `/groups/{group-id}/planner/plans`, and owner-filtered `/planner/plans` lookup paths are + exhausted, unavailable, or policy-blocked. - **Private tasks and "Assigned to me" tasks:** use `/me/planner/tasks`. - **Enforce filtering on Planner collection GETs:** - `GET /planner/plans` requires `$filter=owner eq '{Group or UserId}'`. @@ -41,10 +55,11 @@ Planner task body fields: `planId`, `title`, `bucketId`, `assignments`, `dueDate require the current `@odata.etag` (an `If-Match` precondition). Fetch the task first to read its etag; if a Planner write returns a `412`/precondition error, re-fetch and retry. + ## Resolve-then-act (do not loop) -1. Resolve the target with **one** `fetch` (Planner task) — match by `title`. -2. If the first fetch does not find it, try **one** `ask` to locate it semantically. +1. Resolve the target with `fetch` (Planner task) — match by `title`. (Planner plan) - first using `/me/planner/plans` else using `/groups/{group-id}/planner/plans` +2. If the fetch does not find it, try **one** `ask` to locate it semantically. 3. If still not found, **stop and report "not found"** — do not fire 10+ more `fetch`/`search_paths`/`ask` calls. 4. Once you have the id, call the mutation (`create_entity` / `update_entity` / `delete_entity`). diff --git a/plugins/workiq/skills/workiq/SKILL.md b/plugins/workiq/skills/workiq/SKILL.md index d84429a..5b085f7 100644 --- a/plugins/workiq/skills/workiq/SKILL.md +++ b/plugins/workiq/skills/workiq/SKILL.md @@ -50,7 +50,7 @@ See [Resolving tool names in your host](#resolving-tool-names-in-your-host) belo | Sending/replying/reacting in Teams, setting presence | "Send a chat to Alex", "Post in the Daily channel", "React with 👍", "Set me to Busy" | entity tools on `/chats/...` or `/teams/...` — see `references/teams-work-iq.md` | | Fetching a known entity by ID | "Get event `AAMk...` details" | `fetch` | | Listing files in a OneDrive/SharePoint folder | "List files in my OneDrive 'Specs' folder" | `fetch` | -| Listing tasks/plans/buckets in Planner | "List my Planner tasks due this week" | `fetch` | +| Listing tasks/plans/buckets in Planner | "List my Planner tasks due this week" | `fetch` — see `references/tasks-work-iq.md` avoid `ask` | | Listing / creating / completing Planner tasks | "Add a task to follow up with finance", "Mark my task done", "List my Planner tasks" | entity tools on `/planner/...` — see `references/tasks-work-iq.md` | | Get a personal contact by name | "Get the contact card for Morgan Avery" | `fetch` (`/me/contacts?$filter=...`) — subject to server policy | | List or manage Outlook categories | "What Outlook categories do I have?" | `fetch` (`/me/outlook/masterCategories`); writes subject to server policy | @@ -67,7 +67,8 @@ See [Resolving tool names in your host](#resolving-tool-names-in-your-host) belo > local markdown file, insert into a local/SQL table, or use any other builtin > task tracker — that does not satisfy the request and the user cannot see it in Planner. > If a WorkIQ task call fails, report the failure; do not silently substitute local storage. -> See `references/tasks-work-iq.md`. +> See `references/tasks-work-iq.md`; for named Planner plan requests, read that +> reference before resolving the plan so group-backed plans are checked correctly. ### Required workflow order — don't stop after a preparatory lookup From e0dbe5964e31835f35715402f6756d928eb712d2 Mon Sep 17 00:00:00 2001 From: HHZ Date: Thu, 25 Jun 2026 16:48:20 +0530 Subject: [PATCH 6/6] updating preview as well --- .../skills/workiq-preview/SKILL.md | 5 ++-- .../skills/workiq/references/tasks-work-iq.md | 23 +++++++++++++++---- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/plugins/workiq-preview/skills/workiq-preview/SKILL.md b/plugins/workiq-preview/skills/workiq-preview/SKILL.md index dbef469..2c3a62b 100644 --- a/plugins/workiq-preview/skills/workiq-preview/SKILL.md +++ b/plugins/workiq-preview/skills/workiq-preview/SKILL.md @@ -50,7 +50,7 @@ See [Resolving tool names in your host](#resolving-tool-names-in-your-host) belo | Sending/replying/reacting in Teams, setting presence | "Send a chat to Alex", "Post in the Daily channel", "React with 👍", "Set me to Busy" | entity tools on `/chats/...` or `/teams/...` — see `references/teams-work-iq.md` | | Fetching a known entity by ID | "Get event `AAMk...` details" | `fetch` | | Listing files in a OneDrive/SharePoint folder | "List files in my OneDrive 'Specs' folder" | `fetch` | -| Listing tasks/plans/buckets in Planner | "List my Planner tasks due this week" | `fetch` | +| Listing tasks/plans/buckets in Planner | "List my Planner tasks due this week" | `fetch` — see `references/tasks-work-iq.md` avoid `ask` | | Listing / creating / completing Planner tasks | "Add a task to follow up with finance", "Mark my task done", "List my Planner tasks" | entity tools on `/planner/...` — see `references/tasks-work-iq.md` | | Get a personal contact by name | "Get the contact card for Morgan Avery" | `fetch` (`/me/contacts?$filter=...`) — subject to server policy | | List or manage Outlook categories | "What Outlook categories do I have?" | `fetch` (`/me/outlook/masterCategories`); writes subject to server policy | @@ -67,7 +67,8 @@ See [Resolving tool names in your host](#resolving-tool-names-in-your-host) belo > local markdown file, insert into a local/SQL table, or use any other builtin > task tracker — that does not satisfy the request and the user cannot see it in Planner. > If a WorkIQ task call fails, report the failure; do not silently substitute local storage. -> See `references/tasks-work-iq.md`. +> See `references/tasks-work-iq.md`; for named Planner plan requests, read that +> reference before resolving the plan so group-backed plans are checked correctly. ### Required workflow order — don't stop after a preparatory lookup diff --git a/plugins/workiq/skills/workiq/references/tasks-work-iq.md b/plugins/workiq/skills/workiq/references/tasks-work-iq.md index 5e78d0b..4476ad0 100644 --- a/plugins/workiq/skills/workiq/references/tasks-work-iq.md +++ b/plugins/workiq/skills/workiq/references/tasks-work-iq.md @@ -23,8 +23,22 @@ with…", "mark … done", or "list my tasks", that is M365 data: route it to Wo Planner task body fields: `planId`, `title`, `bucketId`, `assignments`, `dueDateTime`, `percentComplete` (`0` = not started, `50` = in progress, `100` = complete). -- **Fetch plans first** via `/me/planner/plans`, then fetch group plans via - `/groups/{group-id}/planner/plans` when group plans are referred. +- **Find the plan before using `ask` (required for named-plan requests):** + 1. Fetch owned plans with `/me/planner/plans?$select=id,title,owner`. + 2. Search that full result locally for the requested title or keywords. Do not stop after the + first page if the response includes `@odata.nextLink`. + 3. If the plan is not in `/me/planner/plans`, resolve likely backing groups before using `ask`. + Fetch `/me/joinedTeams?$select=id,displayName,description` to get group IDs for Teams the + user has joined, guess likely team/group names, then fetch + `/groups/{group-id}/planner/plans?$select=id,title,owner` to get the plan ID. Do not pass + `$top` to `/me/joinedTeams`. + 4. If `/me/joinedTeams` misses, use known group IDs when provided or fetch the user's joined + groups and then fetch `/groups/{group-id}/planner/plans?$select=id,title,owner`. + 5. If you have an owner/group ID but not the group-plans path, use + `/planner/plans?$filter=owner eq '{Group or UserId}'&$select=id,title,owner`. + 6. Only use `ask` after the structured `/me/planner/plans`, assigned-task `planId`, group-backed + `/groups/{group-id}/planner/plans`, and owner-filtered `/planner/plans` lookup paths are + exhausted, unavailable, or policy-blocked. - **Private tasks and "Assigned to me" tasks:** use `/me/planner/tasks`. - **Enforce filtering on Planner collection GETs:** - `GET /planner/plans` requires `$filter=owner eq '{Group or UserId}'`. @@ -41,10 +55,11 @@ Planner task body fields: `planId`, `title`, `bucketId`, `assignments`, `dueDate require the current `@odata.etag` (an `If-Match` precondition). Fetch the task first to read its etag; if a Planner write returns a `412`/precondition error, re-fetch and retry. + ## Resolve-then-act (do not loop) -1. Resolve the target with **one** `fetch` (Planner task) — match by `title`. -2. If the first fetch does not find it, try **one** `ask` to locate it semantically. +1. Resolve the target with `fetch` (Planner task) — match by `title`. (Planner plan) - first using `/me/planner/plans` else using `/groups/{group-id}/planner/plans` +2. If the fetch does not find it, try **one** `ask` to locate it semantically. 3. If still not found, **stop and report "not found"** — do not fire 10+ more `fetch`/`search_paths`/`ask` calls. 4. Once you have the id, call the mutation (`create_entity` / `update_entity` / `delete_entity`).