Skip to main content
Glama
yuezheng2006

Personal JIRA MCP

by yuezheng2006

debug_issue_fields

Analyze and troubleshoot JIRA issue field configurations to identify and resolve data display or validation problems.

Instructions

调试JIRA问题字段

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
issue_keyYes

Implementation Reference

  • Implementation of the debug_issue_fields tool: MCP tool handler that inspects and returns the field structure of a JIRA issue for debugging purposes.
    @mcp.tool(
        description="调试JIRA问题字段",
    )
    def debug_issue_fields(
        issue_key: str,
    ) -> Dict[str, Any]:
        """查看JIRA问题的字段结构,用于调试.
        
        Args:
            issue_key: JIRA问题键
        
        Returns:
            Dict[str, Any]: 字段结构信息
        """
        logger.info(f"调试问题字段: {issue_key}")
        try:
            client = get_jira_client()
            issue = client.issue(issue_key)
            
            fields = []
            for field_name in dir(issue.fields):
                if field_name.startswith('_') or callable(getattr(issue.fields, field_name)):
                    continue
                    
                value = getattr(issue.fields, field_name)
                field_type = type(value).__name__
                
                if field_name in ('attachment', 'attachments'):
                    if value:
                        attachment_info = []
                        for att in value:
                            attachment_info.append({
                                "id": getattr(att, "id", None),
                                "filename": getattr(att, "filename", None),
                                "size": getattr(att, "size", None),
                                "content_type": getattr(att, "mimeType", None),
                                "created": getattr(att, "created", None),
                            })
                        fields.append({"name": field_name, "type": field_type, "value": attachment_info})
                    else:
                        fields.append({"name": field_name, "type": field_type, "value": None})
                else:
                    # 对于其他字段,仅显示类型信息和简单值
                    simple_value = str(value)[:100] if value is not None else None
                    fields.append({"name": field_name, "type": field_type, "preview": simple_value})
            
            return {
                "id": issue.id,
                "key": issue.key,
                "fields": sorted(fields, key=lambda x: x["name"])
            }
        except Exception as e:
            logger.error(f"调试问题 {issue_key} 字段失败: {str(e)}")
            return {"error": str(e)}
  • MCP tool registration decorator for debug_issue_fields.
    @mcp.tool(
        description="调试JIRA问题字段",
    )
Behavior1/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. '调试' (debug) implies a read or diagnostic operation, but it doesn't specify whether it's safe (non-destructive), requires permissions, has side effects, or what the output entails. This leaves the agent guessing about critical behavioral traits.

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

Conciseness3/5

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

The description is a single phrase, which is concise but under-specified rather than efficiently informative. It's front-loaded but lacks necessary detail, making it more of a placeholder than a helpful summary. While not verbose, it doesn't earn its place with actionable content.

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

Completeness1/5

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

Given the complexity (a debugging tool with no annotations, 1 undocumented parameter, and no output schema), the description is severely incomplete. It doesn't explain what debugging involves, what fields are examined, the output format, or how it differs from sibling tools like 'get_issue'. This leaves the agent with insufficient context to use the tool effectively.

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

Parameters1/5

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

The description adds no meaning beyond the input schema. With 1 parameter (issue_key) and 0% schema description coverage, the schema only provides a title and type. The description doesn't explain what 'issue_key' is (e.g., a JIRA identifier like 'PROJ-123'), its format, or how it's used in debugging, failing to compensate for the low schema coverage.

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

Purpose2/5

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

The description '调试JIRA问题字段' (Debug JIRA issue fields) states a general purpose but is vague. It doesn't specify what 'debug' entails (e.g., inspect, validate, troubleshoot) or what resource is affected beyond 'JIRA issue fields'. Compared to siblings like 'get_issue' or 'update_issue', it lacks differentiation in verb specificity or scope.

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

Usage Guidelines1/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 prerequisites, context (e.g., for troubleshooting vs. regular operations), or exclusions. With siblings like 'get_issue' for retrieval and 'update_issue' for modification, there's no indication of when 'debug_issue_fields' is the appropriate choice.

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/yuezheng2006/mcp-server-jira'

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