Skip to main content
Glama

get_all_test_steps

Retrieve all test steps for a specific test case in Zephyr Scale Cloud, automatically handling pagination to ensure complete data collection.

Instructions

Get all test steps for a test case (handles pagination automatically)

Input Schema

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

Implementation Reference

  • The handler function that implements the get_all_test_steps tool logic. It fetches all test steps for a given test case by automatically paginating through the API responses using the ZephyrClient.
    async function getAllTestSteps(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 allSteps = [];
        let startAt = 0;
        const maxResults = 100; // Use maximum for efficiency
    
        while (true) {
          const response = await client.getTestSteps(testCaseKey, { maxResults, startAt });
    
          if (response.values) {
            allSteps.push(...response.values);
          } else if (Array.isArray(response)) {
            allSteps.push(...response);
          }
    
          // Check if we have all results
          const total = response.total || response.size || 0;
          if (allSteps.length >= total || response.values?.length < maxResults) {
            break;
          }
    
          startAt += maxResults;
        }
    
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify({
                testCaseKey,
                testSteps: allSteps,
                totalSteps: allSteps.length,
                note: 'All test steps retrieved (pagination handled automatically)'
              }, null, 2)
            }
          ]
        };
      } catch (error) {
        return {
          content: [
            {
              type: 'text',
              text: formatError(error, `fetching all test steps for ${args.testCaseKey}`)
            }
          ],
          isError: true
        };
      }
    }
  • The tool registration object defining the name, description, input schema, and handler reference for 'get_all_test_steps'. This array is imported and spread into the main tools list in src/index.js.
    {
      name: 'get_all_test_steps',
      description: 'Get all test steps for a test case (handles pagination automatically)',
      inputSchema: {
        type: 'object',
        properties: {
          testCaseKey: {
            type: 'string',
            description: 'Test case key (format: [A-Z]+-T[0-9]+)',
            pattern: config.testCaseKeyPattern.source
          }
        },
        required: ['testCaseKey']
      },
      handler: getAllTestSteps
    },
  • The input schema for the get_all_test_steps tool, specifying the required testCaseKey parameter with validation pattern.
    inputSchema: {
      type: 'object',
      properties: {
        testCaseKey: {
          type: 'string',
          description: 'Test case key (format: [A-Z]+-T[0-9]+)',
          pattern: config.testCaseKeyPattern.source
        }
      },
      required: ['testCaseKey']
    },
  • src/index.js:30-36 (registration)
    Top-level aggregation of all tools including testStepsTools (which contains get_all_test_steps) into the allTools array used by the MCP server for handling tool calls.
    const allTools = [
      ...projectTools,
      ...folderTools,
      ...testCaseTools,
      ...testStepsTools,
      ...testScriptTools,
      ...referenceDataTools
Behavior4/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 valuable context by stating 'handles pagination automatically,' which informs the agent about a key behavioral trait (automatic pagination) not covered elsewhere. This compensates well for the lack of annotations, though it could mention more about response format or error handling.

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 and adds a useful behavioral note. Every word earns its place, with no redundancy or unnecessary elaboration, 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.

Completeness4/5

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

Given the tool's low complexity (1 parameter, no output schema, no annotations), the description is reasonably complete. It covers the purpose and a key behavioral aspect (pagination), but could be more comprehensive by mentioning output details or error cases, though not strictly required for a simple retrieval tool.

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, fully documenting the 'testCaseKey' parameter with format and pattern details. The description doesn't add any parameter-specific semantics beyond what the schema provides, so it meets the baseline of 3 without extra value.

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 ('all test steps for a test case'), making the purpose specific and understandable. However, it doesn't explicitly differentiate from the sibling tool 'get_test_steps' (which likely retrieves a subset or different view), so it misses full sibling distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage by specifying it handles pagination automatically, which suggests it's for retrieving all steps without manual pagination. However, it doesn't provide explicit guidance on when to use this vs. 'get_test_steps' or other retrieval tools, leaving usage context partially inferred.

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