Skip to main content
Glama
Atakan-Emre

QA-MCP: Test Standardization & Orchestration Server

by Atakan-Emre

suite.compose

Create Smoke, Sanity, Regression, or E2E test suites from test case lists with coverage analysis and duration control.

Instructions

Test case listesinden Smoke/Regression/E2E suite oluşturur

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
testcasesYesTest case listesi
targetYesSuite tipi
sprintNoSprint adı/numarası (opsiyonel)
max_duration_minutesNoMaksimum suite süresi (dakika)

Implementation Reference

  • Main handler function that implements the core logic of the suite.compose tool, including test case selection, coverage analysis, and suite composition.
    def compose_suite(
        testcases: list[dict],
        target: str,
        sprint: str | None = None,
        max_duration_minutes: int | None = None,
        custom_criteria: dict[str, Any] | None = None,
    ) -> dict:
        """
        Compose a test suite from a collection of test cases.
    
        Args:
            testcases: List of test cases in QA-MCP standard format
            target: Suite type - 'smoke', 'sanity', 'regression', 'e2e'
            sprint: Sprint name/number for context
            max_duration_minutes: Maximum suite duration (overrides default)
            custom_criteria: Custom selection criteria
    
        Returns:
            Dictionary containing:
            - suite: Composed suite with selected test cases
            - selection_rationale: Why each test was included/excluded
            - coverage_summary: What's covered and what's not
            - recommendations: Suggestions for improving coverage
        """
        # Parse test cases
        parsed_cases = []
        parse_errors = []
    
        for idx, tc_dict in enumerate(testcases):
            try:
                tc = TestCase(**tc_dict)
                parsed_cases.append(tc)
            except Exception as e:
                parse_errors.append(f"Test case {idx}: {str(e)}")
    
        if parse_errors:
            return {
                "suite": None,
                "selection_rationale": [],
                "coverage_summary": {},
                "recommendations": [],
                "errors": parse_errors,
            }
    
        # Get suite rules
        suite_type = SuiteType(target.lower())
        rules = SUITE_RULES.get(target.lower(), SUITE_RULES["regression"])
    
        # Override max duration if provided
        if max_duration_minutes:
            rules = {**rules, "max_duration_minutes": max_duration_minutes}
    
        # Select test cases
        selected, excluded, rationale = _select_testcases(parsed_cases, suite_type, rules)
    
        # Build coverage summary
        coverage_summary = _build_coverage_summary(parsed_cases, selected, suite_type)
    
        # Generate recommendations
        recommendations = _generate_recommendations(parsed_cases, selected, excluded, suite_type)
    
        # Calculate total duration
        total_duration = sum(
            tc.estimated_duration_minutes or 5  # Default 5 min per test
            for tc in selected
        )
    
        # Build suite composition
        suite = SuiteComposition(
            suite_type=suite_type,
            name=f"{target.upper()} Suite" + (f" - {sprint}" if sprint else ""),
            description=rules.get("description", f"{target} test suite"),
            testcases=[tc.id or f"TC-{idx}" for idx, tc in enumerate(selected)],
            total_duration_minutes=total_duration,
            coverage_summary=coverage_summary,
            rationale=f"{len(selected)} test case seçildi, toplam {total_duration} dakika",
        )
    
        return {
            "suite": suite.model_dump(),
            "selected_testcases": [tc.model_dump() for tc in selected],
            "excluded_count": len(excluded),
            "selection_rationale": rationale,
            "coverage_summary": coverage_summary,
            "recommendations": recommendations,
            "duration_warning": total_duration > rules.get("max_duration_minutes", 999),
        }
  • Registration of the suite.compose tool in the MCP server, including name, description, and input schema.
    Tool(
        name="suite.compose",
        description="Test case listesinden Smoke/Regression/E2E suite oluşturur",
        inputSchema={
            "type": "object",
            "properties": {
                "testcases": {
                    "type": "array",
                    "items": {"type": "object"},
                    "description": "Test case listesi",
                },
                "target": {
                    "type": "string",
                    "enum": ["smoke", "sanity", "regression", "e2e"],
                    "description": "Suite tipi",
                },
                "sprint": {
                    "type": "string",
                    "description": "Sprint adı/numarası (opsiyonel)",
                },
                "max_duration_minutes": {
                    "type": "integer",
                    "description": "Maksimum suite süresi (dakika)",
                },
            },
            "required": ["testcases", "target"],
        },
    ),
  • Tool dispatcher in call_tool() that invokes the compose_suite handler for suite.compose calls.
    elif name == "suite.compose":
        result = compose_suite(
            testcases=arguments["testcases"],
            target=arguments["target"],
            sprint=arguments.get("sprint"),
            max_duration_minutes=arguments.get("max_duration_minutes"),
        )
        audit_log(name, arguments, f"Composed {arguments['target']} suite")
Behavior2/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 states the tool creates a suite but doesn't explain what 'creates' entails—whether it's a read-only operation, modifies data, requires specific permissions, or has side effects like rate limits. This leaves significant gaps in understanding the tool's behavior beyond its basic function.

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 in Turkish that directly states the tool's purpose without unnecessary words. It's front-loaded with the core action and resource, making it easy to parse quickly, though it could benefit from being in English for broader accessibility.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

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

Given the tool has 4 parameters, no annotations, and no output schema, the description is incomplete. It doesn't address behavioral aspects like what 'creates' means operationally, potential side effects, or return values, which are critical for a tool that appears to perform a creation/mutation action without structured safety hints.

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 input schema already documents all parameters. The description doesn't add any semantic details beyond what's in the schema, such as explaining the relationship between testcases and target or providing examples. Baseline score of 3 is appropriate since the schema handles parameter documentation adequately.

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 tool's purpose: 'Test case listesinden Smoke/Regression/E2E suite oluşturur' (Creates a Smoke/Regression/E2E suite from a test case list). It specifies the verb 'oluşturur' (creates) and resource 'suite', but doesn't explicitly differentiate from sibling tools like suite.coverage_report or testcase.to_xray, which appear to be related but serve different functions.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, exclusions, or compare it to sibling tools such as testcase.generate or xray.get_mapping_template, leaving the agent to infer usage context solely from the tool name and parameters.

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/Atakan-Emre/McpTestGenerator'

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