# x_ads_add_targeting_criterion

> Add one targeting criterion to a line item (call once per criterion). A write tool that previews before it changes anything, one of 26 X Ads tools…

[Documentation](https://www.getmcpads.com/docs) / [Sources](https://www.getmcpads.com/docs/sources) / [X Ads](https://www.getmcpads.com/docs/sources/x-ads)

Add one targeting criterion to a line item (call once per criterion). A line item with no criteria serves broad ; that is allowed, not an error. Preview by default. Ask the user to approve the exact account, target and parameters before confirm:true.

> **Warning** This tool changes the account. It is absent from the tool list on the Free plan, and it previews by default: without `confirm: true` it describes the change and applies nothing.

|  |  |
| --- | --- |
| Source | [X Ads](https://www.getmcpads.com/docs/sources/x-ads) |
| Kind | Write |
| Discovery | Reachable through `search_tools` and `run_tool` |
| Account parameter | `account_id` |
| Endpoint | https://mcp.getmcpads.com/x-ads/mcp |

## Parameters

| Name | Type | Required | Notes |
| --- | --- | --- | --- |
| `account_id` | string | Required | X Ads account ID selected in Sources. |
| `line_item_id` | string | Required | Line item to add the criterion to. |
| `operator_type` | string | Optional | Comparison operator. Sent as EQ when omitted (ads-api requires it); NE negates (exclude). One of: `EQ`, `NE`, `GTE`, `LT`. |
| `targeting_type` | string | Required | Criterion type, e.g. LOCATION, INTEREST, BROAD_KEYWORD, PHRASE_KEYWORD, EXACT_KEYWORD, FOLLOWERS_... |
| `targeting_value` | string | Required | Value for the type: a targeting ID for LOCATION/INTEREST (look up via targeting search), a user I... |
| `confirm` | boolean | Optional | False previews only; true applies this exact change after explicit human confirmation. Default: `false`. |

## Calling it

Through run_tool, since it is not announced

```json
{
  "name": "run_tool",
  "arguments": {
    "name": "x_ads_add_targeting_criterion",
    "args": {
      "account_id": "<string>",
      "line_item_id": "<string>",
      "targeting_type": "<string>",
      "targeting_value": "<string>"
    }
  }
}
```

- [X Ads metrics](https://www.getmcpads.com/docs/sources/x-ads/metrics): What you can ask for.
- [X Ads dimensions](https://www.getmcpads.com/docs/sources/x-ads/dimensions): How you can break it down.

---

This page as HTML: https://www.getmcpads.com/docs/sources/x-ads/tools/x_ads_add_targeting_criterion
Every page under /docs is available as Markdown: append `.md`, or send `Accept: text/markdown`.
