Skip to main content
Glama

get_all_tcm_test_cases_by_project

Retrieve all test cases for a specific project from Zebrunner Test Case Management with configurable output formats and pagination controls.

Instructions

📋 Get ALL TCM test cases by project using comprehensive pagination

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_keyYesProject key (e.g., 'android' or 'ANDROID')
formatNoOutput formatjson
include_clickable_linksNoInclude clickable links to Zebrunner web UI
max_resultsNoMaximum number of results (configurable limit for performance)

Implementation Reference

  • Main handler implementation for retrieving all TCM test cases by project using paginated API calls to /test-cases endpoint with token-based pagination. Collects all pages until no nextPageToken.
    async getAllTCMTestCasesByProject(projectKey: string): Promise<ZebrunnerShortTestCase[]> {
      const allItems: ZebrunnerShortTestCase[] = [];
      let nextPageToken: string | undefined = undefined;
      let hasMore = true;
      let pageCount = 0;
    
      while (hasMore && pageCount < 1000) { // Safety limit
        // Direct API call to avoid circular dependency with getTestCases
        const params: any = {
          projectKey,
          maxPageSize: 100 // Use maximum allowed page size
        };
    
        if (nextPageToken) {
          params.pageToken = nextPageToken;
        }
    
        const response = await this.retryRequest(async () => {
          const apiResponse = await this.http.get('/test-cases', { params });
          const data = apiResponse.data;
          
          if (Array.isArray(data)) {
            return { items: data.map(item => ZebrunnerShortTestCaseSchema.parse(item)) };
          } else if (data.items) {
            return {
              items: data.items.map((item: any) => ZebrunnerShortTestCaseSchema.parse(item)),
              _meta: data._meta
            };
          }
          
          return { items: [] };
        });
        
        allItems.push(...response.items);
        
        // Check for next page token in metadata
        nextPageToken = response._meta?.nextPageToken;
        hasMore = !!nextPageToken; // Stop only when nextPageToken is null
        pageCount++;
    
        if (this.config.debug) {
          console.error(`📄 [TestCases] Fetched page ${pageCount}: ${response.items.length} test cases (total: ${allItems.length})`);
        }
      }
    
      if (pageCount >= 1000) {
        console.error('⚠️  [TestCases] Stopped pagination after 1000 pages to prevent infinite loop');
      }
    
      return allItems;
    }
Behavior2/5

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

With no annotations provided, the description carries full burden but only mentions 'comprehensive pagination', leaving gaps: it doesn't disclose rate limits, authentication needs, error handling, or whether this is a read-only operation. For a tool with 4 parameters and no annotations, this is insufficient behavioral context.

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?

Single sentence, front-loaded with key information ('Get ALL TCM test cases by project'), and uses an emoji for visual clarity. Every word earns its place with zero waste.

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 4 parameters, 100% schema coverage, no output schema, and no annotations, the description is minimally adequate. It covers the core purpose but lacks details on behavioral traits, usage context, and output expectations, leaving gaps for an AI agent to infer.

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%, so the schema fully documents all 4 parameters. The description adds no additional parameter semantics beyond implying pagination (via 'comprehensive pagination'), which aligns with the 'max_results' parameter but doesn't provide extra syntax or format details.

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 ('Get ALL TCM test cases') and resource ('by project'), with 'comprehensive pagination' hinting at scope. It distinguishes from siblings like 'get_test_case_by_key' or 'get_test_cases_by_suite_smart' by emphasizing 'ALL' and project-level retrieval, though it doesn't explicitly contrast them.

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?

No explicit guidance on when to use this tool versus alternatives like 'get_all_tcm_test_cases_with_root_suite_id' or 'get_test_cases_by_suite_smart'. The description implies it's for bulk retrieval by project, but lacks context on prerequisites, performance trade-offs, or specific use cases.

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/maksimsarychau/mcp-zebrunner'

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