Skip to main content
Glama

get_all_tcm_test_cases_by_project

Retrieve all test cases from a specific Zebrunner project with configurable output formats and pagination for comprehensive test management.

Instructions

📋 Get ALL TCM test cases by project using comprehensive pagination

Input Schema

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

Implementation Reference

  • Core helper function implementing the logic to retrieve ALL test cases (TCM) for a given project using robust token-based pagination with safety limits. This matches the functionality expected for the tool 'get_all_tcm_test_cases_by_project'. No direct MCP registration found for this exact tool name, but this is the precise implementation.
    /** * Get all TCM test cases for a project using pagination (Java implementation approach) * This method fetches ALL test cases from the project using proper token-based pagination */ 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; }

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