Attach a dataset to an ad set
ads_ad_set_dataset[writes · ads:manage scope] Attaches a Meta dataset (pixel) to an existing ad set, optionally with the conversion event (e.g. PURCHASE). Pass agentName and reason. Audited in Ads > Agent activity. It cannot be undone from there: to change it back, call this tool again with the earlier settings.
(Wraps POST /api/v2/ads/ad-sets/{id}/dataset.)
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"id": "<id>",
"agentName": "<agentName>",
"reason": "<reason>",
"pixelId": "<pixelId>"
},
"name": "ads_ad_set_dataset"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| reason | Yes | Why the agent is doing this. Shown to the owner and kept in the audit trail. | |
| brandId | No | A brand id (GET /api/v2/brands) or "personal"; default: the key owner's active brand. | |
| pixelId | Yes | The Meta dataset (pixel) id, digits. | |
| agentName | Yes | Which agent is acting. Shown to the owner in Ads > Agent activity. | |
| customEventType | No | Meta standard event, e.g. PURCHASE, LEAD. |