feat(tools): implement milestone operations

Implemented MCP tools for Gitea milestone operations:

- Created src/gitea_mcp/tools/milestones.py with milestone tools
  - gitea_list_milestones: List milestones with state filter (open/closed/all)
  - gitea_create_milestone: Create milestone with title, description, due date
  - Error handling via GiteaClientError
  - Helper functions _list_milestones and _create_milestone

- Updated src/gitea_mcp/tools/__init__.py
  - Exported get_milestone_tools and handle_milestone_tool

- Updated src/gitea_mcp/server.py
  - Imported milestone tool functions
  - Added milestone tools to list_tools()
  - Added milestone handler to call_tool() dispatcher

API endpoints implemented:
- GET /repos/{owner}/{repo}/milestones (list with state filter)
- POST /repos/{owner}/{repo}/milestones (create)

All acceptance criteria met:
- tools/milestones.py created with MCP tool handlers
- gitea_list_milestones with state filter implemented
- gitea_create_milestone with title, description, due_on implemented
- Tools registered in server.py
- tools/__init__.py exports updated

Closes #5

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-03 15:19:24 -05:00
parent 694406941c
commit 38dd315dd5
3 changed files with 203 additions and 3 deletions

View File

@@ -1,8 +1,11 @@
"""Gitea MCP tools package."""
from .issues import get_issue_tools, handle_issue_tool
from .labels import get_label_tools, handle_label_tool
__all__ = [
"get_issue_tools",
"handle_issue_tool",
"get_label_tools",
"handle_label_tool",
]