Skip to content

feat: add update_page and delete_page tools - #190

Open
Galeforce1 wants to merge 2 commits into
makeplane:mainfrom
Galeforce1:feat/add-update-delete-page-tools
Open

feat: add update_page and delete_page tools#190
Galeforce1 wants to merge 2 commits into
makeplane:mainfrom
Galeforce1:feat/add-update-delete-page-tools

Conversation

@Galeforce1

@Galeforce1 Galeforce1 commented Jul 27, 2026

Copy link
Copy Markdown

Overview

Adds update_page and delete_page MCP tools to plane_mcp/tools/pages.py,
following the existing file's create_page/retrieve_page conventions exactly.

Motivation

Pages could be listed, retrieved, and created through MCP, but not
updated or deleted — a real gap for any workflow that needs to correct
or clean up wiki content programmatically.

Changes

  • delete_page(page_id, project_id=None) — works against the current
    released plane-sdk (delete_workspace_page/delete_project_page already exist).
  • update_page(page_id, project_id=None, ...) — depends on
    makeplane/plane-python-sdk# (adds the matching SDK methods).
    Happy to split this into a follow-up PR once that's merged/released if
    preferred.

Summary by CodeRabbit

  • New Features
    • Added the ability to update page details, including names, descriptions, access settings, colors, locking, archival status, and display properties.
    • Added support for deleting pages at both the workspace and project level.
    • Page actions now support targeting either workspace-level or project-level pages.

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@Galeforce1, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 25 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: b56104b5-81b5-4d5a-9293-fe203be57c43

📥 Commits

Reviewing files that changed from the base of the PR and between 5488a3d and c7d664a.

📒 Files selected for processing (1)
  • plane_mcp/tools/pages.py
📝 Walkthrough

Walkthrough

Adds update_page and delete_page MCP tools. Both route to project-level or workspace-level Plane client methods based on project_id; updates construct an UpdatePage payload and return the updated page.

Changes

Page management tools

Layer / File(s) Summary
Update and delete page handlers
plane_mcp/tools/pages.py
Adds optional-field page updates using UpdatePage, plus page deletion with project- and workspace-level routing.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related issues

Possibly related PRs

Suggested reviewers: akhil-vamshi-konam

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and accurately summarizes the main change: adding update_page and delete_page tools.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@plane_mcp/tools/pages.py`:
- Around line 270-284: Update the delete_page docstring to add the required
Returns section, documenting that the function returns None. Keep the existing
Args documentation and deletion behavior unchanged.
- Around line 257-268: Update the dependency pin used by update_page so the
installed Plane SDK exposes both pages.update_project_page and
pages.update_workspace_page, ensuring the lock and declared version resolve to
that compatible release. If no compatible SDK release exists, replace these
calls with the supported existing client API before registering update_page.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: b7e7c0fa-3a0e-47ac-836c-efac46148954

📥 Commits

Reviewing files that changed from the base of the PR and between 96cf4d5 and 5488a3d.

📒 Files selected for processing (1)
  • plane_mcp/tools/pages.py

Comment thread plane_mcp/tools/pages.py
Comment on lines +257 to +268
if project_id is not None:
return client.pages.update_project_page(
workspace_slug=workspace_slug,
project_id=project_id,
page_id=page_id,
data=data,
)
return client.pages.update_workspace_page(
workspace_slug=workspace_slug,
page_id=page_id,
data=data,
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 Stability & Availability | 🟠 Major | 🏗️ Heavy lift

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== files matching pages.py / dependency files =="
git ls-files | rg '(^|/)pages\.py$|(^|/)(requirements|pyproject|poetry|setup|Pipfile|uv\.lock|poetry\.lock|max_length)' || true

echo
echo "== target slice =="
sed -n '220,290p' plane_mcp/tools/pages.py 2>/dev/null || true

echo
echo "== search for SDK methods in repo =="
rg -n "update_(project|workspace)_page|pages:|makeplane|plane-python-sdk|plane_python_sdk|workspace_page|project_page" -S . || true

echo
echo "== dependency declarations =="
for f in pyproject.toml requirements.txt requirements-base.txt requirements-dev.txt pyproject.lock uv.lock poetry.lock Pipfile Pipfile.lock; do
  if [ -f "$f" ]; then
    echo "--- $f ---"
    rg -n "makeplane|plane-python-sdk|plane_python_sdk|Plane" "$f" -S || true
  fi
done

echo
echo "== inspect likely dependency files sizes =="
wc -l pyproject.toml requirements*.txt uv.lock poetry.lock 2>/dev/null | sed -n '1,80p' || true

Repository: makeplane/plane-mcp-server

Length of output: 5975


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== pyproject.toml =="
cat -n pyproject.toml

echo
echo "== uv.lock dependency references (focused) =="
rg -n 'name = "makeplane|makeplane|plane|pages|update_(project|workspace)_page' uv.lock pyproject.toml -S || true

echo
echo "== inspect dependency section in pyproject =="
sed -n '1,80p' pyproject.toml

echo
echo "== inspect relevant uv.lock packages =="
python3 - <<'PY'
from pathlib import Path
p=Path("uv.lock")
text=p.read_text()
for marker in ['[[package]]\nname = "makeplane"\n', '[[package]]\nname = "plane-python-sdk"\n', '[[package]]\nname = "plane-python-sdk"']:
    idx=text.find(marker)
    print("marker", repr(marker), "idx", idx)
PY

echo
echo "== remote SDK pages.py =="
curl -sS --fail https://raw.githubusercontent.com/makeplane/plane-python-sdk/main/plane/api/pages.py | sed -n '1,260p'

echo
echo "== remote SDK Pages class methods summary =="
python3 - <<'PY'
import re, urllib.request
url="https://raw.githubusercontent.com/makeplane/plane-python-sdk/main/plane/api/pages.py"
try:
    data=urllib.request.urlopen(url, timeout=20).read().decode()
except Exception as e:
    print("FETCH_ERROR", repr(type(e).__name__), str(e))
    raise SystemExit(0)
methods=re.findall(r'^\s{4}def ([a-z_][a-z_0-9]*)\(', data, re.M)
print(methods)
print()
for m in methods:
    if "update" in m:
        print(m)
PY

Repository: makeplane/plane-mcp-server

Length of output: 9718


🏁 Script executed:

#!/bin/bash
set -euo pipefail

python3 - <<'PY'
import json, tarfile, sys, urllib.request, tempfile, pathlib
for version in ["0.2.16", "0.2.17", "0.2.18", "0.2.19", "0.2.20", "0.2.21"]:
    url = f"https://files.pythonhosted.org/packages/source/p/plane-sdk/plane_sdk-{version}.tar.gz"
    print(f"--- plane-sdk {version} ---")
    try:
        data = urllib.request.urlopen(url, timeout=20).read()
        with tarfile.open(fileobj=sys.stdout.buffer, mode="r:gz") as outer:
            pass
        tar = tarfile.open(fileobj=sys.stdout.buffer, mode="r:gz")
    except Exception as e:
        print("FETCH_ERROR", type(e).__name__, str(e))
        continue
    pkg = pathlib.Path(f"plane_sdk-{version}/plane/api/pages.py")
    for member in tar.getmembers():
        if not member.isfile():
            continue
        contents = tar.extractfile(member)
        if contents is None:
            continue
        text = contents.read().decode("utf-8", "replace")
        names = []
        for line in text.splitlines():
            if line.strip().startswith("def "):
                names.append(line.strip().split("(", 1)[0].replace("def ", "", 1))
        if "Pages" in names or any("update" in n for n in names) or member.name.endswith("pages.py"):
            update = [n for n in names if "update" in n]
            print("tar path", member.name, "update methods", update)
PY

Repository: makeplane/plane-mcp-server

Length of output: 1250


🌐 Web query:

PyPI plane-sdk 0.2.20 plane.api.pages Pages update_project_page update_workspace_page

💡 Result:

In the plane-sdk (v0.2.20), the Page management functionality is available through the client.pages resource [1]. While the SDK is organized to follow standard CRUD patterns (list, create, retrieve, update, delete) [2][3], current developer documentation and resource availability for the specific methods update_workspace_page and update_project_page in the Python SDK are limited. As of recent updates to the Plane API (v1), support for Page CRUD operations (including update) has been added to the underlying REST API [4][5]. In the plane-sdk, you typically interact with resources via the PlaneClient [6][3]. Based on the established patterns for other resources in this SDK, these update operations, if exposed, would likely follow this signature structure: client.pages.update_workspace_page(workspace_slug, page_id, data) client.pages.update_project_page(workspace_slug, project_id, page_id, data) Please check the official Plane Python SDK repository directly for the most current implementation, as the SDK is frequently updated to reflect new v1 API endpoints [7][3]. If these specific methods are not yet explicitly defined in your current installed version, you may need to utilize the underlying client to perform the PATCH request directly against the v1 API endpoints documented in the Plane developer portal [4][5][8].

Citations:


🌐 Web query:

"def update_workspace_page" "makeplane.plane-python-sdk"

💡 Result:

The plane-python-sdk does not currently provide a native method named update_workspace_page [1][2][3]. While the Plane API has recently expanded to include CRUD operations for pages [4], the current version of the official Python SDK primarily exposes methods such as list_workspace_pages, list_project_pages, retrieve_workspace_page, and retrieve_project_page [1][2][3]. If you need to update a workspace page programmatically, you may need to use the underlying API directly via the PATCH method at the endpoint /api/v1/workspaces/{slug}/pages/{page_id}/ [4][5], utilizing a standard HTTP client such as requests or httpx along with your API key or OAuth token for authentication [5]. Alternatively, check the repository for the most recent updates, as the SDK is actively maintained and methods are added to match API capabilities [3][6].

Citations:


Ship an SDK version that implements these methods.

plane_mcp/tools/pages.py:update_page() calls client.pages.update_project_page() and update_workspace_page(), but the pinned plane-sdk==0.2.20 lock is for 0.2.16 and the SDK pages resource only exposes list/retrieve/create/delete for pages. That makes update_page fail immediately at runtime on installed environments. Pin a compatible SDK version that includes both methods, or implement the update calls through the existing SDK/client API before registering this tool.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plane_mcp/tools/pages.py` around lines 257 - 268, Update the dependency pin
used by update_page so the installed Plane SDK exposes both
pages.update_project_page and pages.update_workspace_page, ensuring the lock and
declared version resolve to that compatible release. If no compatible SDK
release exists, replace these calls with the supported existing client API
before registering update_page.

Comment thread plane_mcp/tools/pages.py
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