Skip to main content
Glama
snowild

Redmine MCP Server

by snowild

get_projects

Retrieve a list of accessible projects from Redmine to view available work items and manage project operations.

Instructions

取得可存取的專案列表

Returns:
    格式化的專案列表

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler function for get_projects tool. Retrieves up to 50 accessible Redmine projects, formats them into a readable table (ID, identifier, name, status), returns as string or error message.
    @mcp.tool()
    def get_projects() -> str:
        """
        取得可存取的專案列表
        
        Returns:
            格式化的專案列表
        """
        try:
            client = get_client()
            projects = client.list_projects(limit=50)
            
            if not projects:
                return "沒有找到可存取的專案"
            
            result = f"找到 {len(projects)} 個專案:\n\n"
            result += f"{'ID':<5} {'識別碼':<20} {'名稱':<30} {'狀態':<8}\n"
            result += f"{'-'*5} {'-'*20} {'-'*30} {'-'*8}\n"
            
            for project in projects:
                status_text = "正常" if project.status == 1 else "封存"
                name = project.name[:27] + "..." if len(project.name) > 30 else project.name
                result += f"{project.id:<5} {project.identifier:<20} {name:<30} {status_text:<8}\n"
            
            return result
            
        except RedmineAPIError as e:
            return f"取得專案列表失敗: {str(e)}"
        except Exception as e:
            return f"系統錯誤: {str(e)}"

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