Skip to main content
Glama
leorosignoli

JIRA Zephyr MCP Server

by leorosignoli

get_test_case

Retrieve detailed information about a specific test case from JIRA's Zephyr test management system using its ID or key.

Instructions

Get detailed information about a specific test case

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
testCaseIdYesTest case ID or key

Implementation Reference

  • The primary handler function that executes the 'get_test_case' tool logic: fetches test case data from Zephyr client and returns formatted response with error handling.
    export const getTestCase = async (input: { testCaseId: string }) => {
      try {
        const testCase = await getZephyrClient().getTestCase(input.testCaseId);
        
        return {
          success: true,
          data: {
            id: testCase.id,
            key: testCase.key,
            name: testCase.name,
            projectKey: testCase.project?.id,
            objective: testCase.objective,
            precondition: testCase.precondition,
            estimatedTime: testCase.estimatedTime,
            priority: testCase.priority,
            status: testCase.status,
            folder: testCase.folder,
            labels: testCase.labels || [],
            component: testCase.component,
            owner: testCase.owner,
            createdOn: testCase.createdOn,
            customFields: testCase.customFields,
            links: testCase.links,
            testScript: testCase.testScript,
          },
        };
      } catch (error: any) {
        return {
          success: false,
          error: error.response?.data?.message || error.message,
        };
      }
    };
  • src/index.ts:240-250 (registration)
    Registers the 'get_test_case' tool in the MCP server's listTools response, defining its name, description, and input schema.
    {
      name: 'get_test_case',
      description: 'Get detailed information about a specific test case',
      inputSchema: {
        type: 'object',
        properties: {
          testCaseId: { type: 'string', description: 'Test case ID or key' },
        },
        required: ['testCaseId'],
      },
    },
  • Central dispatch handler in MCP server that validates input for 'get_test_case' and calls the specific getTestCase function.
    case 'get_test_case': {
      const validatedArgs = validateInput<GetTestCaseInput>(getTestCaseSchema, args, 'get_test_case');
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(await getTestCase(validatedArgs), null, 2),
          },
        ],
      };
    }
  • Zod schema for validating input to the 'get_test_case' tool, requiring testCaseId.
    export const getTestCaseSchema = z.object({
      testCaseId: z.string().min(1, 'Test case ID is required'),
    });
  • TypeScript type inferred from getTestCaseSchema for input validation.
    export type GetTestCaseInput = z.infer<typeof getTestCaseSchema>;
Behavior2/5

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

No annotations are provided, so the description carries full burden. It mentions 'detailed information' but doesn't specify what details are included (e.g., metadata, steps, results), whether it's a read-only operation, or any constraints like authentication needs or rate limits. This leaves behavioral traits unclear for a tool that likely queries a database.

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, clear sentence with no wasted words. It's front-loaded with the core action and resource, making it easy to parse quickly. This efficiency is ideal for a simple retrieval tool.

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 complexity of a test case retrieval tool with no annotations and no output schema, the description is incomplete. It doesn't explain what 'detailed information' entails, the return format, or error handling, which are crucial for an agent to use this effectively in a testing context.

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?

Schema description coverage is 100%, with the single parameter 'testCaseId' documented as 'Test case ID or key'. The description adds no additional meaning beyond this, such as format examples or where to find the ID. With high schema coverage, the baseline score of 3 is appropriate as the schema does the heavy lifting.

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 ('Get') and resource ('detailed information about a specific test case'), making the purpose understandable. However, it doesn't distinguish this tool from potential siblings like 'search_test_cases' or 'get_test_execution_status', which might also retrieve test case information but with different scopes or formats.

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 siblings like 'search_test_cases' (for multiple cases) and 'get_test_execution_status' (for status info), there's no indication that this tool is for single-case details, leaving the agent to guess based on context.

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