Skip to main content
Glama
snowild

Redmine MCP Server

by snowild

get_priorities

Retrieve a formatted list of all available issue priorities from the Redmine project management system to support task prioritization and workflow management.

Instructions

取得所有可用的議題優先級列表

Returns:
    格式化的優先級列表

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main MCP tool handler for 'get_priorities'. Registered via @mcp.tool() decorator. Fetches priorities using RedmineClient and formats them into a readable table string.
    @mcp.tool()
    def get_priorities() -> str:
        """
        取得所有可用的議題優先級列表
        
        Returns:
            格式化的優先級列表
        """
        try:
            client = get_client()
            priorities = client.get_priorities()
            
            if not priorities:
                return "沒有找到議題優先級"
            
            result = "可用的議題優先級:\n\n"
            result += f"{'ID':<5} {'名稱':<15} {'預設':<8}\n"
            result += f"{'-'*5} {'-'*15} {'-'*8}\n"
            
            for priority in priorities:
                is_default = "是" if priority.get('is_default', False) else "否"
                result += f"{priority['id']:<5} {priority['name']:<15} {is_default:<8}\n"
            
            return result
            
        except RedmineAPIError as e:
            return f"取得議題優先級失敗: {str(e)}"
        except Exception as e:
            return f"系統錯誤: {str(e)}"
  • Helper method in RedmineClient that performs the actual API call to retrieve the list of issue priorities from Redmine (/enumerations/issue_priorities.json). Called by the MCP tool handler.
    def get_priorities(self) -> List[Dict[str, Any]]:
        """取得優先級列表"""
        response = self._make_request('GET', '/enumerations/issue_priorities.json')
        return response.get('issue_priorities', [])
  • The FastMCP instance is created and tools are registered using @mcp.tool() decorators on each tool function, including get_priorities.
    mcp = FastMCP("Redmine MCP")
    
    
    @mcp.tool()

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/snowild/redmine-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server