fb_list_adsets
Pack: facebook_ads · Endpoint: https://gateway.pipeworx.io/facebook_ads/mcp
List ad sets in a campaign (e.g., account_id: ‘123456789’, campaign_id: ‘987654321’). Returns names, IDs, status, budgets, and targeting.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
campaign_id | string | yes | Campaign ID |
fields | string | no | Comma-separated fields (default: “id,name,status,daily_budget,lifetime_budget,targeting,optimization_goal”) |
limit | number | no | Max results (default 25) |
Example call
Arguments
{
"campaign_id": "120393847102340"
}
curl
curl -X POST https://gateway.pipeworx.io/facebook_ads/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"fb_list_adsets","arguments":{"campaign_id":"120393847102340"}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('fb_list_adsets', {
"campaign_id": "120393847102340"
});
More examples
{
"campaign_id": "120393847102340",
"limit": 50,
"fields": "id,name,status,daily_budget,lifetime_budget,targeting,optimization_goal,created_time"
}
Response shape
| Field | Type | Description |
|---|---|---|
data | array | List of ad sets |
paging | object | Pagination info |
error | string | Error code if connection failed |
message | string | Error message if connection failed |
Full JSON Schema
{
"type": "object",
"properties": {
"data": {
"type": "array",
"description": "List of ad sets",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Ad set ID"
},
"name": {
"type": "string",
"description": "Ad set name"
},
"status": {
"type": "string",
"description": "Ad set status"
},
"daily_budget": {
"type": "number",
"description": "Daily budget in cents"
},
"lifetime_budget": {
"type": "number",
"description": "Lifetime budget in cents"
},
"targeting": {
"type": "object",
"description": "Targeting specifications"
},
"optimization_goal": {
"type": "string",
"description": "Optimization goal"
}
}
}
},
"paging": {
"type": "object",
"description": "Pagination info",
"properties": {
"cursors": {
"type": "object"
},
"next": {
"type": "string"
}
}
},
"error": {
"type": "string",
"description": "Error code if connection failed"
},
"message": {
"type": "string",
"description": "Error message if connection failed"
}
}
}
Connect
Add this to your MCP client config, or use one-click install buttons:
{
"mcpServers": {
"facebook_ads": {
"url": "https://gateway.pipeworx.io/facebook_ads/mcp"
}
}
}
See Getting Started for client-specific install steps.