Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Support-to-Fix & Migration

MCP tool reference for ticket-driven bug reproduction, failure investigation, analytics coverage gap analysis, and test suite migration in ContextQA.

Documentation owner: Deep Barot · Last updated: October 22, 2026

Quick answer

MCP tool reference for ticket-driven bug reproduction, failure investigation, analytics coverage gap analysis, and test suite migration in ContextQA. Use this reference to choose the appropriate tools, understand their required inputs, and interpret their user-visible outputs.

Key takeaways

  • MCP tool reference for ticket-driven bug reproduction, failure investigation, analytics coverage gap analysis, and test suite migration in ContextQA.

  • Creates and immediately executes a test case that reproduces the bug described in a support ticket or issue description; use this to verify a reported defect is reproducible before assigning it to an engineer.

  • Collects available evidence for a failed test result and returns the investigation bundle.

What this page covers

Who is this for? SDETs, developers, and DevOps engineers integrating ContextQA with AI coding assistants (Claude, Cursor) or CI/CD pipelines.

This reference covers three groups: support-to-fix tools that turn support tickets and failure evidence into actionable tests, analytics and coverage tools that identify untested high-traffic flows, and migration tools for importing existing test repositories into ContextQA or exporting back to Playwright.


Support-to-Fix


reproduce_from_ticket

Creates and immediately executes a test case that reproduces the bug described in a support ticket or issue description; use this to verify a reported defect is reproducible before assigning it to an engineer.

Category: Support-to-Fix | Authentication required: Yes

Parameters

Name
Required
Type
Description

ticket_text

✅

string

Full text of the support ticket, bug report, or issue description. Include steps to reproduce, expected behaviour, and actual behaviour if available.

url

✅

string

Base URL of the application where the bug should be reproduced.

name

❌

string

Display name for the generated test case. Defaults to a name derived from the ticket text.

persona_id

❌

string

Custom agent persona to use during reproduction. Obtain from list_custom_agents.

knowledge_id

❌

string

Knowledge base to attach for domain context. Obtain from list_knowledge_bases.

Returns

JSON with the created test_case_id, the generated test steps, and an execution_id for the immediate run. Use get_execution_status to monitor the reproduction result.

Example

investigate_failure, create_defect_ticket, execute_test_case, get_execution_status


investigate_failure

Collects available evidence for a failed test result and returns the investigation bundle. Inspect the fields and artifacts actually returned; complete telemetry and a fixed response schema are not guaranteed.

Category: Support-to-Fix | Authentication required: Yes

Parameters

Name
Required
Type
Description

result_id

✅

integer

Numeric ID of the failed test case result to investigate.

rerun

❌

boolean

If true, can request a new execution after collecting the original evidence when its test-case ID is available. Defaults to false; a rerun request is not a completed verdict.

Returns

The evidence returned by the collection service, serialized as JSON, or an error. When rerun is requested, an additional rerun response or explanation may be present. Read the original evidence first and retrieve any new execution’s final result separately. See finding and fixing flaky tests for a workflow that preserves both attempts.

Example

reproduce_from_ticket, get_root_cause, get_test_step_results, get_console_logs, get_network_logs, get_trace_url, get_ai_reasoning, create_defect_ticket


Analytics & Coverage


analyze_coverage_gaps

Queries a connected product analytics integration to find high-traffic user flows that have no corresponding test coverage, returning a prioritised gap analysis for test creation.

Category: Analytics & Coverage | Authentication required: Yes

Parameters

Name
Required
Type
Description

analytics_provider

✅

string

Name of the analytics integration to query. Accepted values: "mixpanel", "amplitude". The integration must be configured in ContextQA workspace settings before use.

Returns

JSON with a gaps array ordered by traffic volume. Each item includes flow_name, page_path, event_count (30-day), suggested_test_description, and a coverage_score (0–100, where 0 means no tests at all). Also includes a summary with total uncovered sessions and estimated risk exposure.

Example

generate_tests_from_analytics_gap, get_ai_insights, create_test_case


Migration Platform


analyze_test_repo

Analyzes a repository available to the configured execution environment to detect its framework, enumerate test files, and estimate the test count. Confirm filesystem access and the current tool schema before calling it.

Category: Migration Platform | Authentication required: Yes

Execution boundary: A path supplied to a hosted MCP tool is not automatically a path on your laptop. Confirm which service reads the repository and how it receives access. Do not assume analysis stays local or that signing in grants remote filesystem access. Analyze before migrating, then review the dry-run output.

Parameters

Name
Required
Type
Description

repo_path

✅

string

Absolute repository path accessible in the configured execution environment.

Returns

JSON with detectedFramework (e.g. "cypress", "playwright", "selenium", "jest"), language, testFiles (array of relative file paths), and estimatedTestCount (integer).

Example

migrate_repo_to_contextqa, export_to_playwright, query_repository


migrate_repo_to_contextqa

Parses an accessible test repository and creates ContextQA test cases. Use dry_run=true first to preview the conversion without creating cases. Review assertion and fixture coverage; parsing is not proof of equivalent execution.

Category: Migration Platform | Authentication required: Yes

Parameters

Name
Required
Type
Description

repo_path

✅

string

Absolute repository path accessible to the migration service; not automatically your coding client's local path.

app_url

✅

string

Base URL of the application under test. Used to contextualise migrated steps.

framework

❌

string

Override the auto-detected framework. Useful when detection is ambiguous. Accepted values: "cypress", "playwright", "selenium", "jest".

dry_run

❌

boolean

If true, returns a preview of what would be migrated without creating anything in ContextQA. Defaults to false. Always run with dry_run=true first.

Returns

JSON with migratedCount (integer), skippedCount (integer), createdTestCaseIds (array of integers), and a summary message. In dry-run mode, createdTestCaseIds is empty and migratedCount reflects the projected count.

Example

Once the dry-run output looks correct, re-run with "dry_run": false to complete the migration.

analyze_test_repo, export_to_playwright, get_test_cases


export_to_playwright

Generates a Playwright project for explicitly selected cases and returns a JSON file manifest. A coding client with authorized filesystem access can save the returned files locally. The hosted tool does not write them onto the developer's computer.

Category: Migration Platform | Authentication required: Yes

Parameters

Name
Required
Type
Description

test_case_ids

✅

array of integers

Explicit nonempty list of cases to export. Do not omit it to request the whole workspace.

project_name

❌

string

Project name. Inspect the returned manifest for generated filenames and configuration.

Returns

JSON with project_name, file_count, files (entries containing path and content), and summary. Inspect the actual manifest; do not assume a TypeScript-check configuration or a local output directory was created. Save only relative paths inside an approved empty directory, reject path traversal, and review sensitive files before sharing.

Example

Acceptance limits

The current generator can emit non-blocking aiVerify placeholders that assume success, manual aiAgent checkpoints, assumed-true conditional branches, loops rendered once, and plaintext values in credentials.env. A green run is insufficient until required assertions and control flow are restored and credentials use approved secret handling. AI_STEP_MODE=fail rejects manual checkpoints but does not repair assumed-success verification.

Follow export and portability to review every gap and validate a clean standalone run plus a seeded-defect failure before using the export as release evidence. This reference describes the reviewed implementation; your connected manifest remains authoritative for current parameters and availability.

migrate_repo_to_contextqa, analyze_test_repo, export_test_case_as_code, get_test_cases


Last updated

Was this helpful?