Add repository label management write tool (create_label) #15
Reference in New Issue
Block a user
Delete Branch "%!s()"
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 support for creating repository labels through the MCP server by introducing a new write-mode tool:
create_label.This would allow ChatGPT/MCP workflows to create missing repository labels directly instead of requiring labels to be created manually in the Gitea UI before they can be applied to issues.
Problem
The current MCP server supports:
But it does not support creating repository labels themselves.
This creates workflow friction for issue management automation because:
Why this is useful
Adding
create_labelwould make the MCP write surface more complete for issue/project hygiene and setup tasks, especially for:Proposed capability
Introduce a write-mode MCP tool:
create_labelSuggested arguments:
ownerreponamecolordescriptionProposed implementation areas
1. Gitea client
Add a new client method in
src/aegis_gitea_mcp/gitea_client.pyfor repository label creation.Suggested shape:
create_label(owner, repo, name, color, description=None)2. Argument schema
Add a new validated argument model in
src/aegis_gitea_mcp/tools/arguments.py.Suggested schema:
CreateLabelArgsValidation should include at least:
3. Write tool
Add a new tool implementation in
src/aegis_gitea_mcp/tools/write_tools.py.Suggested shape:
create_label_tool(...)4. Tool registration
Register the tool in the MCP tool surface so it appears in:
5. Documentation
Update at minimum:
docs/api-reference.mddocs/write-mode.mdSecurity / policy requirements
This should remain a write-mode-only capability.
Recommended controls:
WRITE_MODE=trueOperational considerations
Need to define expected behavior for:
Suggested response shape
Return something similar to:
Nice follow-up work
Once
create_labelexists, likely next logical additions would be:update_labeldelete_labelThose do not need to be part of this issue, but are worth keeping in mind for future completeness.
Definition of done
create_labelclient method implementedCreateLabelArgsvalidation addedcreate_label_toolimplemented