Skip to content

[PAI-2159] feat: add a workitem_subscriber tool - #294

Merged
akhil-vamshi-konam merged 3 commits into
release-0.3.7from
feat/pai-2159-work-item-subscribers
Nov 23, 2026
Merged

akhil-vamshi-konam merged 3 commits into
release-0.3.7from
feat/pai-2159-work-item-subscribers

Conversation

@akhil-vamshi-konam

Copy link
Copy Markdown
Contributor

What

  • Was: Claude couldn't see or change who is subscribed to a work item.
  • Now: a new workitem_subscriber tool (v2 client):
    • list — the subscriber ids
    • manage — add_user_id / remove_user_id, each one id or several; returns the new list
  • The work item is named by workitem_identifier (ENG-42) or by project_id + workitem_id.
  • The API merges add/remove itself, so the tool never reads and rewrites the list (no lost update between two writers).
  • The description tells the model: changing only yourself needs view access; naming anyone else needs edit access and a plan with subscriber management; new subscribers must be project or linked-teamspace members; user ids come from member list_project.

Where to look

  1. 🔴 plane_mcp/tools/workitem_subscriber.py — actions, target selection, SDK calls; @plan_gated turns the plan 402 into a readable message
  2. 🟡 tests/tools/test_conformance.py — listing budget 72,500 → 73,600
  3. ⚪ plane_mcp/tools/registry.py (appended last, so tool order is unchanged), tests/tools/test_dispatch.py; counts in README.md, CLAUDE.md, plane_mcp/tools/README.md (33 tools, 233 actions)

Watch out for: the listing was already ~72.2k of the 72.5k budget; this tool's schema adds ~1.4k, so the budget moves to 73.6k.

Proof

Important

Confidence: High — unit tests, plus Claude driving the tool in plain English through this server against a local Plane API, each result cross-checked with a direct API call

  • Ran: pytest -q (1532 passed, 35 skipped), ruff check and ruff format --check clean, against the SDK branch with the new resource. Live, claude -p through this server: list by identifier; remove a member; add a member by display name; add two at once; add myself; add a non-member (400 surfaced as a clear tool error, nothing changed). Also the project_id + workitem_id route and the no-target error.
  • Not verified: the 402 message live (the feature is on in the test workspace).

Rollout

  • Needs plane-sdk 0.3.3 with the subscriber resource (makeplane/plane-python-sdk PAI-2160) and a Plane server with the v2 subscriber endpoints (plane-ee #10151, on preview).

Links

list and manage (add_user_id / remove_user_id) a work item's subscribers through the v2 client, by identifier or by project and work item id. The API merges the change itself, so nothing reads and rewrites the list.
…to 73.6k

The listing was at ~72.2k; the new tool's schema adds ~1.4k.
@coderabbitai

coderabbitai Bot commented Nov 23, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8a90081a-7336-42f5-8cff-92f184b50309

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@makeplane

makeplane Bot commented Nov 23, 2026

Copy link
Copy Markdown

Linked to Plane Work Item(s)

References

This comment was auto-generated by Plane

@akhil-vamshi-konam
akhil-vamshi-konam merged commit a7d5b5a into release-0.3.7 Nov 23, 2026
1 check passed
Prashant-Surya pushed a commit that referenced this pull request Nov 24, 2026
* fix: page the initiative list instead of returning only the first 20 (#282)

* [PAI-2135] fix(workitem): let update clear a work item's parent (#283)

`parent` was typed `str = ""` and passed through `opt()`, so null failed
schema validation and "" was dropped as unset: no input could reach Plane
as a clear. Make it `str | None`, and send an explicit null the way
start_date/target_date already did.

Also read a null spelled as text ("null", "None") as null for parent,
start_date and target_date. Clients that stringify every argument send it
that way; the coercion middleware leaves it alone because the fields accept
strings, and Plane rejected it as an invalid UUID/date.

* fix(pql): drop the 5-condition cap from the PQL reference; fix BETWEEN syntax (#284)

The reference told models PQL allows at most 5 conditions. That cap is
Pi's NL-to-PQL translator limit, not the API's: the API accepts up to 50
conditions (nesting depth 16) and returns a correctable error through
pql_failure when exceeded. Models followed the stated cap and silently
dropped conditions, returning the wrong work items.

The reference also taught `BETWEEN (a, b)`, which the API rejects as
invalid PQL; it now uses `BETWEEN a AND b`.

The reference now states no size limit; the API stays the single place
that enforces one.

* fix(cycle): archive ends a cycle that finishes later today (#270)

`archive` ends a running cycle before archiving it, but the check
compared calendar dates and dropped the time of day. A cycle ending
at 23:00 today counted as already ended at 02:00, so the end_date
update was skipped and Plane refused the archive ("Only completed
cycles can be archived"). Compare instants instead, as Plane does;
a value without an offset is read as UTC.

* feat: let MCP read inline images in work item descriptions (#267)

Images embedded in a description are separate assets (ISSUE_DESCRIPTION), so
workitem_attachment cannot list or read them. Add `workitem
read_description_image`, which takes project_id, workitem_id and the asset id
from the <image-component src> tag and returns the image inline.

The asset endpoint authorises on the workspace, not the work item, so the
action first retrieves the work item and only serves an asset that the
description actually embeds. PNG/JPEG/GIF/WEBP up to IMAGE_READ_LIMIT; a
missing or unfinished asset, an unsupported type, an oversize image and a
null download URL each return a clear error.

The download streams the Plane-issued storage URL with a size cap, as
workitem_attachment read does, so self-hosted storage on a private address
still works. upload_from_url keeps the SSRF-guarded fetch.

Needs plane-sdk with Workspaces.get_asset; bump the pin once released.

* test: raise the listing budget to 72,500 chars for the dashboard, view and member tools

* feat(dashboard): add a dashboard tool for dashboards and their widgets (#280)

makeplane/plane-ee#7936 put dashboards and dashboard widgets on the v2 API.
This adds one `dashboard` tool covering them, built on the v2 client from
makeplane/plane-python-sdk#77:

- dashboards: list, retrieve, create, update, delete, copy, list_widget_types
- widgets: list_widgets, retrieve_widget, create_widget, update_widget,
  delete_widget
- chart data: get_chart (with TABLE_CHART column paging), get_charts

Widgets are actions on `dashboard` rather than a tool of their own, to stay
inside the listing budget. The tool is appended to RESOURCES, so the
advertised order of the existing 30 tools, and clients' prompt caches, are
unchanged. The listing is now 31 tools, 221 actions, 69,999 characters.

It is the first resource on `client.v2`, which differs from v1 in two ways
handled here:

- Lists page by data/has_more/next_cursor. `cursor_page()` in
  toolkit/paging.py envelopes them; lists request paginate="cursor", the
  only style that carries a cursor.
- Refusals are PlaneAPIError, not HttpError. `plan_gated` now catches both,
  so a 402 (Dashboards, or a chart type, not on the plan) is answered with
  a message. A 400 is answered with its per-field `errors`, which the
  exception's own message drops.

Filtering is by `pql`. A widget given pql also gets
last_used_filter="pql_filters", or its chart would read `filters` instead.
`update_widget` takes `clear` to empty the four axis fields the server
stores null in; unset fields are never sent, since an axis field set to
None goes out as null.

SpyClient resolved parameter annotations with get_type_hints, which is
all-or-nothing. Every v2 list returns Page[T], a union alias that cannot be
subscripted at runtime, so a v2 list's arguments were checked against bare
strings pydantic cannot build. It now resolves each parameter on its own.

The plane-sdk pin is unchanged at 0.3.1, which has no dashboards: the
server needs the SDK release that ships #77 before this can merge.

* [PAI-2127] feat: add a view tool for saved work-item views (#285)

* feat: add a view tool for saved work-item views

* fix: list views with only the fields the listing asked for

* feat: clear a view's query with pql=null on update

* [PAI-2126] feat: add, re-role and remove project members (#286)

* feat: add, re-role and remove project members from the member tool

* fix: leave removed members out of the project member list

* feat: pass any project role slug to Plane, commenter and custom roles included

* feat: change a workspace member's role from the member tool (#287)

* chore: pin plane-sdk 0.3.3

* [PAI-2159] feat: add a workitem_subscriber tool (#294)

* [PAI-2159] feat: add a workitem_subscriber tool

list and manage (add_user_id / remove_user_id) a work item's subscribers through the v2 client, by identifier or by project and work item id. The API merges the change itself, so nothing reads and rewrites the list.

* [PAI-2159] test: cover workitem_subscriber; raise the listing budget to 73.6k

The listing was at ~72.2k; the new tool's schema adds ~1.4k.

* [PAI-2159] docs: list workitem_subscriber (33 tools, 233 actions)

* chore: lock plane-sdk 0.3.3 from PyPI

pyproject already pins plane-sdk==0.3.3; uv.lock still resolved 0.3.1. Relocked with uv 0.13.5 (the Dockerfile's); only plane-sdk and its new certifi dependency change.

---------

Co-authored-by: gurusainath <gurusainath007@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant