@jclvsh/dropspace 2.29.0 → 2.30.0
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/commands/boosts.js +4 -1
- package/dist/tools/boosts.d.ts +1 -1
- package/dist/tools/boosts.js +12 -2
- package/dist/types.d.ts +1 -1
- package/package.json +1 -1
package/dist/commands/boosts.js
CHANGED
|
@@ -8,7 +8,8 @@ export function registerBoostCommands(program, client) {
|
|
|
8
8
|
.requiredOption("-b, --daily-budget-cents <n>", "daily budget in cents (100 - 10000 = $1 - $100)")
|
|
9
9
|
.requiredOption("-d, --duration-days <n>", "campaign duration in days (1 - 7)")
|
|
10
10
|
.option("--platform <platform>", "ad platform: facebook | instagram", "facebook")
|
|
11
|
-
.option("--objective <objective>", "
|
|
11
|
+
.option("--objective <objective>", "engagement | traffic (link clicks, facebook posts only)", "engagement")
|
|
12
|
+
.option("--max-cpc-cents <n>", "pause when the average cost per click passes this many cents")
|
|
12
13
|
.option("--ad-account-id <id>", "explicit meta ad account id (e.g. 'act_123'); defaults to the first active one")
|
|
13
14
|
.action(async (opts) => {
|
|
14
15
|
try {
|
|
@@ -20,6 +21,8 @@ export function registerBoostCommands(program, client) {
|
|
|
20
21
|
};
|
|
21
22
|
if (opts.adAccountId)
|
|
22
23
|
body.ad_account_id = opts.adAccountId;
|
|
24
|
+
if (opts.maxCpcCents)
|
|
25
|
+
body.stop_rules = { max_cpc_cents: parseInt(opts.maxCpcCents, 10) };
|
|
23
26
|
const result = await client.post(`/launches/${opts.launchId}/boost`, body);
|
|
24
27
|
formatOutput(result, getFormat(program.opts()));
|
|
25
28
|
}
|
package/dist/tools/boosts.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Launch boost MCP tools — paid amplification of organic Facebook launches.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* Engagement or traffic objective, optional cost-per-click stop rule, auto-targeting. API key auth.
|
|
5
5
|
*/
|
|
6
6
|
import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
7
7
|
import { DropspaceClient } from "../client.js";
|
package/dist/tools/boosts.js
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Launch boost MCP tools — paid amplification of organic Facebook launches.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* Engagement or traffic objective, optional cost-per-click stop rule, auto-targeting. API key auth.
|
|
5
5
|
*/
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
const platformSchema = z
|
|
8
8
|
.enum(["facebook", "instagram"])
|
|
9
9
|
.describe("ad platform — facebook or instagram (IG boost requires the IG business account linked to one of the user's facebook pages)");
|
|
10
|
-
const objectiveSchema = z
|
|
10
|
+
const objectiveSchema = z
|
|
11
|
+
.enum(["engagement", "traffic"])
|
|
12
|
+
.describe("engagement optimizes for reactions on the post; traffic optimizes for clicks on the link of a facebook link post (no photos or video)");
|
|
11
13
|
const launchIdParam = z.string().uuid().describe("launch ID to boost — must have a successful facebook post");
|
|
12
14
|
const boostIdParam = z.string().uuid().describe("boost ID");
|
|
13
15
|
export function registerBoostTools(server, client) {
|
|
@@ -26,6 +28,13 @@ export function registerBoostTools(server, client) {
|
|
|
26
28
|
.string()
|
|
27
29
|
.optional()
|
|
28
30
|
.describe("explicit meta ad account id (e.g. 'act_123'). defaults to the first active ad account."),
|
|
31
|
+
max_cpc_cents: z
|
|
32
|
+
.number()
|
|
33
|
+
.int()
|
|
34
|
+
.min(10)
|
|
35
|
+
.max(10000)
|
|
36
|
+
.optional()
|
|
37
|
+
.describe("pause the boost when its average cost per click passes this many cents. it also always pauses when click-through falls below half its first day"),
|
|
29
38
|
}, async (args) => {
|
|
30
39
|
try {
|
|
31
40
|
const result = await client.post(`/launches/${args.launch_id}/boost`, {
|
|
@@ -34,6 +43,7 @@ export function registerBoostTools(server, client) {
|
|
|
34
43
|
duration_days: args.duration_days,
|
|
35
44
|
objective: args.objective ?? "engagement",
|
|
36
45
|
...(args.ad_account_id ? { ad_account_id: args.ad_account_id } : {}),
|
|
46
|
+
...(args.max_cpc_cents ? { stop_rules: { max_cpc_cents: args.max_cpc_cents } } : {}),
|
|
37
47
|
});
|
|
38
48
|
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
39
49
|
}
|
package/dist/types.d.ts
CHANGED
|
@@ -325,7 +325,7 @@ export interface Boost {
|
|
|
325
325
|
platform: "facebook" | "instagram";
|
|
326
326
|
post_id: string;
|
|
327
327
|
status: "paused" | "active" | "completed" | "failed" | "canceled";
|
|
328
|
-
objective: "engagement";
|
|
328
|
+
objective: "engagement" | "traffic";
|
|
329
329
|
daily_budget_cents: number;
|
|
330
330
|
duration_days: number;
|
|
331
331
|
meta_ad_account_id: string;
|