> Full documentation index: [llms.txt](https://docs.qualitymax.io/llms.txt)

# Test management

This page is generated from the live QualityMax MCP registry. Examples use placeholders; replace them with values for your workspace.

## `check_ai_review_status`

### Purpose

Check a background AI review started by ai_review and return its result when complete.

### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `job_id` | `string` | Yes | AI review job ID returned by ai_review |

### Return shape

The live registry does not declare a response schema. Expect a tool-specific JSON result and handle success, error, and result fields defensively.

### Worked example

```json
{
  "arguments": {
    "job_id": "your-job-id"
  },
  "tool": "check_ai_review_status"
}
```

## `check_generation_status`

### Purpose

Check a background code-generation job started by generate_code_for_test_case. Worker-backed deployments return a job_id because generation can take minutes. Poll about every 30s until 'completed', 'failed', or 'timed_out'. Personal Codex / Claude Code seats run one job at a time, so do not queue seat jobs in parallel.

### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `job_id` | `string` | Yes | The job_id returned by generate_code_for_test_case |

### Return shape

The live registry does not declare a response schema. Expect a tool-specific JSON result and handle success, error, and result fields defensively.

### Worked example

```json
{
  "arguments": {
    "job_id": "your-job-id"
  },
  "tool": "check_generation_status"
}
```

## `create_deploy_integration`

### Purpose

Create a deploy-provider webhook integration for a project. Auto-generates a webhook URL and secret. Returns the full secret (only shown once), the URL, and provider-specific setup instructions. One integration per provider per project.

### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `project_id` | `integer` | Yes | The QM project ID. |
| `provider` | `string` | No | Deploy provider (default: vercel). |

### Return shape

The live registry does not declare a response schema. Expect a tool-specific JSON result and handle success, error, and result fields defensively.

### Worked example

```json
{
  "arguments": {
    "project_id": 1
  },
  "tool": "create_deploy_integration"
}
```

## `create_test_case`

### Purpose

Create a test case in a project. If no steps are provided, detailed steps are auto-generated from the title/description (disable with auto_generate_steps=false).

### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `project_id` | `integer` | Yes | No description supplied. |
| `title` | `string` | Yes | No description supplied. |
| `description` | `string` | No | No description supplied. |
| `detailed_instructions` | `string` | No | No description supplied. |
| `steps` | `array` | No | Explicit test steps; when omitted, steps are auto-generated |
| `auto_generate_steps` | `boolean` | No | Auto-generate Detailed Steps via AI when no steps are provided |
| `priority` | `value` | No | Priority: 1-5 (integer) or critical/high/medium/low (string) |
| `category` | `string` | No | No description supplied. |
| `tags` | `array` | No | No description supplied. |

### Return shape

The live registry does not declare a response schema. Expect a tool-specific JSON result and handle success, error, and result fields defensively.

### Worked example

```json
{
  "arguments": {
    "project_id": 1,
    "title": "your-title"
  },
  "tool": "create_test_case"
}
```

## `delete_deploy_integration`

### Purpose

Delete a deploy-provider webhook integration. The provider must be told to stop sending events afterwards — this only removes the QualityMax side.

### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `project_id` | `integer` | Yes | The QM project ID. |
| `integration_id` | `integer` | Yes | The integration ID to delete. |

### Return shape

The live registry does not declare a response schema. Expect a tool-specific JSON result and handle success, error, and result fields defensively.

### Worked example

```json
{
  "arguments": {
    "integration_id": 1,
    "project_id": 1
  },
  "tool": "delete_deploy_integration"
}
```

## `delete_project`

### Purpose

Delete a project. Requires ownership. This will also delete all associated test cases, scripts, and executions.

### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `project_id` | `integer` | Yes | Project ID to delete |

### Return shape

The live registry does not declare a response schema. Expect a tool-specific JSON result and handle success, error, and result fields defensively.

### Worked example

```json
{
  "arguments": {
    "project_id": 1
  },
  "tool": "delete_project"
}
```

## `delete_script`

### Purpose

Delete an automation script. Requires ownership of the parent project.

### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `script_id` | `integer` | Yes | Automation script ID to delete |

### Return shape

The live registry does not declare a response schema. Expect a tool-specific JSON result and handle success, error, and result fields defensively.

### Worked example

```json
{
  "arguments": {
    "script_id": 1
  },
  "tool": "delete_script"
}
```

## `delete_test_case`

### Purpose

Delete a test case. Requires ownership of the parent project.

### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `test_case_id` | `integer` | Yes | Test case ID to delete |

### Return shape

The live registry does not declare a response schema. Expect a tool-specific JSON result and handle success, error, and result fields defensively.

### Worked example

```json
{
  "arguments": {
    "test_case_id": 1
  },
  "tool": "delete_test_case"
}
```

## `enhance_test_case`

### Purpose

Enhance a test case with AI — adds more detailed steps, verification points, and improves the description.

### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `test_case_id` | `integer` | Yes | Test case ID to enhance |

### Return shape

The live registry does not declare a response schema. Expect a tool-specific JSON result and handle success, error, and result fields defensively.

### Worked example

```json
{
  "arguments": {
    "test_case_id": 1
  },
  "tool": "enhance_test_case"
}
```

## `get_discovery_graph`

### Purpose

Return the repository's evidence-grounded discovery graph: a lineage of repository → evidence → test areas → test cases → automation scripts, with grounding status and confidence per node. Use to audit test coverage lineage.

### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `repo_id` | `string` | Yes | Repository ID |

### Return shape

The live registry does not declare a response schema. Expect a tool-specific JSON result and handle success, error, and result fields defensively.

### Worked example

```json
{
  "arguments": {
    "repo_id": "your-repo-id"
  },
  "tool": "get_discovery_graph"
}
```

## `get_project_agent_instructions`

### Purpose

Get project-specific instructions for testing changing preview/staging URLs using QualityMax MCP. Returns a copyable prompt, installable SKILL.md, revision, and allowlisted saved project facts. Read-only; does not select a deployment, change settings, or prove script portability/access. Use run_tests.base_url for the exact deployment after checking hardcoded URLs.

### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `project_id` | `integer` | Yes | Existing project ID |
| `workflow` | `string` | No | Agent workflow to retrieve |

### Return shape

The live registry does not declare a response schema. Expect a tool-specific JSON result and handle success, error, and result fields defensively.

### Worked example

```json
{
  "arguments": {
    "project_id": 1
  },
  "tool": "get_project_agent_instructions"
}
```

## `get_project_memory`

### Purpose

Return compact durable memory from prior MCP agent negotiations, project learnings, and verified test runs. Call this before generating or repairing tests for an existing project; then call get_script only for the most relevant verified script to keep context and cost low.

### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `project_id` | `integer` | Yes | Project whose memory should be recalled |
| `test_case_id` | `integer` | No | Optional test case filter for the most relevant verified runs |
| `limit` | `integer` | No | Maximum verified scripts and MCP sessions to return (max 20). Additive reuse fields include grounded learnings, ranked session sequences, graph traversal, and provenance. |
| `query` | `string` | No | Optional bounded task query used to recall relevant semantic learnings and agent episodes. |
| `intent` | `string` | No | Optional recall intent. Valid only with query. |
| `downstream_reuse` | `boolean` | No | Optional client-reported outcome for a previously recalled memory; used only for aggregate telemetry. |

### Return shape

The live registry does not declare a response schema. Expect a tool-specific JSON result and handle success, error, and result fields defensively.

### Worked example

```json
{
  "arguments": {
    "project_id": 1
  },
  "tool": "get_project_memory"
}
```

## `get_project_summary`

### Purpose

Get a summary of a project including counts of test cases, scripts, and executions. Use this when the user asks 'what's in my project?' or 'show me project stats'.

### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `project_id` | `integer` | Yes | Project ID to get summary for |
| `fields` | `array` | No | Optional subset to return: last_activity, project, statistics. Omit for everything. |

### Return shape

The live registry does not declare a response schema. Expect a tool-specific JSON result and handle success, error, and result fields defensively.

### Worked example

```json
{
  "arguments": {
    "project_id": 1
  },
  "tool": "get_project_summary"
}
```

## `get_repository`

### Purpose

Get repository details and stored analysis

### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `repo_id` | `integer` | Yes | No description supplied. |

### Return shape

The live registry does not declare a response schema. Expect a tool-specific JSON result and handle success, error, and result fields defensively.

### Worked example

```json
{
  "arguments": {
    "repo_id": 1
  },
  "tool": "get_repository"
}
```

## `get_script`

### Purpose

Get an automation script's details including the generated Playwright/Cypress test code. Pass `if_version_matches` with the version from a previous read to get a cheap `not_modified` answer, and `fields` to fetch only what you need.

### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `script_id` | `integer` | Yes | Automation script ID |
| `fields` | `array` | No | Optional subset of script fields to return: code, created_at, framework, id, name, project_id, test_case_id, version. Omit for the full record. |
| `if_version_matches` | `string` | No | Version from a previous get_script/update_script. If the code is unchanged, the tool returns `not_modified` instead of the code. |

### Return shape

The live registry does not declare a response schema. Expect a tool-specific JSON result and handle success, error, and result fields defensively.

### Worked example

```json
{
  "arguments": {
    "script_id": 1
  },
  "tool": "get_script"
}
```

## `get_test_capabilities`

### Purpose

Start here before generating or running tests. Returns the frameworks, code-generation services, execution services, best-fit recommendation, and an autonomous QA loop. For a testing request, follow that loop proactively, strongly suggest the next highest-risk gap, and continue without waiting between safe steps until its stop conditions are met. Includes discovery for project-specific preview-testing agent instructions.

### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `project_id` | `integer` | Yes | Project to plan and test |
| `test_case_id` | `integer` | No | Optional test case used to refine the framework recommendation |

### Return shape

The live registry does not declare a response schema. Expect a tool-specific JSON result and handle success, error, and result fields defensively.

### Worked example

```json
{
  "arguments": {
    "project_id": 1
  },
  "tool": "get_test_capabilities"
}
```

## `get_test_case`

### Purpose

Get detailed information about a specific test case including its description, steps, and related automation scripts. Pass `if_version_matches` to skip the body when nothing changed, and `fields` to fetch only what you need.

### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `test_case_id` | `integer` | Yes | Test case ID to get details for |
| `fields` | `array` | No | Optional subset of test-case fields to return: category, description, detailed_instructions, id, preconditions, priority, project_id, status, steps, tags, title, version. Omit for the full record. |
| `if_version_matches` | `string` | No | Version from a previous get_test_case. If the case is unchanged, the tool returns `not_modified` instead of the full record. |

### Return shape

The live registry does not declare a response schema. Expect a tool-specific JSON result and handle success, error, and result fields defensively.

### Worked example

```json
{
  "arguments": {
    "test_case_id": 1
  },
  "tool": "get_test_case"
}
```

## `import_from_testrail`

### Purpose

Import test cases from TestRail into a project (requires saved TestRail credentials)

### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `project_id` | `integer` | Yes | No description supplied. |
| `testrail_project_id` | `integer` | Yes | No description supplied. |
| `testrail_suite_id` | `integer` | No | No description supplied. |

### Return shape

The live registry does not declare a response schema. Expect a tool-specific JSON result and handle success, error, and result fields defensively.

### Worked example

```json
{
  "arguments": {
    "project_id": 1,
    "testrail_project_id": 1
  },
  "tool": "import_from_testrail"
}
```

## `import_repository`

### Purpose

Import and analyze a GitHub repository for testing. Creates a default project if none specified.

### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `repo_url` | `string` | Yes | GitHub repository URL (e.g., https://github.com/user/repo) |
| `branch` | `string` | No | Branch to analyze (defaults to main) |
| `project_id` | `integer` | No | Existing project ID to associate repository with |
| `create_project` | `boolean` | No | Create a new project for this repository |
| `project_name` | `string` | No | Name for new project (required if create_project is true) |
| `training_consent` | `string` | No | Whether repository code can be used for training (default: opt_out) |

### Return shape

The live registry does not declare a response schema. Expect a tool-specific JSON result and handle success, error, and result fields defensively.

### Worked example

```json
{
  "arguments": {
    "repo_url": "https://example.com"
  },
  "tool": "import_repository"
}
```

## `import_test_cases_from_document`

### Purpose

Import test cases from document text content. The AI will analyze the text and extract test cases automatically.

### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `project_id` | `integer` | Yes | No description supplied. |
| `text_content` | `string` | Yes | Document text content to extract test cases from |
| `source_name` | `string` | No | Optional name for the document source (e.g., 'Requirements Document', 'Test Plan v2.0') |

### Return shape

The live registry does not declare a response schema. Expect a tool-specific JSON result and handle success, error, and result fields defensively.

### Worked example

```json
{
  "arguments": {
    "project_id": 1,
    "text_content": "your-text-content"
  },
  "tool": "import_test_cases_from_document"
}
```

## `list_ai_crawl_jobs`

### Purpose

List AI crawl jobs for a project, ordered by most recent first.

### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `project_id` | `integer` | Yes | Project ID to list crawl jobs for |
| `limit` | `integer` | No | Maximum number of jobs to return (default: 20) |

### Return shape

The live registry does not declare a response schema. Expect a tool-specific JSON result and handle success, error, and result fields defensively.

### Worked example

```json
{
  "arguments": {
    "project_id": 1
  },
  "tool": "list_ai_crawl_jobs"
}
```

## `list_auth_profiles`

### Purpose

List secret-free authentication profile metadata for a project. Use the returned profile id in run_tests or apply_patch_and_run; never ask the user to paste credentials into a prompt or script.

### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `project_id` | `integer` | Yes | Project ID |

### Return shape

The live registry does not declare a response schema. Expect a tool-specific JSON result and handle success, error, and result fields defensively.

### Worked example

```json
{
  "arguments": {
    "project_id": 1
  },
  "tool": "list_auth_profiles"
}
```

## `list_deploy_integrations`

### Purpose

List deploy-provider webhooks (Vercel, Netlify, manual) configured for a project. Read-only. The webhook_secret is masked in the response.

### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `project_id` | `integer` | Yes | The QM project ID. |

### Return shape

The live registry does not declare a response schema. Expect a tool-specific JSON result and handle success, error, and result fields defensively.

### Worked example

```json
{
  "arguments": {
    "project_id": 1
  },
  "tool": "list_deploy_integrations"
}
```

## `list_projects`

### Purpose

List projects for the current user, including each project's vanity URL slug and project type (web or native_mobile). ALWAYS call this before creating a new project to check if a similar project already exists.

### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `limit` | `integer` | No | No description supplied. |
| `offset` | `integer` | No | No description supplied. |

### Return shape

The live registry does not declare a response schema. Expect a tool-specific JSON result and handle success, error, and result fields defensively.

### Worked example

```json
{
  "arguments": {},
  "tool": "list_projects"
}
```

## `list_repositories`

### Purpose

List repositories for a project

### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `project_id` | `integer` | Yes | No description supplied. |
| `limit` | `integer` | No | No description supplied. |
| `offset` | `integer` | No | No description supplied. |

### Return shape

The live registry does not declare a response schema. Expect a tool-specific JSON result and handle success, error, and result fields defensively.

### Worked example

```json
{
  "arguments": {
    "project_id": 1
  },
  "tool": "list_repositories"
}
```

## `list_scripts`

### Purpose

List automation scripts for a project or test case. Returns script names and IDs (use get_script to view the code).

### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `project_id` | `integer` | Yes | Project ID to list scripts for |
| `test_case_id` | `integer` | No | Optional: filter scripts by test case ID |
| `limit` | `integer` | No | No description supplied. |
| `offset` | `integer` | No | Skip this many scripts; use `next_offset` from a previous page |

### Return shape

The live registry does not declare a response schema. Expect a tool-specific JSON result and handle success, error, and result fields defensively.

### Worked example

```json
{
  "arguments": {
    "project_id": 1
  },
  "tool": "list_scripts"
}
```

## `list_test_cases`

### Purpose

List test cases for a project

### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `project_id` | `integer` | Yes | No description supplied. |
| `limit` | `integer` | No | No description supplied. |
| `offset` | `integer` | No | No description supplied. |

### Return shape

The live registry does not declare a response schema. Expect a tool-specific JSON result and handle success, error, and result fields defensively.

### Worked example

```json
{
  "arguments": {
    "project_id": 1
  },
  "tool": "list_test_cases"
}
```

## `refresh_repository`

### Purpose

Refresh an existing repository analysis at its latest commit. Private repositories reuse the stored GitHub App connection.

### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `repo_id` | `integer` | Yes | No description supplied. |
| `branch` | `string` | No | Optional branch override |

### Return shape

The live registry does not declare a response schema. Expect a tool-specific JSON result and handle success, error, and result fields defensively.

### Worked example

```json
{
  "arguments": {
    "repo_id": 1
  },
  "tool": "refresh_repository"
}
```

## `search_test_cases`

### Purpose

Search for test cases by title, description, or tags. Better than listing all test cases when looking for something specific.

### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `project_id` | `integer` | Yes | Project ID to search in |
| `query` | `string` | Yes | Search query (searches in title, description, and tags) |
| `category` | `string` | No | Filter by category (optional) |
| `status` | `string` | No | Filter by status (optional) |
| `limit` | `integer` | No | Maximum number of results |

### Return shape

The live registry does not declare a response schema. Expect a tool-specific JSON result and handle success, error, and result fields defensively.

### Worked example

```json
{
  "arguments": {
    "project_id": 1,
    "query": "your-query"
  },
  "tool": "search_test_cases"
}
```

## `test_deploy_integration`

### Purpose

Record a test-ping against a deploy integration to mark it active without waiting for a real deploy. Useful to confirm the integration is wired up after pasting the webhook into Vercel/Netlify.

### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `project_id` | `integer` | Yes | The QM project ID. |
| `integration_id` | `integer` | Yes | The integration ID to ping. |

### Return shape

The live registry does not declare a response schema. Expect a tool-specific JSON result and handle success, error, and result fields defensively.

### Worked example

```json
{
  "arguments": {
    "integration_id": 1,
    "project_id": 1
  },
  "tool": "test_deploy_integration"
}
```

## `update_project`

### Purpose

Update an existing project (e.g., set main_url for AI crawl)

### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `project_id` | `integer` | Yes | No description supplied. |
| `name` | `string` | No | No description supplied. |
| `description` | `string` | No | No description supplied. |
| `main_url` | `string` | No | No description supplied. |

### Return shape

The live registry does not declare a response schema. Expect a tool-specific JSON result and handle success, error, and result fields defensively.

### Worked example

```json
{
  "arguments": {
    "project_id": 1
  },
  "tool": "update_project"
}
```

## `update_project_pipeline_gates`

### Purpose

Toggle PR-pipeline gate flags on a project. Gates live in project.test_frameworks and control which checks run on each pull request. Only the known gate keys are accepted; all other settings (model config, etc.) are preserved. Pass a gate as true/false. Credit-spending gates (ai_review, sast, bola) default OFF when absent; the rest default ON.

### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `project_id` | `integer` | Yes | The QM project ID. |
| `gates` | `object` | Yes | Map of gate key to boolean. Recognized keys: _pipeline_run_tests, _pipeline_run_beta, _pipeline_run_ai_review, _pipeline_run_sast, _pipeline_run_sast_verify, _pipeline_run_sast_fixes, _pipeline_run_bola, _pipeline_run_tech_debt. Example: {"_pipeline_run_beta": true} |

### Return shape

The live registry does not declare a response schema. Expect a tool-specific JSON result and handle success, error, and result fields defensively.

### Worked example

```json
{
  "arguments": {
    "gates": {},
    "project_id": 1
  },
  "tool": "update_project_pipeline_gates"
}
```

## `update_script`

### Purpose

Update an automation script's name or code. Prefer `patch` over `code`: it sends only the lines you are changing instead of re-uploading the whole script, which is the single largest token saving available on this server.

### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `script_id` | `integer` | Yes | Automation script ID to update |
| `name` | `string` | No | New script name (optional) |
| `code` | `string` | No | Full replacement code (optional; prefer `patch`) |
| `patch` | `array` | No | Anchored edits applied in order. Each old_string must appear exactly once unless replace_all is true; an ambiguous or missing anchor is rejected rather than guessed. Cannot be combined with `code`. |
| `expected_version` | `string` | No | Version string from a previous get_script/update_script. When supplied, the update is rejected if the script changed in the meantime. |

### Return shape

The live registry does not declare a response schema. Expect a tool-specific JSON result and handle success, error, and result fields defensively.

### Worked example

```json
{
  "arguments": {
    "script_id": 1
  },
  "tool": "update_script"
}
```

## `update_test_case`

### Purpose

Update an existing test case's fields (title, description, steps, expected result, category, priority). Pass `steps` as an array of {step, expected} to replace the structured steps — that is the field automation reads, and the only way to add a mobile selector (resource_id, or the target's visible text in quotes) to a native test case. A plain string is stored as free-text detailed instructions instead, which no generator reads as steps.

### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `test_case_id` | `integer` | Yes | Test case ID to update |
| `title` | `string` | No | New title (optional) |
| `description` | `string` | No | New description (optional) |
| `steps` | `value` | No | Structured steps to replace the existing ones, or a plain string stored as detailed instructions. |
| `expected_result` | `string` | No | New expected result (optional) |
| `category` | `string` | No | New category (optional) |
| `priority` | `value` | No | Priority: 1-5 (integer) or critical/high/medium/low (string) |

### Return shape

The live registry does not declare a response schema. Expect a tool-specific JSON result and handle success, error, and result fields defensively.

### Worked example

```json
{
  "arguments": {
    "test_case_id": 1
  },
  "tool": "update_test_case"
}
```
