MCP tool reference for execution telemetry, AI reasoning inspection, custom agent personas, and knowledge bases 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 two groups: telemetry tools that surface low-level execution evidence (step results, network traffic, console logs, Playwright traces, AI reasoning), and the custom agents and knowledge base tools that allow you to configure AI behaviour for test execution.
Telemetry
get_test_step_results
Retrieves raw per-step execution data for a given result, including the action performed, pass/fail status, screenshot URL, executed result detail, and AI reasoning summary.
Numeric ID of the test case result to retrieve steps for. Obtain from get_test_case_results.
Returns
JSON array of step records. Each record includes stepIndex, action, status (PASSED/FAILED/SKIPPED), screenshot_url, executedResult, and a brief aiReasoning field.
Returns the HAR-format network log capturing all HTTP requests and responses made during a test execution result; use this to debug API calls, check response codes, and inspect payload content.
Returns detailed per-step AI reasoning data for an execution result, including confidence scores, the locator strategy chosen, DOM similarity analysis, and any fallback decisions made by the AI agent.
Numeric ID of the test case result to inspect AI reasoning for.
Returns
JSON array of reasoning records, one per step. Each record includes stepIndex, confidence (0–1 float), locatorStrategy, domSimilarityScore, fallbackUsed (boolean), and reasoningNarrative.
Returns aggregated AI insights and analytics patterns across executions; optionally scoped to a specific result or workspace version to focus analysis.
System prompt defining the agent's behaviour. This plain-English instruction set guides how the AI navigates and interacts with the application during execution.
Returns
JSON of the created agent persona including its assigned id, which can then be used as persona_id in execution calls.
Returns all knowledge bases defined in the workspace; use knowledge base IDs as the knowledge_id parameter when executing test cases or test plans to give the AI agent additional domain context.
Category: Knowledge Base | Authentication required: Yes
Parameters
None.
Returns
JSON array of knowledge base objects. Each object includes id, title, prompt, and createdAt.
Creates a new knowledge base containing plain-English instructions that are injected into the AI agent's context during test execution to provide domain-specific guidance.
Category: Knowledge Base | Authentication required: Yes
Parameters
Name
Required
Type
Description
title
✅
string
Display name for the knowledge base.
prompt
✅
string
Plain-English instructions for the AI agent. Describe domain rules, business logic, expected behaviours, or navigation patterns the agent should be aware of.
Returns
JSON of the created knowledge base including its assigned id, which can then be used as knowledge_id in execution calls.
{
"name": "Accessibility Auditor",
"description": "You are an accessibility testing agent. Focus on WCAG 2.1 AA compliance. Always check for keyboard navigation, ARIA labels, colour contrast issues, and screen reader compatibility on every page you visit."
}
{}
{
"title": "E-commerce Checkout Rules",
"prompt": "The checkout flow has three stages: Cart Review, Shipping Details, and Payment. Guest checkout is available but requires an email address. Promo codes are entered on the Cart Review page. Free shipping applies automatically for orders over $50. The payment page accepts Visa, Mastercard, and PayPal — no Amex."
}