# create_lead_scoring_model (/docs/mcp/tools/create-lead-scoring-model)

{/* Generated by scripts/sync-mcp-tools.mjs from happierleads-api. Do not edit: change src/routes/mcp/toolDocs.json there, or add content/mcp-notes/create_lead_scoring_model.mdx. */}

**Create a lead scoring model** · Changes data

Create a lead scoring model on a website, with its rules: criteria (same shape as get_lead_scoring_model / update_lead_scoring_model), active and aiMatching are saved with it. Leave criteria out to start with an empty model and add rules later with update_lead_scoring_model. Names must be unique per website (case-insensitive). To have AI build a model from your website instead, use ai_generate_scoring_model. websiteId comes from list_websites. Returns the saved model with its _id. If the model was created but its rules could not be saved, the result is an error with modelId and a note to retry with update_lead_scoring_model.

| Connection | Account URL, team member URL or OAuth |
| --- | --- |

## Parameters [#parameters]

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `websiteId` | `string` | Yes | Website id (24 hex characters) from list_websites. |
| `name` | `string` | Yes | Model name, unique on the website, e.g. "Enterprise SaaS". |
| `active` | `boolean` | No | true (default) to score leads with it straight away, false to save it switched off. |
| `criteria` | `object` | No | Rules keyed by criterion, in the shape get_lead_scoring_model returns (industry, employees, revenue, jobTitle, pageVisited, …), e.g. \{"industry":[\{"values":["Software"],"score":8,"filter":"any"\}]\}. |
| `aiMatching` | `object` | No | AI matching settings, in the shape get_lead_scoring_model returns. |

## Tool definition [#tool-definition]

What your assistant receives from `tools/list`:

```json
{
  "name": "create_lead_scoring_model",
  "title": "Create a lead scoring model",
  "annotations": {
    "title": "Create a lead scoring model",
    "readOnlyHint": false,
    "destructiveHint": false,
    "idempotentHint": true,
    "openWorldHint": false
  },
  "inputSchema": {
    "type": "object",
    "properties": {
      "websiteId": {
        "type": "string",
        "description": "Website id (24 hex characters) from list_websites."
      },
      "name": {
        "type": "string",
        "description": "Model name, unique on the website, e.g. \"Enterprise SaaS\"."
      },
      "active": {
        "type": "boolean",
        "description": "true (default) to score leads with it straight away, false to save it switched off."
      },
      "criteria": {
        "type": "object",
        "description": "Rules keyed by criterion, in the shape get_lead_scoring_model returns (industry, employees, revenue, jobTitle, pageVisited, …), e.g. {\"industry\":[{\"values\":[\"Software\"],\"score\":8,\"filter\":\"any\"}]}."
      },
      "aiMatching": {
        "type": "object",
        "description": "AI matching settings, in the shape get_lead_scoring_model returns."
      }
    },
    "required": [
      "websiteId",
      "name"
    ]
  }
}
```
