get_issue_statuses
Retrieve a formatted list of all available issue statuses from Redmine project management systems. This tool facilitates effective issue tracking and management by providing clear status options.
Instructions
取得所有可用的議題狀態列表
Returns:
格式化的狀態列表
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Input Schema (JSON Schema)
{
"properties": {},
"title": "get_issue_statusesArguments",
"type": "object"
}
Implementation Reference
- src/redmine_mcp/server.py:259-288 (handler)MCP tool handler function that fetches issue statuses using the Redmine client and formats them into a readable table with ID, name, and closed status.@mcp.tool() def get_issue_statuses() -> str: """ 取得所有可用的議題狀態列表 Returns: 格式化的狀態列表 """ try: client = get_client() statuses = client.get_issue_statuses() if not statuses: return "沒有找到議題狀態" result = "可用的議題狀態:\n\n" result += f"{'ID':<5} {'名稱':<15} {'已關閉':<8}\n" result += f"{'-'*5} {'-'*15} {'-'*8}\n" for status in statuses: is_closed = "是" if status.get('is_closed', False) else "否" result += f"{status['id']:<5} {status['name']:<15} {is_closed:<8}\n" return result except RedmineAPIError as e: return f"取得議題狀態失敗: {str(e)}" except Exception as e: return f"系統錯誤: {str(e)}"
- RedmineClient helper method that performs the API GET request to /issue_statuses.json and returns the list of status dictionaries.def get_issue_statuses(self) -> List[Dict[str, Any]]: """取得議題狀態列表""" response = self._make_request('GET', '/issue_statuses.json') return response.get('issue_statuses', [])
- src/redmine_mcp/server.py:259-259 (registration)The @mcp.tool() decorator registers this function as an MCP tool.@mcp.tool()