Skip to content

Conversation

sushitommy
Copy link

@sushitommy sushitommy commented Sep 13, 2025

This PR adds a new tool to list all issues for a specific project.

Changes

  • Added list_project_issues tool in src/tools/project-issues.ts
  • Updated src/tools/index.ts to register the new tool
  • The tool accepts a project_id parameter and returns all issues for that project

Usage

The tool can be used to retrieve all issues associated with a specific project using the project's UUID identifier.

Testing

  • Tool has been tested with valid project IDs
  • Error handling works correctly for invalid project IDs
  • Response format matches expected structure

Summary by CodeRabbit

  • New Features
    • Introduced a tool to list project issues by providing a project ID. Returns a readable JSON response of issues for the selected project.
    • Tool is available in the standard toolset without additional setup beyond existing workspace configuration. No changes to user-facing commands or workflows required.

Copy link

coderabbitai bot commented Sep 13, 2025

Walkthrough

Introduces 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

Cohort / File(s) Summary
Tool registry updates
src/tools/index.ts
Imports registerProjectIssueTools and invokes it within registerTools(server) after registerProjectTools(server) to include project-issues tools in initialization.
New project issues tool
src/tools/project-issues.ts
Adds registerProjectIssueTools(server) which registers list_project_issues tool. Validates project_id (string) via zod, calls makePlaneRequest GET workspaces/${PLANE_WORKSPACE_SLUG}/projects/${project_id}/issues/, and returns pretty-printed JSON in a text block.

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
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

I hop through repos, ears up high,
A new tool blinks—issues fly by!
One GET request, neat JSON blooms,
Workspace winds through project rooms.
I thump “all set!” with fluffy cheer—
Tools now list what’s tracked right here. 🐇✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title "feat: add project issue listing tool" clearly and concisely summarizes the primary change in this PR—adding a tool to list project issues—and matches the modified files (src/tools/project-issues.ts and src/tools/index.ts), using a conventional "feat:" prefix.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

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.

❤️ Share

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

Copy link

@coderabbitai coderabbitai bot left a 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 like page, page_size, and returning only results 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

📥 Commits

Reviewing files that changed from the base of the PR and between 1a199cd and 0022f58.

📒 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 after registerProjectTools(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"),
Copy link

@coderabbitai coderabbitai bot Sep 13, 2025

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.

Suggested change
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.

Copy link
Member

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

Copy link

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!

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.

2 participants