# generate_variants

Generates variants of existing screens within a project using a text prompt. Instructions for Tool Call: * If the tool fails with a timeout, don't retry. Instead, try to get the screen with get_screen method every 30 seconds for up to 10 times before giving up.

Agent View of the PolicyLayer registry record for `generate_variants`. HTML page: https://policylayer.com/tools/com-googleapis-stitch-mcp/generate-variants

## Facts

- Tool: `generate_variants`
- Server: Mcp (`https://stitch.googleapis.com/mcp`) — https://policylayer.com/tools/com-googleapis-stitch-mcp.md
- Homepage: https://github.com/https://stitch.googleapis.com/mcp
- Risk category: Write (Medium risk)
- Registry record: grade D, identity unverified
- Server auth posture: open
- Server rate-limited: no
- Parameters: 6 (4 required)
- Recommended policy verdict: Rate-limited

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `prompt` | string | yes | Required. The input text used to generate the variants. |
| `modelId` | string | no | Optional. The model to use for generation. |
| `projectId` | string | yes | Required. The project ID of screens to generate variants for, example: '4044680601076201931', without the `projects/` prefix. |
| `deviceType` | string | no | Optional. The type of device that captured the screenshot, e.g., mobile or desktop. |
| `variantOptions` | object | yes | Required. The variant options for generation, including the number of variants, creative range, and aspects to focus on. |
| `selectedScreenIds` | array | yes | Required. The screen ids of screen to generate variants for, example: ['98b50e2ddc9943efb387052637738f61', '98b50e2ddc9943efb387052637738f62'], without the `scr |

Parameters from the server's own tool schema.

## Example call (MCP tools/call, JSON-RPC 2.0)

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "generate_variants",
    "arguments": {
      "prompt": "<prompt>",
      "projectId": "<projectId>",
      "variantOptions": {},
      "selectedScreenIds": []
    }
  }
}
```

## Why generate_variants is rated Medium

An AI agent can call generate_variants faster than any human can review: one bad instruction and it creates or modifies resources in Mcp by the hundred, each call as confident as the last.

Risk signals: Bulk/mass operation — affects multiple targets

## Use case

AI agents use generate_variants to create or update resources in Mcp, usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your Mcp environment.

## Recommended policy (PolicyLayer)

Verdict: **Rate-limited**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches Mcp:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "generate_variants": {
      "limits": [
        {
          "counter": "generate_variants_rate",
          "window": "minute",
          "max": 30,
          "scope": "grant"
        }
      ]
    }
  }
}
```

## Other tools on Mcp (14)

- `delete_project` — Destructive — https://policylayer.com/tools/com-googleapis-stitch-mcp/delete-project.md
- `get_project` — Read — https://policylayer.com/tools/com-googleapis-stitch-mcp/get-project.md
- `get_screen` — Read — https://policylayer.com/tools/com-googleapis-stitch-mcp/get-screen.md
- `list_design_systems` — Read — https://policylayer.com/tools/com-googleapis-stitch-mcp/list-design-systems.md
- `list_projects` — Read — https://policylayer.com/tools/com-googleapis-stitch-mcp/list-projects.md
- `list_screens` — Read — https://policylayer.com/tools/com-googleapis-stitch-mcp/list-screens.md
- `apply_design_system` — Write — https://policylayer.com/tools/com-googleapis-stitch-mcp/apply-design-system.md
- `create_design_system` — Write — https://policylayer.com/tools/com-googleapis-stitch-mcp/create-design-system.md
- `create_design_system_from_design_md` — Write — https://policylayer.com/tools/com-googleapis-stitch-mcp/create-design-system-from-design-md.md
- `create_project` — Write — https://policylayer.com/tools/com-googleapis-stitch-mcp/create-project.md
- `edit_screens` — Write — https://policylayer.com/tools/com-googleapis-stitch-mcp/edit-screens.md
- `generate_screen_from_text` — Write — https://policylayer.com/tools/com-googleapis-stitch-mcp/generate-screen-from-text.md
- `update_design_system` — Write — https://policylayer.com/tools/com-googleapis-stitch-mcp/update-design-system.md
- `upload_design_md` — Write — https://policylayer.com/tools/com-googleapis-stitch-mcp/upload-design-md.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=com-googleapis-stitch-mcp · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/com-googleapis-stitch-mcp
