-
Notifications
You must be signed in to change notification settings - Fork 24
feat: add project issue listing tool #34
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
base: canary
Are you sure you want to change the base?
feat: add project issue listing tool #34
Conversation
WalkthroughIntroduces a new tool registration for listing project issues and wires it into the existing tool initialization. A new file defines the tool and its input schema, performs an HTTP GET to a Plane API endpoint using an environment-based workspace slug, and returns the JSON response as formatted text. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Dev as Client
participant S as McpServer
participant T as list_project_issues tool
participant API as Plane API
Note over S: At startup: registerProjectTools()<br/>then registerProjectIssueTools()
Dev->>S: Invoke tool list_project_issues(project_id)
S->>T: Execute with validated input
T->>API: GET /workspaces/{WORKSPACE_SLUG}/projects/{project_id}/issues/
API-->>T: 200 JSON (issues)
T-->>S: content: [{type: "text", text: pretty JSON}]
S-->>Dev: Tool result
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal). Please share your feedback with us on this Discord post. 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. Comment |
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.
Actionable comments posted: 2
🧹 Nitpick comments (1)
src/tools/project-issues.ts (1)
18-25
: Consider pagination and response shaping.
Plane issue lists are likely paginated; returning the raw payload may be large. Consider optional inputs likepage
,page_size
, and returning onlyresults
or summarizing counts.I can draft an updated schema and handler that accepts pagination and assembles multiple pages on demand. Want me to push a patch?
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
src/tools/index.ts
(2 hunks)src/tools/project-issues.ts
(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
src/tools/project-issues.ts (1)
src/common/request-helper.ts (1)
makePlaneRequest
(3-36)
src/tools/index.ts (1)
src/tools/project-issues.ts (1)
registerProjectIssueTools
(6-28)
🔇 Additional comments (2)
src/tools/index.ts (2)
9-9
: Import looks correct and consistent with ESM.js
extensions.
Matches existing local import style in this file.
18-20
: Good placement in registration order.
Registering afterregisterProjectTools(server)
keeps related tools grouped.
"list_project_issues", | ||
"Get all issues for a specific project", | ||
{ | ||
project_id: z.string().describe("The uuid identifier of the project to get issues for"), |
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.
🛠️ Refactor suggestion
Tighten input validation to enforce UUIDs.
Prevents malformed IDs and path injection via slashes.
Apply this diff:
- project_id: z.string().describe("The uuid identifier of the project to get issues for"),
+ project_id: z.string().uuid().describe("The UUID of the project to get issues for"),
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
project_id: z.string().describe("The uuid identifier of the project to get issues for"), | |
project_id: z.string().uuid().describe("The UUID of the project to get issues for"), |
🤖 Prompt for AI Agents
In src/tools/project-issues.ts around line 11, the project_id schema uses
z.string() which allows malformed IDs and path-injection characters; replace it
with z.string().uuid().describe("The uuid identifier of the project to get
issues for") to validate proper UUID format (this also prevents slashes), and
update any affected callers/tests to supply valid UUIDs.
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.
@sushitommy please resolve this commit
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.
Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!
This PR adds a new tool to list all issues for a specific project.
Changes
list_project_issues
tool insrc/tools/project-issues.ts
src/tools/index.ts
to register the new toolproject_id
parameter and returns all issues for that projectUsage
The tool can be used to retrieve all issues associated with a specific project using the project's UUID identifier.
Testing
Summary by CodeRabbit