Skip to main content

Tools Reference

Complete reference for all 16 tools exposed by the MCP Test Architect.

Codebase analysis

analyze_architecture

Scans a target project's file tree and produces a structured catalog of routes, features, user interactions, and real API endpoints. Output is saved locally as architecture.json.

Input: file tree summary, framework hint, module list
Output: routes[], features[], tech_stack[]

generate_plan

Calls QA Hub's AI (via /api/v1/architect/generate-plan) with the architecture catalog and returns a list of BDD test scenarios.

Input: architecture summary, module filter, additional instructions
Output: scenarios[] with title, suite, layer, is_e2e, tags, gherkin

enrich_plan

Refines an existing test plan by adding edge cases, negative paths, and accessibility scenarios that were missed in the initial generation.

Input: existing scenarios[], enrichment instructions
Output: enriched scenarios[]

write_plan

Saves the test plan to plan.md in the target project directory for human review before spec generation.


Spec generation

generate_specs

Generates complete Playwright TypeScript spec files from test scenarios and UI locator context (collected by crawl_app). Calls /api/v1/architect/generate-specs.

Input: scenarios[], DOM locators, base URL, test user credentials
Output: spec files content + auth fixture

write_specs

Writes the generated spec files to disk in the specs/ directory of the target project.


Browser & execution

crawl_app

Launches a Playwright browser, navigates the running app, and collects DOM locators, form structures, and navigation patterns. This grounding data prevents the AI from generating invalid selectors.

Input: base URL, pages to visit
Output: DOM snapshot with real selectors

save_auth_session

Logs in to the app and saves the authenticated browser state as a Playwright storage state JSON file. Used by test fixtures to skip login on every test.

Input: login URL, credentials
Output: auth-state.json

setup_playwright

Installs Playwright and its browser dependencies in the target project if not already installed.

execute_playwright

Runs the generated spec files using Playwright and captures results. Automatically posts results to /api/v1/ingest.

Input: spec file paths, base URL, run name
Output: pass/fail summary + run ID in QA Hub


Tickets & strategy

load_tickets

Fetches tickets from the tenant's active connector (Linear, Jira, or ADO) to use as context for test plan generation. Calls /api/v1/architect/load-tickets.

Input: query, connector, filters
Output: tickets[] with title, description, priority

select_test_strategy

Prompts the agent to choose a testing strategy (smoke, regression, full, security, performance) based on the project context and available resources.

Output: selected strategy name


Sync & plans

sync

Pushes generated test cases to QA Hub's test library via /api/v1/cases. Associates them with the configured project.

Input: scenarios[], project_id
Output: created test case codes (TC-001, …)

write_plan (plan approval)

Creates an ArchitectPlan in QA Hub via /api/v1/architect/plans for QA Manager review. Returns a shareable URL. The plan starts as PENDING_REVIEW.

Output: plan ID, status, share_url


Load testing

generate_k6_script

Generates a k6 v0.49+ JavaScript load test script from the architecture catalog. Calls /api/v1/architect/generate-k6.

Output: k6 script with ramp-up/steady/ramp-down stages, p95 < 500ms thresholds


Full pipeline

run_full_cycle

Orchestrates the complete pipeline in one command:

analyze_architecture → select_test_strategy → generate_plan →
crawl_app → generate_specs → write_specs → execute_playwright → sync

Input: target project path, base URL, QA Hub project ID
Output: final pass/fail summary + test cases created in QA Hub

bootstrap

Initializes the Architect setup in a target project: creates architect.config.json, verifies QA Hub connectivity, and confirms Playwright is available.