PR review tool #59

Closed
opened 2026-01-29 23:13:48 +00:00 by MalcolmMielle · 4 comments
MalcolmMielle commented 2026-01-29 23:13:48 +00:00 (Migrated from codeberg.org)

HI, thanks for taking this on!

I think that this repo was forked for the gitea MCP server. There are (a lot) of new tools on the gitea repo, would it be possible to import them to forgejo MCP server? Especially the latest commit with the PR review :)?

HI, thanks for taking this on! I think that this repo was forked for the gitea MCP server. There are (a lot) of new tools on the gitea repo, would it be possible to import them to forgejo MCP server? Especially the latest commit with the PR review :)?
goern commented 2026-01-30 07:45:33 +00:00 (Migrated from codeberg.org)

Hi @MalcolmMielle, thanks for this request!

I've started working on this. Here's what I'm planning to add — 6 new write-side PR review tools to complement the existing read-only ones (list_pull_reviews, get_pull_review, list_pull_review_comments):

Tool Purpose
create_pull_review Create a review with state (approve/request-changes/comment) and optional inline comments
submit_pull_review Submit a pending review with a verdict
dismiss_pull_review Dismiss a review with a reason
delete_pull_review Delete a pending review
create_review_requests Request reviews from specific users/teams
delete_review_requests Cancel pending review requests

All of these are already supported by the Forgejo SDK — this is about exposing them as MCP tools.

Is this what you had in mind? Are there any other tools from the upstream Gitea MCP server you'd particularly like to see prioritized? Happy to adjust scope based on your feedback.

Hi @MalcolmMielle, thanks for this request! I've started working on this. Here's what I'm planning to add — 6 new **write-side PR review tools** to complement the existing read-only ones (`list_pull_reviews`, `get_pull_review`, `list_pull_review_comments`): | Tool | Purpose | |------|---------| | `create_pull_review` | Create a review with state (approve/request-changes/comment) and optional inline comments | | `submit_pull_review` | Submit a pending review with a verdict | | `dismiss_pull_review` | Dismiss a review with a reason | | `delete_pull_review` | Delete a pending review | | `create_review_requests` | Request reviews from specific users/teams | | `delete_review_requests` | Cancel pending review requests | All of these are already supported by the Forgejo SDK — this is about exposing them as MCP tools. **Is this what you had in mind?** Are there any other tools from the upstream Gitea MCP server you'd particularly like to see prioritized? Happy to adjust scope based on your feedback.
MalcolmMielle commented 2026-01-30 08:19:55 +00:00 (Migrated from codeberg.org)

Thanks for your quick answer!

I think the one I was looking at was create_pull_request_review. If I understand correctly, it's about sending PR review with per line comments?

I think the one your proposed also look great

Thanks for your quick answer! I think the one I was looking at was `create_pull_request_review`. If I understand correctly, it's about sending PR review with per line comments? I think the one your proposed also look great
goern commented 2026-01-30 09:28:22 +00:00 (Migrated from codeberg.org)

Implementation is ready on main (commit 578643c). Here are the 6 new tools:

Tool Purpose
create_pull_review Create a review with state (approve/request-changes/comment) and optional per-line inline comments
submit_pull_review Submit a pending review with a verdict
dismiss_pull_review Dismiss a review with a reason
delete_pull_review Delete a pending review
create_review_requests Request reviews from specific users/teams
delete_review_requests Cancel pending review requests

How to test

The easiest way is with the MCP Inspector:

npx @modelcontextprotocol/inspector ./forgejo-mcp --transport stdio

This gives you a web UI to call each tool individually with parameters and inspect responses.

Test walkthrough

You'll need a Forgejo instance with a repo that has at least one open PR.

1. Create a review with inline comments (the key use case from your request):

Tool: create_pull_review
Params:
  owner: <your-org>
  repo: <your-repo>
  index: <pr-number>
  state: REQUEST_CHANGES
  body: "Some changes needed"
  comments: [{"path":"README.md","body":"Typo here","new_position":1}]

Verify the review appears in the PR timeline and the inline comment shows on the correct line in the diff view.

2. Approve a PR:

Tool: create_pull_review
Params:
  owner / repo / index: (same as above)
  state: APPROVED
  body: "LGTM"

3. Request a review from someone:

Tool: create_review_requests
Params:
  owner / repo / index: (same as above)
  reviewers: "alice,bob"

4. Dismiss a review:

Tool: dismiss_pull_review
Params:
  owner / repo / index: (same as above)
  id: <review-id from step 2>
  message: "Outdated feedback"

@MalcolmMielle — would you be able to give these a spin and let us know if they work for your use case? Especially the inline comments feature (test 1 above) since that's what you were most interested in. Any feedback is welcome!

Implementation is ready on `main` (commit 578643c). Here are the 6 new tools: | Tool | Purpose | |------|---------| | `create_pull_review` | Create a review with state (approve/request-changes/comment) and optional per-line inline comments | | `submit_pull_review` | Submit a pending review with a verdict | | `dismiss_pull_review` | Dismiss a review with a reason | | `delete_pull_review` | Delete a pending review | | `create_review_requests` | Request reviews from specific users/teams | | `delete_review_requests` | Cancel pending review requests | ### How to test The easiest way is with the **MCP Inspector**: ```bash npx @modelcontextprotocol/inspector ./forgejo-mcp --transport stdio ``` This gives you a web UI to call each tool individually with parameters and inspect responses. ### Test walkthrough You'll need a Forgejo instance with a repo that has at least one open PR. **1. Create a review with inline comments** (the key use case from your request): ``` Tool: create_pull_review Params: owner: <your-org> repo: <your-repo> index: <pr-number> state: REQUEST_CHANGES body: "Some changes needed" comments: [{"path":"README.md","body":"Typo here","new_position":1}] ``` Verify the review appears in the PR timeline and the inline comment shows on the correct line in the diff view. **2. Approve a PR:** ``` Tool: create_pull_review Params: owner / repo / index: (same as above) state: APPROVED body: "LGTM" ``` **3. Request a review from someone:** ``` Tool: create_review_requests Params: owner / repo / index: (same as above) reviewers: "alice,bob" ``` **4. Dismiss a review:** ``` Tool: dismiss_pull_review Params: owner / repo / index: (same as above) id: <review-id from step 2> message: "Outdated feedback" ``` --- @MalcolmMielle — would you be able to give these a spin and let us know if they work for your use case? Especially the inline comments feature (test 1 above) since that's what you were most interested in. Any feedback is welcome!
MalcolmMielle commented 2026-01-30 11:06:11 +00:00 (Migrated from codeberg.org)

Super! I'll give it a try and come back to you if I have questions/comments

Super! I'll give it a try and come back to you if I have questions/comments
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
agentic-forges/forgejo-mcp#59
No description provided.