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

# Discovery & generation

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

## `check_ai_crawl_status`

### Purpose

Check the status of an AI crawl job. Use this to see if a crawl has completed and inform the user when tests are ready.

### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `crawl_id` | `string` | Yes | The crawl job ID to check status for |

### 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": {
    "crawl_id": "your-crawl-id"
  },
  "tool": "check_ai_crawl_status"
}
```

## `generate_area_plan`

### Purpose

Run deep gap analysis on a repository to discover and map testing areas.

### Parameters

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

### 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": "generate_area_plan"
}
```

## `generate_code_for_test_case`

### Purpose

Generate automation test code for a specific test case. Call get_test_capabilities first and use its recommendation unless evidence favors an override; then execute the result and continue its autonomous QA loop. Supports Playwright, pytest, Cypress, Selenium, Vitest, Jest, Kotlin, Scala, Go (`go test`), and Rust (`cargo test`). When `framework` is omitted, the framework is auto-resolved from project settings, linked-repository language detection, and the test category.

For a test case in a Native Mobile project, pass `framework: "appium"` together with `platform` ('android' or 'ios'). That is a different lane: the test case's steps are compiled deterministically into a managed native script (no AI generation, no coding-seat job, so it answers inline), and the response is compact metadata rather than code. Run the resulting script_id with `run_tests` — not `run_native_test`, which is for Go/Rust/Jest only. Generic frameworks will produce browser-oriented code for a native case.

### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `test_case_id` | `integer` | Yes | Test case ID to generate code for |
| `framework` | `string` | No | Optional framework override. One of: playwright, pytest, cypress, selenium, jest, vitest, kotlin, scala, go, rust, appium. Use 'appium' for a native mobile test case, and pass `platform` with it. When omitted, the framework is auto-detected from the linked repository or test category — auto-detection never selects appium. |
| `platform` | `string` | No | Native mobile platform for `framework: "appium"`. Required when the project has both an Android and an iOS app connected; otherwise it defaults to the single connected platform. Rejected for every other framework. |
| `generation_service` | `string` | No | Code-generation service; auto uses the project setting |

### 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": "generate_code_for_test_case"
}
```

## `generate_gap_tests`

### Purpose

Generate test cases to fill coverage gaps found by analyze_coverage. Analyzes the repository's deep-scan results and generates E2E, smoke, integration, and security test cases.

### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `repo_id` | `string` | Yes | Repository ID to generate gap tests for |
| `max_tests` | `integer` | No | Maximum number of tests to generate per category (default: 5) |

### 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": "generate_gap_tests"
}
```

## `generate_tests`

### Purpose

Generate Playwright tests for a specific feature or component

### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `repo_id` | `string` | Yes | Repository ID to generate tests for |
| `feature_description` | `string` | Yes | Description of the feature to test |
| `test_type` | `string` | No | Type of tests to generate |
| `selectors` | `array` | No | Specific selectors to target |

### 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": {
    "feature_description": "your-feature-description",
    "repo_id": "your-repo-id"
  },
  "tool": "generate_tests"
}
```

## `generate_tests_for_areas`

### Purpose

Generate test cases for specific discovered test areas.

### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `repo_id` | `string` | Yes | Repository ID |
| `area_ids` | `array` | Yes | List of TestArea IDs to generate tests for |
| `categories` | `array` | No | Optional specific categories to generate (e.g. e2e, a11y, ux). If omitted, uses recommended categories. |
| `max_tests_per_area` | `integer` | No | Max tests to generate per area |

### 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": {
    "area_ids": [],
    "repo_id": "your-repo-id"
  },
  "tool": "generate_tests_for_areas"
}
```

## `get_ai_crawl_results`

### Purpose

Get the results of a completed AI crawl job including generated test scripts, test cases, and flow memory.

### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `crawl_id` | `string` | Yes | The crawl job ID to get results for |

### 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": {
    "crawl_id": "your-crawl-id"
  },
  "tool": "get_ai_crawl_results"
}
```

## `import_document_and_crawl`

### Purpose

Complete workflow: Import document/text, create test cases, generate virtual test plan for approval, then initiate AI crawl. IMPORTANT: This tool will first generate a virtual test plan that MUST be approved by the user before proceeding. You must present the plan to the user, wait for their approval, then call this tool again with the approved_virtual_test_plan parameter to proceed with the crawl.

### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `project_id` | `integer` | Yes | Project ID to import into |
| `text_content` | `string` | Yes | Document text content to import (required if not using file_url) |
| `source_name` | `string` | No | Optional name for the document source |
| `url` | `string` | No | Project URL for AI crawl (will use project.main_url if not provided) |
| `test_case_id` | `integer` | No | Test case ID to crawl from (optional - will list test cases if not provided) |
| `depth` | `integer` | No | Crawl depth |
| `pages_limit` | `integer` | No | Maximum pages to crawl |
| `test_type` | `string` | No | Type of test to generate |
| `framework` | `string` | No | Test framework |
| `enable_giskard_validation` | `boolean` | No | Enable Giskard validation |
| `approved_virtual_test_plan` | `object` | No | Approved virtual test plan object (required for second call after user approves the plan). Include the full virtual_test_plan object from the first call response. |

### 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_document_and_crawl"
}
```

## `start_ai_crawl`

### Purpose

Start an AI crawl job for a project (requires project.main_url unless url is provided). For a Native Mobile project this runs mobile discovery against the connected app instead of a browser crawl — no URL is needed, `custom_instructions` is required, and the crawl starts immediately rather than returning a plan to approve. Use it to discover real on-device element selectors when a native test case has steps the mobile flow compiler cannot resolve.

### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `project_id` | `integer` | Yes | No description supplied. |
| `url` | `string` | No | No description supplied. |
| `depth` | `integer` | No | No description supplied. |
| `pages_limit` | `integer` | No | No description supplied. |
| `test_type` | `string` | No | No description supplied. |
| `framework` | `string` | No | No description supplied. |
| `enable_giskard_validation` | `boolean` | No | No description supplied. |
| `custom_instructions` | `string` | No | What to explore. Required for a native_mobile crawl, which produces nothing without it. |
| `crawl_mode` | `string` | No | Which pipeline to run. Defaults to 'native_mobile' for a Native Mobile project and 'web' otherwise, so this rarely needs to be set explicitly. |
| `platform` | `string` | No | Native app platform. Inferred when exactly one app is connected; required when the project has both Android and iOS apps. |

### 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": "start_ai_crawl"
}
```

## `start_ai_crawl_from_test_case`

### Purpose

Start an AI crawl job using an existing test case as instructions. IMPORTANT: This tool will first generate a virtual test plan that MUST be approved by the user before proceeding. You must present the plan to the user, wait for their approval, then call this tool again with the approved_virtual_test_plan parameter to proceed with the crawl. A test case in a Native Mobile project is the exception: it runs mobile discovery against the connected app, needs no URL, and starts immediately with no plan to approve — the mobile pipeline is never handed one.

### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `test_case_id` | `integer` | Yes | No description supplied. |
| `url` | `string` | No | No description supplied. |
| `depth` | `integer` | No | No description supplied. |
| `pages_limit` | `integer` | No | No description supplied. |
| `test_type` | `string` | No | No description supplied. |
| `framework` | `string` | No | No description supplied. |
| `enable_giskard_validation` | `boolean` | No | No description supplied. |
| `approved_virtual_test_plan` | `object` | No | Approved virtual test plan object (required for second call after user approves the plan). Include the full virtual_test_plan object from the first call response. |
| `crawl_mode` | `string` | No | Which pipeline to run. Defaults to 'native_mobile' for a Native Mobile project and 'web' otherwise, so this rarely needs to be set explicitly. |
| `platform` | `string` | No | Native app platform. Inferred when exactly one app is connected; required when the project has both Android and iOS apps. |

### 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": "start_ai_crawl_from_test_case"
}
```
