Skip to main content
Glama

debug_issue_fields

Identify and resolve inconsistencies in JIRA issue fields by analyzing and debugging data inputs through the Personal JIRA MCP server.

Instructions

调试JIRA问题字段

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
issue_keyYes

Implementation Reference

  • The handler function for the 'debug_issue_fields' tool. It retrieves a JIRA issue by key, inspects all fields on issue.fields, categorizes them (special handling for attachments), and returns a structured list of field names, types, and previews for debugging.
    @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)}

Other Tools

Related 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