Skip to main content
Glama

list_test_suites

Retrieve test suites for a specific project in Zebrunner Test Case Management, supporting pagination, hierarchical views, and multiple output formats.

Instructions

๐Ÿ“‹ List test suites for a project (โœ… Verified Working)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_keyYesProject key (e.g., 'android' or 'ANDROID')
project_idNoProject ID (alternative to project_key)
formatNoOutput formatjson
include_hierarchyNoInclude hierarchy information
pageNoPage number (0-based)
sizeNoPage size (configurable via MAX_PAGE_SIZE env var)
page_tokenNoPage token for pagination
include_clickable_linksNoInclude clickable links to Zebrunner web UI

Implementation Reference

  • src/index.ts:129-148 (registration)
    MCP tool registration for 'list_test_suites', including inline input schema validation and execution handler that fetches suites via ZebrunnerClient and returns JSON.
    server.tool( "list_test_suites", "Return list of Zebrunner test suites for a project (requires project_key or project_id)", { project_key: z.string().optional(), project_id: z.number().int().positive().optional() }, async (args) => { const { project_key, project_id } = args; if (!project_key && !project_id) { throw new Error("Either project_key or project_id must be provided"); } const suites = await client.listTestSuites({ projectKey: project_key, projectId: project_id }); const data = suites.map((s: unknown) => { const parsed = TestSuiteSchema.safeParse(s); return parsed.success ? parsed.data : s; }); return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] }; } );
  • Zod input schema definition for listTestSuites tool parameters (imported but uses inline equivalent in handler).
    export const ListTestSuitesSchema = z.object({ project_key: z.string().optional(), project_id: z.number().int().positive().optional() }).refine(data => data.project_key || data.project_id, { message: "Either project_key or project_id must be provided" });
  • Core API client method implementing the test suites list fetch from Zebrunner API, called by the MCP tool handler.
    async listTestSuites(params: TestSuiteParams): Promise<any[]> { const { projectKey, projectId } = params; const res = await this.http.get("/test-suites", { params: { projectKey, projectId } }); // API returns {items: [], _meta: {}} structure return Array.isArray(res.data) ? res.data : (res.data?.items || []); }

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