feat: add set_label, comment_on_issue, and create_repo MCP tools #10
No reviewers
Labels
No labels
domain:backend
domain:devops
domain:frontend
status:approved
status:in-progress
status:needs-fix
status:qa
test:label-a
test:label-b
test:set-label
type:bug
type:devops
type:feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ldraney/forgejo-mcp!10
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "6-add-set-label-comment-on-issue-create-repo"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Add three new MCP tools to
workflows.pythat unblock the agent workflow state machine:set_label(resolves label names to IDs, supports add/replace modes),comment_on_issue(posts markdown comments), andcreate_repo(handles user and org repo creation with auto-init).Changes
src/forgejo_mcp/tools/workflows.py-- Addedset_label,comment_on_issue, andcreate_repotool functions following existing@mcp.tool()pattern withAnnotatedparams, JSON return, and_error_response()error handlingtests/test_new_tools.py-- Added 6 integration tests: set_label add mode, replace mode, missing label error, invalid mode error; comment_on_issue create+verify; create_repo create+verify+cleanupTest Plan
pytest tests/ -v(6 new + 2 existing)ruff checkandruff formatboth cleanReview Checklist
@mcp.tool()pattern in workflows.pyset_labelaccepts names not IDs, resolves viaissue_list_labelsset_labelsupports both add and replace modes (default: add)comment_on_issuereturns comment ID and bodycreate_repohandles both user and org owners_error_response()for error handlingRelated
plan-pal-e-agency(traceability)Closes #6