Skip to main content
Glama
leorosignoli

JIRA Zephyr MCP Server

by leorosignoli

search_test_cases

Find test cases in JIRA Zephyr projects using search queries to locate specific tests for quality assurance and testing workflows.

Instructions

Search for test cases in a project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectKeyYesJIRA project key
queryNoSearch query (optional)
limitNoMaximum number of results (default: 50)

Implementation Reference

  • Main handler function that parses input using schema, calls Zephyr client to search test cases, maps and returns formatted results or error.
    export const searchTestCases = async (input: SearchTestCasesInput) => {
      const validatedInput = searchTestCasesSchema.parse(input);
      
      try {
        const result = await getZephyrClient().searchTestCases(
          validatedInput.projectKey,
          validatedInput.query,
          validatedInput.limit
        );
        
        return {
          success: true,
          data: {
            testCases: result.testCases.map(testCase => ({
              id: testCase.id,
              key: testCase.key,
              name: testCase.name,
              objective: testCase.objective,
              precondition: testCase.precondition,
              estimatedTime: testCase.estimatedTime,
              priority: testCase.priority?.id,
              status: testCase.status?.id,
              folder: testCase.folder?.id,
              labels: testCase.labels || [],
              component: testCase.component?.id,
              owner: testCase.owner?.accountId,
              createdOn: testCase.createdOn,
              linkedIssues: testCase.links?.issues?.length || 0,
            })),
            total: result.total,
            projectKey: validatedInput.projectKey,
          },
        };
      } catch (error: any) {
        return {
          success: false,
          error: error.response?.data?.message || error.message,
        };
      }
  • Zod schema defining input validation for the search_test_cases tool: requires projectKey, optional query and limit.
    export const searchTestCasesSchema = z.object({
      projectKey: z.string().min(1, 'Project key is required'),
      query: z.string().optional(),
      limit: z.number().min(1).max(100).default(50),
    });
  • src/index.ts:228-239 (registration)
    Tool registration in the TOOLS array, defining name, description, and inputSchema for MCP server.
      name: 'search_test_cases',
      description: 'Search for test cases in a project',
      inputSchema: {
        type: 'object',
        properties: {
          projectKey: { type: 'string', description: 'JIRA project key' },
          query: { type: 'string', description: 'Search query (optional)' },
          limit: { type: 'number', description: 'Maximum number of results (default: 50)' },
        },
        required: ['projectKey'],
      },
    },
  • src/index.ts:449-458 (registration)
    Dispatch handler in the MCP server's CallToolRequest switch statement that validates args and calls the searchTestCases function.
    case 'search_test_cases': {
      const validatedArgs = validateInput<SearchTestCasesInput>(searchTestCasesSchema, args, 'search_test_cases');
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(await searchTestCases(validatedArgs), null, 2),
          },
        ],
      };
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions 'search' but doesn't specify if this is read-only, requires authentication, has rate limits, or describes the return format (e.g., pagination, error handling). This is a significant gap for a tool with parameters and no output schema.

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 with no wasted words. It's appropriately sized and front-loaded, directly stating the tool's function without unnecessary elaboration.

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 tool has 3 parameters, no annotations, and no output schema, the description is incomplete. It doesn't address behavioral aspects like safety, permissions, or result format, which are crucial for an agent to use it correctly in a search operation.

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 input schema has 100% description coverage, so parameters are well-documented in the schema. The description adds no additional meaning beyond implying a search context, which is already clear from the name and schema. 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 action ('Search for') and resource ('test cases in a project'), making the purpose understandable. However, it doesn't differentiate from sibling tools like 'get_test_case' or 'list_test_plans', which might have overlapping functionality, so it doesn't reach a 5.

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 such as 'get_test_case' or 'list_test_plans'. It lacks context on prerequisites, exclusions, or specific scenarios, leaving the agent to infer usage from the name alone.

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