-
Notifications
You must be signed in to change notification settings - Fork 56
feat: Add Pages/Wiki API support #62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
1nk1
wants to merge
1
commit into
makeplane:canary
Choose a base branch
from
1nk1:canary
base: canary
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incomplete implementation: project-level search defaults to error.
The
workspace_levelparameter defaults toFalse, but the project-level search path (lines 187-190) returns a hardcoded error becauseproject_idis not accepted as a parameter. This is confusing UX since the default behavior returns an error.Consider one of these approaches:
project_id: str | None = Noneparameter to support project-level searchworkspace_level: bool = Trueso the working path is the defaultworkspace_levelparameter entirely if project-level search isn't planned♻️ Option 1: Add project_id parameter
`@mcp.tool`() def search_pages( query: str, + project_id: str | None = None, workspace_level: bool = False, ) -> str: """ Search for pages by query string. Args: query: Search query + project_id: UUID of the project (required when workspace_level=False) workspace_level: Search workspace pages (True) or project pages (False) Returns: JSON string with search results """ client, workspace_slug = get_plane_client_context() # Determine search endpoint based on level if workspace_level: result = client.pages.list( workspace_slug=workspace_slug, query=query, ) + elif project_id: + result = client.projects.pages.list( + workspace_slug=workspace_slug, + project_id=project_id, + query=query, + ) else: - # For project-level, we'd need project_id - # This is a limitation - let's return error for now return '{"error": "Project page search requires project_id. Use workspace_level=True for workspace-wide search."}' return result.model_dump_json()♻️ Option 2: Default to workspace-level search
def search_pages( query: str, - workspace_level: bool = False, + workspace_level: bool = True, ) -> str:📝 Committable suggestion
🤖 Prompt for AI Agents