Support-to-Fix & Migration
MCP tool reference for ticket-driven bug reproduction, failure investigation, analytics coverage gap analysis, and test suite migration in ContextQA.
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
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
Related Tools
investigate_failure, create_defect_ticket, execute_test_case, get_execution_status
investigate_failure
Collects the complete evidence bundle for a failed test result — step results, console logs, network errors, trace URL, video recording, AI reasoning, and root cause analysis — and returns it as a single investigation report with a reproduce_prompt that can be passed back to reproduce_from_ticket.
Category: Support-to-Fix | Authentication required: Yes
Parameters
result_id
✅
integer
Numeric ID of the failed test case result to investigate.
rerun
❌
boolean
If true, triggers a fresh execution before collecting evidence, ensuring the failure is current. Defaults to false.
Returns
JSON investigation bundle containing: stepResults, consoleLogs, networkErrors, traceUrl, videoUrl, aiReasoning, rootCause (from the root cause engine), and a reproduce_prompt — a ready-to-use text description of the failure suitable for passing to reproduce_from_ticket or create_defect_ticket.
Example
Related Tools
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
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
Related Tools
generate_tests_from_analytics_gap, get_ai_insights, create_test_case
Migration Platform
analyze_test_repo
Scans a local test repository to detect its framework, enumerate all test files, and estimate the total test count — without making any ContextQA API calls, making it safe to run as a first step before committing to a full migration.
Category: Migration Platform | Authentication required: Yes
Note: This tool performs only local analysis. No test data is sent to ContextQA. Run this before
migrate_repo_to_contextqato preview what will be migrated.
Parameters
repo_path
✅
string
Absolute local path to the root of the test repository.
Returns
JSON with detectedFramework (e.g. "cypress", "playwright", "selenium", "jest"), language, testFiles (array of relative file paths), and estimatedTestCount (integer).
Example
Related Tools
migrate_repo_to_contextqa, export_to_playwright, query_repository
migrate_repo_to_contextqa
Migrates an existing local test repository into ContextQA by parsing test files and creating equivalent ContextQA test cases. Use dry_run=true first to preview what would be created without making any changes.
Category: Migration Platform | Authentication required: Yes
Parameters
repo_path
✅
string
Absolute local path to the root of the test repository.
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.
Related Tools
analyze_test_repo, export_to_playwright, get_test_cases
export_to_playwright
Exports ContextQA test cases as a complete Playwright TypeScript project to a local directory, including playwright.config.ts, package.json, tsconfig.json, and individual spec files — one per test case.
Category: Migration Platform | Authentication required: Yes
Parameters
output_dir
✅
string
Absolute local path where the Playwright project will be written. The directory will be created if it does not exist.
project_name
❌
string
Name used in package.json and playwright.config.ts. Defaults to "contextqa-export".
test_case_ids
❌
array of integers
IDs of specific test cases to export. If omitted, all test cases in the workspace are exported.
Returns
JSON with outputPath (absolute path to the generated project), exportedCount (integer), specFiles (array of generated file paths), and a run_command suggestion (e.g. npx playwright test).
Example
Related Tools
migrate_repo_to_contextqa, analyze_test_repo, export_test_case_as_code, get_test_cases
Last updated
Was this helpful?