feat(server): add issue and pull-request tools #12

Merged
David merged 1 commit from feat/issues-prs-tools-fjmcp-11 into main 2026-06-14 19:53:56 +02:00
Owner

Expose the issue-management and pull-request operations from fj_core::issues and fj_core::prs as MCP tools, each tagged with its FJMCP-10 permission tier. Read-only tools run unconditionally; every mutating tool calls self.require(Tier::Edit)? as its first line and returns the gating error when EDIT is disabled.

Issue tools: list_all_issues, create_issue, edit_issue, list_issue_comments, create_issue_comment, edit_issue_comment, get_issue_templates, get_issue_config, set_issue_labels. The existing list_issues and the new list_all_issues share a query builder that now exposes labels, milestones, and assignee filters on top of state. set_issue_labels takes add/rm label names and returns the unknown names under unknown_labels. create_issue and create_pull_request accept label names and resolve them to ids via the internal maybe_label_names_to_ids helper.

Pull-request tools: get_pull_request, get_pull_request_by_base_head, find_pull_request_by_branch, list_pull_request_files, list_pull_request_commits, compare_refs, get_pull_request_diff, list_pull_request_reviews, get_pull_request_review_comments, get_pull_request_commit_statuses, get_pull_request_template, create_pull_request, merge_pull_request. get_pull_request_diff returns the raw diff/patch string rather than JSON; get_pull_request_template decodes the template bytes to text and includes the is_yaml flag.

get_pull_request_commit_statuses projects the deserialize-only CommitStatusLenient (FJ-2 relative-URL tolerance) into JSON by hand. find_pull_request_by_branch drives fj_core's boxed_local (!Send) wrapper on a current-thread runtime via spawn_blocking so the tool handler's Send bound is satisfied; this bridge can be removed once fj-core switches the wrapper to boxed().

get_info instructions and the README tool tables are updated to list every new tool and its tier.

#FJMCP-11

Expose the issue-management and pull-request operations from fj_core::issues and fj_core::prs as MCP tools, each tagged with its FJMCP-10 permission tier. Read-only tools run unconditionally; every mutating tool calls self.require(Tier::Edit)? as its first line and returns the gating error when EDIT is disabled. Issue tools: list_all_issues, create_issue, edit_issue, list_issue_comments, create_issue_comment, edit_issue_comment, get_issue_templates, get_issue_config, set_issue_labels. The existing list_issues and the new list_all_issues share a query builder that now exposes labels, milestones, and assignee filters on top of state. set_issue_labels takes add/rm label names and returns the unknown names under unknown_labels. create_issue and create_pull_request accept label names and resolve them to ids via the internal maybe_label_names_to_ids helper. Pull-request tools: get_pull_request, get_pull_request_by_base_head, find_pull_request_by_branch, list_pull_request_files, list_pull_request_commits, compare_refs, get_pull_request_diff, list_pull_request_reviews, get_pull_request_review_comments, get_pull_request_commit_statuses, get_pull_request_template, create_pull_request, merge_pull_request. get_pull_request_diff returns the raw diff/patch string rather than JSON; get_pull_request_template decodes the template bytes to text and includes the is_yaml flag. get_pull_request_commit_statuses projects the deserialize-only CommitStatusLenient (FJ-2 relative-URL tolerance) into JSON by hand. find_pull_request_by_branch drives fj_core's boxed_local (!Send) wrapper on a current-thread runtime via spawn_blocking so the tool handler's Send bound is satisfied; this bridge can be removed once fj-core switches the wrapper to boxed(). get_info instructions and the README tool tables are updated to list every new tool and its tier. #FJMCP-11
feat(server): add issue and pull-request tools
All checks were successful
Check / fmt + clippy + build + tests (pull_request) Successful in 34s
Create release / Create release from merged PR (pull_request) Has been skipped
90b334022e
Expose the issue-management and pull-request operations from fj_core::issues and fj_core::prs as MCP tools, each tagged with its FJMCP-10 permission tier. Read-only tools run unconditionally; every mutating tool calls self.require(Tier::Edit)? as its first line and returns the gating error when EDIT is disabled.

Issue tools: list_all_issues, create_issue, edit_issue, list_issue_comments, create_issue_comment, edit_issue_comment, get_issue_templates, get_issue_config, set_issue_labels. The existing list_issues and the new list_all_issues share a query builder that now exposes labels, milestones, and assignee filters on top of state. set_issue_labels takes add/rm label names and returns the unknown names under unknown_labels. create_issue and create_pull_request accept label names and resolve them to ids via the internal maybe_label_names_to_ids helper.

Pull-request tools: get_pull_request, get_pull_request_by_base_head, find_pull_request_by_branch, list_pull_request_files, list_pull_request_commits, compare_refs, get_pull_request_diff, list_pull_request_reviews, get_pull_request_review_comments, get_pull_request_commit_statuses, get_pull_request_template, create_pull_request, merge_pull_request. get_pull_request_diff returns the raw diff/patch string rather than JSON; get_pull_request_template decodes the template bytes to text and includes the is_yaml flag.

get_pull_request_commit_statuses projects the deserialize-only CommitStatusLenient (FJ-2 relative-URL tolerance) into JSON by hand. find_pull_request_by_branch drives fj_core's boxed_local (!Send) wrapper on a current-thread runtime via spawn_blocking so the tool handler's Send bound is satisfied; this bridge can be removed once fj-core switches the wrapper to boxed().

get_info instructions and the README tool tables are updated to list every new tool and its tier.

#FJMCP-11
David merged commit 162c6e2ce6 into main 2026-06-14 19:53:56 +02:00
David deleted branch feat/issues-prs-tools-fjmcp-11 2026-06-14 19:53:56 +02:00
Commenting is not possible because the repository is archived.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
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
pandoras-box/forgejo-mcp!12
No description provided.