Skip to main content
Glama

get_test_steps

Retrieve test steps for a specific test case with paginated results, supporting up to 100 items per page.

Instructions

Get test steps for a test case (paged response, 100 items per page)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
testCaseKeyYesTest case key (format: [A-Z]+-T[0-9]+)
maxResultsNoMaximum number of steps to return (default: 50, max: 100)
startAtNoStarting position for pagination (default: 0)

Implementation Reference

  • Main handler function executing the get_test_steps tool: validates testCaseKey, prepares params, calls ZephyrClient.getTestSteps, formats JSON response or error.
    async function getTestSteps(args) {
      try {
        const { testCaseKey, maxResults, startAt } = 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 params = {
          maxResults: maxResults || config.defaultMaxResults,
          startAt: startAt || 0
        };
    
        const response = await client.getTestSteps(testCaseKey, params);
    
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify({
                testCaseKey,
                testSteps: response.values || response,
                total: response.total || response.length,
                startAt: response.startAt || 0,
                maxResults: response.maxResults || params.maxResults,
                note: 'Test steps are returned in paged format (100 items per page max)'
              }, null, 2)
            }
          ]
        };
      } catch (error) {
        return {
          content: [
            {
              type: 'text',
              text: formatError(error, `fetching test steps for ${args.testCaseKey}`)
            }
          ],
          isError: true
        };
      }
    }
  • Input schema for get_test_steps tool defining parameters (testCaseKey required, maxResults, startAt optional) with types, descriptions, patterns, and constraints.
    inputSchema: {
      type: 'object',
      properties: {
        testCaseKey: {
          type: 'string',
          description: 'Test case key (format: [A-Z]+-T[0-9]+)',
          pattern: config.testCaseKeyPattern.source
        },
        maxResults: {
          type: 'number',
          description: 'Maximum number of steps to return (default: 50, max: 100)',
          minimum: 1,
          maximum: 100,
          default: 50
        },
        startAt: {
          type: 'number',
          description: 'Starting position for pagination (default: 0)',
          minimum: 0,
          default: 0
        }
      },
      required: ['testCaseKey']
    },
  • Local registration of get_test_steps tool object within testStepsTools export array, linking name, description, schema, and handler.
    {
      name: 'get_test_steps',
      description: 'Get test steps for a test case (paged response, 100 items per page)',
      inputSchema: {
        type: 'object',
        properties: {
          testCaseKey: {
            type: 'string',
            description: 'Test case key (format: [A-Z]+-T[0-9]+)',
            pattern: config.testCaseKeyPattern.source
          },
          maxResults: {
            type: 'number',
            description: 'Maximum number of steps to return (default: 50, max: 100)',
            minimum: 1,
            maximum: 100,
            default: 50
          },
          startAt: {
            type: 'number',
            description: 'Starting position for pagination (default: 0)',
            minimum: 0,
            default: 0
          }
        },
        required: ['testCaseKey']
      },
      handler: getTestSteps
    },
  • src/index.js:25-37 (registration)
    Main MCP server registration: imports testStepsTools (containing get_test_steps) and spreads into allTools array used for tool lookup and execution in MCP handlers.
    import testStepsTools from './tools/test-steps-tools.js';
    import testScriptTools from './tools/test-script-tools.js';
    import referenceDataTools from './tools/reference-data-tools.js';
    
    // Combine all tools
    const allTools = [
      ...projectTools,
      ...folderTools,
      ...testCaseTools,
      ...testStepsTools,
      ...testScriptTools,
      ...referenceDataTools
    ];
Behavior3/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 adds value by specifying 'paged response, 100 items per page', which clarifies pagination behavior and a default page size not fully detailed in the schema (where maxResults has a default of 50). However, it doesn't cover other aspects like error handling, authentication needs, or rate limits, leaving gaps for a tool with mutation-adjacent operations in the sibling list.

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 front-loads the core purpose ('Get test steps for a test case') and adds key behavioral detail ('paged response, 100 items per page') without waste. Every word earns its place, making it highly concise and well-structured.

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

Completeness3/5

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

Given 3 parameters, no annotations, and no output schema, the description is moderately complete. It covers the basic purpose and pagination behavior but lacks details on error cases, return format, or how it differs from siblings like 'get_all_test_steps'. For a read operation in a context with mutation tools, more guidance on safe usage would improve completeness.

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%, providing detailed parameter info like formats, defaults, and constraints. The description adds minimal semantics by implying pagination context for 'maxResults' and 'startAt', but doesn't explain parameter interactions or usage beyond what's in the schema. With high schema coverage, the baseline is 3, and the description doesn't significantly enhance understanding.

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 ('test steps for a test case'), making the purpose specific and understandable. However, it doesn't explicitly differentiate from the sibling tool 'get_all_test_steps', which appears to serve a similar function but potentially without pagination or with different parameters, leaving some ambiguity about when to choose one over the other.

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 like 'get_all_test_steps' or 'get_test_case'. It mentions pagination, which hints at usage for large datasets, but lacks explicit when/when-not instructions or prerequisites, such as whether the test case must exist or be accessible.

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