Skip to main content
Glama

get_test_case

Retrieve detailed information about a specific test case in Zephyr Scale Cloud for test management and execution tracking.

Instructions

Get detailed information about a specific test case

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
testCaseKeyYesTest case key to retrieve (format: [A-Z]+-T[0-9]+)

Implementation Reference

  • The main handler function for the 'get_test_case' MCP tool. It validates the testCaseKey input, calls the ZephyrClient to fetch the test case details, formats the response as JSON, and handles errors.
    async function getTestCase(args) {
      try {
        const { testCaseKey } = args;
        if (!testCaseKey) {
          throw new Error('testCaseKey is required');
        }
    
        if (!config.testCaseKeyPattern.test(testCaseKey)) {
          throw new Error('Invalid testCaseKey format. Must match pattern: [A-Z]+-T[0-9]+');
        }
    
        const testCase = await client.getTestCase(testCaseKey);
    
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(testCase, null, 2)
            }
          ]
        };
      } catch (error) {
        return {
          content: [
            {
              type: 'text',
              text: formatError(error, `fetching test case ${args.testCaseKey}`)
            }
          ],
          isError: true
        };
      }
    }
  • Input schema for the 'get_test_case' tool, specifying the required 'testCaseKey' parameter with type, description, and regex pattern validation.
    inputSchema: {
      type: 'object',
      properties: {
        testCaseKey: {
          type: 'string',
          description: 'Test case key to retrieve (format: [A-Z]+-T[0-9]+)',
          pattern: config.testCaseKeyPattern.source
        }
      },
      required: ['testCaseKey']
    },
  • Registration of the 'get_test_case' tool in the testCaseTools array, including name, description, inputSchema, and handler reference. This array is imported and spread into the main MCP tools list.
    {
      name: 'get_test_case',
      description: 'Get detailed information about a specific test case',
      inputSchema: {
        type: 'object',
        properties: {
          testCaseKey: {
            type: 'string',
            description: 'Test case key to retrieve (format: [A-Z]+-T[0-9]+)',
            pattern: config.testCaseKeyPattern.source
          }
        },
        required: ['testCaseKey']
      },
      handler: getTestCase
    },
  • ZephyrClient helper method invoked by the tool handler to perform the actual API request for retrieving test case details.
    async getTestCase(testCaseKey) {
      return this.request('GET', `/testcases/${testCaseKey}`);
    }
  • src/index.js:30-38 (registration)
    Global registration in the MCP server where testCaseTools (containing get_test_case) is spread into the allTools array used for tool lookup and execution.
    const allTools = [
      ...projectTools,
      ...folderTools,
      ...testCaseTools,
      ...testStepsTools,
      ...testScriptTools,
      ...referenceDataTools
    ];
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 states the tool retrieves detailed information, implying a read-only operation, but doesn't specify aspects like authentication requirements, rate limits, error handling, or what 'detailed information' includes. This leaves significant gaps for a tool that likely interacts with a test management system.

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 and wastes no space, making it easy for an agent 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 complexity of test case management and the lack of annotations and output schema, the description is incomplete. It doesn't explain what 'detailed information' entails, potential side effects, or how this tool fits into broader workflows with siblings like 'update_test_case', leaving the agent with insufficient context for effective use.

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 description adds no parameter semantics beyond what the input schema provides. Since schema description coverage is 100% (the 'testCaseKey' parameter is fully documented with type, description, and pattern), the baseline score of 3 is appropriate, as the schema handles the heavy lifting without additional value from the description.

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 unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'get_test_steps' or 'list_test_cases', which also retrieve test-related information but with different scopes.

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. It doesn't mention prerequisites, context for selecting this over similar tools like 'get_test_steps' or 'list_test_cases', or any exclusions, leaving the agent to infer usage based on 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/donyfs/mcp-zephyr'

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