openads-ai 0.2.10 → 0.2.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +1 -0
- package/dist/mcp-extension.js +5 -3
- package/package.json +1 -1
- package/skills/ads/meta-ads.md +12 -2
package/dist/cli.js
CHANGED
|
@@ -93,6 +93,7 @@ function buildSystemPrompt(config) {
|
|
|
93
93
|
'- You have direct, live access to Google Ads, Meta Ads, and Google Analytics 4 (GA4) via custom Model Context Protocol (MCP) server tools.',
|
|
94
94
|
'- Whenever the user asks to check campaigns, review metrics, fetch performance data, or analyze active ads, you MUST use the corresponding MCP server tools to query the live platforms.',
|
|
95
95
|
'- NEVER search the local file system, run grep/ripgrep, check Git logs, or read codebase files to search for ad campaign data. The active folder is just the application source code — it contains zero campaign metrics. Campaign data comes ONLY from querying your active MCP server tools.',
|
|
96
|
+
'- To fetch Meta campaign data: ALWAYS call `get_ad_accounts()` first (takes no parameters) to retrieve the active account ID (e.g., `act_123456789`). Then call `list_campaigns(account_id)` to list campaigns and retrieve active campaign IDs. Finally, call `get_campaign_performance` or `get_insights` using the retrieved IDs. Never guess or omit `object_id` when calling performance tools.',
|
|
96
97
|
];
|
|
97
98
|
if (isLaunchMode) {
|
|
98
99
|
parts.push('YOU ARE OPERATING IN LAUNCH MODE (READ-WRITE).', 'You are authorized to execute active write modifications on ad accounts (e.g. pausing campaigns, scaling bids, altering daily budgets, creating ads).', 'CRITICAL SAFETY RULE: For any write operation, you MUST generate a clear visual preview card outlining the exact changes and ask the user for explicit confirmation (Y/N) before executing. NEVER make active changes without their explicit confirmation.');
|
package/dist/mcp-extension.js
CHANGED
|
@@ -27,8 +27,9 @@ export default async function (pi) {
|
|
|
27
27
|
const googleTransport = new StdioClientTransport({
|
|
28
28
|
command,
|
|
29
29
|
args,
|
|
30
|
+
stderr: "ignore" // Mute startup logs to ensure a clean CLI experience
|
|
30
31
|
});
|
|
31
|
-
const googleClient = new Client({ name: "openads-google-ads-client", version: "0.2.
|
|
32
|
+
const googleClient = new Client({ name: "openads-google-ads-client", version: "0.2.10" }, { capabilities: {} });
|
|
32
33
|
await googleClient.connect(googleTransport);
|
|
33
34
|
clients.push({ name: "google-ads", client: googleClient });
|
|
34
35
|
}
|
|
@@ -48,9 +49,10 @@ export default async function (pi) {
|
|
|
48
49
|
env: {
|
|
49
50
|
...process.env,
|
|
50
51
|
"META_ACCESS_TOKEN": config.metaToken
|
|
51
|
-
}
|
|
52
|
+
},
|
|
53
|
+
stderr: "ignore" // Mute diagnostic startup logs to keep user interface premium
|
|
52
54
|
});
|
|
53
|
-
const metaClient = new Client({ name: "openads-meta-ads-client", version: "0.2.
|
|
55
|
+
const metaClient = new Client({ name: "openads-meta-ads-client", version: "0.2.10" }, { capabilities: {} });
|
|
54
56
|
await metaClient.connect(metaTransport);
|
|
55
57
|
clients.push({ name: "meta-ads", client: metaClient });
|
|
56
58
|
}
|
package/package.json
CHANGED
package/skills/ads/meta-ads.md
CHANGED
|
@@ -41,5 +41,15 @@ Read `product-marketing.md` first to understand the product context.
|
|
|
41
41
|
|
|
42
42
|
---
|
|
43
43
|
|
|
44
|
-
## MCP Tools to Use
|
|
45
|
-
|
|
44
|
+
## MCP Tools to Use & Execution Sequence
|
|
45
|
+
|
|
46
|
+
When Meta Ads MCP is connected, you must follow this exact sequence to retrieve campaign data and avoid validation errors:
|
|
47
|
+
|
|
48
|
+
1. **Discover Ad Accounts**: First, call `get_ad_accounts()` (no parameters required) to get the user's connected ad accounts and retrieve their `account_id` (e.g., `act_123456789`).
|
|
49
|
+
2. **List Campaigns**: Once you have the `account_id`, call `list_campaigns(account_id: "act_YOUR_ACCOUNT_ID")` to get a list of active and inactive campaigns with their names and `id`s.
|
|
50
|
+
3. **Fetch Performance & Insights**:
|
|
51
|
+
- To check overall campaign metrics, call `get_campaign_performance(object_id: "YOUR_CAMPAIGN_ID", level: "CAMPAIGN")`.
|
|
52
|
+
- Or to check account-wide metrics, call `get_campaign_performance(object_id: "act_YOUR_ACCOUNT_ID", level: "AD_ACCOUNT")`.
|
|
53
|
+
- To retrieve detailed ads/adset insights, breakdowns, or custom metrics, call `get_insights(object_id: "YOUR_CAMPAIGN_ID", level: "CAMPAIGN")`.
|
|
54
|
+
|
|
55
|
+
**CRITICAL RULE**: Never guess campaign IDs or call `get_campaign_performance` or `get_insights` without an `object_id`. Always query `get_ad_accounts()` first, then `list_campaigns()`, and finally fetch performance.
|