Skip to main content
Glama

get_root_suites

Retrieve root test suites (those without parent suites) from a specified project in Zebrunner Test Case Management to organize and manage test case hierarchies.

Instructions

🌳 Get root suites (suites with no parent) from project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formatNoOutput formatjson
project_keyYesProject key (e.g., 'android' or 'ANDROID')

Implementation Reference

  • Main handler function for the 'get_root_suites' tool. Fetches root suites using the client, enriches them with hierarchy information using HierarchyProcessor, formats the output, and returns it as MCP content block.
    async getRootSuites(projectKey: string, format: OutputFormat = 'json') { try { const rootSuites = await this.client.getRootSuites(projectKey); const enrichedSuites = HierarchyProcessor.enrichSuitesWithHierarchy(rootSuites); const formattedData = FormatProcessor.format(enrichedSuites, format); return { content: [ { type: "text" as const, text: typeof formattedData === 'string' ? formattedData : JSON.stringify(formattedData, null, 2) } ] }; } catch (error: any) { return { content: [ { type: "text" as const, text: `Error retrieving root suites: ${error.message}` } ] }; } }
  • MCP server tool registration for 'get_root_suites', including input schema validation with Zod and handler invocation.
    server.tool( "get_root_suites", "Get only root-level test suites with hierarchy information", { projectKey: z.string().min(1), format: z.enum(['dto', 'json', 'string']).default('json') }, async (args) => toolHandlers.getRootSuites(args.projectKey, args.format) );
  • Input schema definition for the 'get_root_suites' tool using Zod: projectKey (required string) and format (optional enum: 'dto', 'json', 'string', default 'json').
    { projectKey: z.string().min(1), format: z.enum(['dto', 'json', 'string']).default('json') },
  • API client helper method that retrieves all test suites for a project and filters to return only root-level suites (those without a parentSuiteId).
    async getRootSuites(projectKey: string): Promise<ZebrunnerTestSuite[]> { const allSuites = await this.getAllTestSuites(projectKey); return allSuites.filter(suite => !suite.parentSuiteId); }

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