Skip to main content
Glama
snowild

Redmine MCP Server

by snowild

list_project_issues

Retrieve and filter issues from a Redmine project by status, displaying results in a table format for project management tracking.

Instructions

列出專案的議題

Args:
    project_id: 專案 ID
    status_filter: 狀態篩選 ("open", "closed", "all")
    limit: 最大回傳數量 (預設 20,最大 100)

Returns:
    專案議題列表,以表格格式呈現

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYes
status_filterNoopen
limitNo

Implementation Reference

  • The complete implementation of the 'list_project_issues' tool handler. It is registered via the @mcp.tool() decorator. The function fetches issues from a Redmine project using the Redmine client, applies filters, and formats them into a readable table.
    @mcp.tool()
    def list_project_issues(project_id: int, status_filter: str = "open", limit: int = 20) -> str:
        """
        列出專案的議題
        
        Args:
            project_id: 專案 ID
            status_filter: 狀態篩選 ("open", "closed", "all")
            limit: 最大回傳數量 (預設 20,最大 100)
        
        Returns:
            專案議題列表,以表格格式呈現
        """
        try:
            client = get_client()
            
            # 限制 limit 範圍
            limit = min(max(limit, 1), 100)
            
            # 根據狀態篩選設定參數
            params = {
                'project_id': project_id,
                'limit': limit,
                'sort': 'updated_on:desc'
            }
            
            # 處理狀態篩選
            if status_filter == "open":
                params['status_id'] = 'o'  # Redmine API 使用 'o' 表示開放狀態
            elif status_filter == "closed":
                params['status_id'] = 'c'  # Redmine API 使用 'c' 表示關閉狀態
            # "all" 則不設定 status_id
            
            # 取得議題列表
            issues = client.list_issues(**params)
            
            if not issues:
                return f"專案 {project_id} 中沒有找到符合條件的議題"
            
            # 取得專案資訊
            try:
                project = client.get_project(project_id)
                project_name = project.name
            except:
                project_name = f"專案 {project_id}"
            
            # 格式化議題列表
            result = f"""專案: {project_name}
    狀態篩選: {status_filter}
    找到 {len(issues)} 個議題:
    
    {"ID":<8} {"標題":<40} {"狀態":<12} {"指派給":<15} {"更新時間":<10}
    {"-"*8} {"-"*40} {"-"*12} {"-"*15} {"-"*10}"""
    
            for issue in issues:
                title = issue.subject[:37] + "..." if len(issue.subject) > 40 else issue.subject
                status = issue.status.get('name', 'N/A')[:10]
                assignee = issue.assigned_to.get('name', '未指派')[:13] if issue.assigned_to else '未指派'
                updated = issue.updated_on[:10] if issue.updated_on else 'N/A'
                
                result += f"\n{issue.id:<8} {title:<40} {status:<12} {assignee:<15} {updated:<10}"
            
            return result
            
        except RedmineAPIError as e:
            return f"列出專案議題失敗: {str(e)}"
        except Exception as e:
            return f"系統錯誤: {str(e)}"
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions the return format ('以表格格式呈現' - in table format), which is useful. However, it doesn't describe pagination behavior (only limit parameter), error handling, authentication requirements, rate limits, or whether it's a read-only operation (implied but not stated). For a list tool with no annotations, this leaves significant gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections (Args, Returns) and uses minimal sentences. Each sentence adds value: the purpose statement, parameter explanations, and return format. It's appropriately sized for a 3-parameter tool, though the title is null which slightly reduces structure.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (3 parameters, no output schema, no annotations), the description is partially complete. It covers parameters well and mentions the return format, but lacks behavioral context (e.g., read-only nature, error cases) and usage guidelines. Without annotations or output schema, more detail on behavior and results would improve completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds substantial meaning beyond the input schema, which has 0% description coverage. It explains all three parameters in Chinese: 'project_id' (專案 ID), 'status_filter' with allowed values ('open', 'closed', 'all'), and 'limit' with default and max values. This fully compensates for the schema's lack of descriptions, though it doesn't explain parameter interactions or constraints beyond what's listed.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose as '列出專案的議題' (list project issues), which is a specific verb+resource combination. It distinguishes itself from siblings like 'get_my_issues' (personal issues) and 'search_issues' (search across projects) by focusing on a specific project. However, it doesn't explicitly mention how it differs from 'get_issue' (single issue retrieval).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when to choose 'list_project_issues' over 'search_issues' (which might have broader filtering) or 'get_my_issues' (personal issues). There's no context about prerequisites, such as needing a valid project ID, or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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