Skip to main content
Glama
leorosignoli

JIRA Zephyr MCP Server

by leorosignoli

read_jira_issue

Retrieve JIRA issue details and metadata using an issue key to access specific information for test management and tracking.

Instructions

Read JIRA issue details and metadata

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
issueKeyYesJIRA issue key (e.g., ABC-123)
fieldsNoSpecific fields to retrieve (optional)

Implementation Reference

  • Main handler function that validates input, retrieves the Jira issue using JiraClient, extracts and formats relevant fields into a structured response, handles errors.
    export const readJiraIssue = async (input: ReadJiraIssueInput) => {
      const validatedInput = readJiraIssueSchema.parse(input);
      
      try {
        const issue = await getJiraClient().getIssue(validatedInput.issueKey, validatedInput.fields);
        
        return {
          success: true,
          data: {
            key: issue.key,
            summary: issue.fields?.summary || null,
            description: issue.fields?.description || null,
            status: issue.fields?.status ? {
              name: issue.fields.status.name,
              category: issue.fields.status.statusCategory?.name || 'Unknown',
            } : null,
            priority: issue.fields?.priority?.name || null,
            assignee: issue.fields?.assignee ? {
              name: issue.fields.assignee.displayName,
              email: issue.fields.assignee.emailAddress,
            } : null,
            reporter: issue.fields?.reporter ? {
              name: issue.fields.reporter.displayName,
              email: issue.fields.reporter.emailAddress,
            } : null,
            created: issue.fields?.created || null,
            updated: issue.fields?.updated || null,
            issueType: issue.fields?.issuetype?.name || null,
            project: issue.fields?.project ? {
              key: issue.fields.project.key,
              name: issue.fields.project.name,
            } : null,
            labels: issue.fields?.labels || [],
            components: issue.fields?.components?.map(c => c.name) || [],
            fixVersions: issue.fields?.fixVersions?.map(v => v.name) || [],
            customFields: issue.fields ? Object.entries(issue.fields)
              .filter(([key]) => key.startsWith('customfield_'))
              .reduce((acc, [key, value]) => ({
                ...acc,
                [key]: value,
              }), {}) : {},
          },
        };
      } catch (error: any) {
        return {
          success: false,
          error: error.response?.data?.errorMessages?.[0] || error.message,
        };
      }
    };
  • Zod schema defining the input structure for the read_jira_issue tool: issueKey (required string), fields (optional array of strings).
    export const readJiraIssueSchema = z.object({
      issueKey: z.string().min(1, 'Issue key is required'),
      fields: z.array(z.string()).optional(),
    });
  • src/index.ts:64-75 (registration)
    Tool specification object registered in the TOOLS array used by listTools MCP handler, defining name, description, and input schema.
    {
      name: 'read_jira_issue',
      description: 'Read JIRA issue details and metadata',
      inputSchema: {
        type: 'object',
        properties: {
          issueKey: { type: 'string', description: 'JIRA issue key (e.g., ABC-123)' },
          fields: { type: 'array', items: { type: 'string' }, description: 'Specific fields to retrieve (optional)' },
        },
        required: ['issueKey'],
      },
    },
  • src/index.ts:329-339 (registration)
    Dispatch handler in the callTool MCP request handler that validates arguments using the schema and invokes the readJiraIssue function.
    case 'read_jira_issue': {
      const validatedArgs = validateInput<ReadJiraIssueInput>(readJiraIssueSchema, args, 'read_jira_issue');
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(await readJiraIssue(validatedArgs), null, 2),
          },
        ],
      };
    }
  • Singleton helper function to lazily initialize and return the JiraClient instance.
    const getJiraClient = (): JiraClient => {
      if (!jiraClient) {
        jiraClient = new JiraClient();
      }
      return jiraClient;
    };
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. While 'Read' implies a safe operation, it doesn't specify authentication requirements, rate limits, error handling, or what 'details and metadata' includes (e.g., fields like status, assignee, comments). This leaves significant gaps for an agent to understand the tool's behavior.

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

Conciseness5/5

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

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It's front-loaded with the core action, making it easy to parse quickly.

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

Completeness2/5

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

Given the lack of annotations and output schema, the description is incomplete for a tool with two parameters. It doesn't explain the return format, error cases, or behavioral nuances, leaving the agent with insufficient context to use the tool effectively beyond basic parameter passing.

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

Parameters3/5

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

The schema description coverage is 100%, with clear documentation for both parameters (issueKey and fields). The description adds no additional meaning beyond what the schema provides, such as examples of common fields or default behavior when 'fields' is omitted. This meets the baseline for high schema coverage.

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 verb ('Read') and resource ('JIRA issue details and metadata'), making the tool's function immediately understandable. However, it doesn't distinguish this tool from potential siblings like 'get_test_case' or 'get_test_execution_status' that might also read JIRA data, missing explicit differentiation.

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. With sibling tools like 'link_tests_to_issues' and 'search_test_cases' that might involve JIRA issues, there's no indication of context, prerequisites, or exclusions for this read operation.

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/leorosignoli/jira-zephyr-mcp'

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