@cesteral/msads-mcp 1.2.0 → 1.3.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/cesteral-manifest.json +87 -3
- package/dist/mcp-server/server.d.ts.map +1 -1
- package/dist/mcp-server/server.js +2 -1
- package/dist/mcp-server/server.js.map +1 -1
- package/dist/mcp-server/tools/definitions/adjust-bids.tool.d.ts +42 -1
- package/dist/mcp-server/tools/definitions/adjust-bids.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/adjust-bids.tool.js +89 -1
- package/dist/mcp-server/tools/definitions/adjust-bids.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/bulk-create-entities.tool.d.ts +42 -1
- package/dist/mcp-server/tools/definitions/bulk-create-entities.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/bulk-create-entities.tool.js +85 -0
- package/dist/mcp-server/tools/definitions/bulk-create-entities.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/bulk-update-entities.tool.d.ts +42 -1
- package/dist/mcp-server/tools/definitions/bulk-update-entities.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/bulk-update-entities.tool.js +96 -1
- package/dist/mcp-server/tools/definitions/bulk-update-entities.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/bulk-update-status.tool.d.ts +42 -1
- package/dist/mcp-server/tools/definitions/bulk-update-status.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/bulk-update-status.tool.js +101 -1
- package/dist/mcp-server/tools/definitions/bulk-update-status.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/check-report-status.tool.d.ts +4 -4
- package/dist/mcp-server/tools/definitions/create-entity.tool.d.ts +46 -1
- package/dist/mcp-server/tools/definitions/create-entity.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/create-entity.tool.js +82 -1
- package/dist/mcp-server/tools/definitions/create-entity.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/create-report-schedule.tool.d.ts +54 -13
- package/dist/mcp-server/tools/definitions/create-report-schedule.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/create-report-schedule.tool.js +109 -2
- package/dist/mcp-server/tools/definitions/create-report-schedule.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/delete-entity.tool.d.ts +48 -1
- package/dist/mcp-server/tools/definitions/delete-entity.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/delete-entity.tool.js +123 -4
- package/dist/mcp-server/tools/definitions/delete-entity.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/delete-report-schedule.tool.d.ts +48 -7
- package/dist/mcp-server/tools/definitions/delete-report-schedule.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/delete-report-schedule.tool.js +75 -4
- package/dist/mcp-server/tools/definitions/delete-report-schedule.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/download-report.tool.d.ts +8 -8
- package/dist/mcp-server/tools/definitions/import-from-google.tool.d.ts +48 -7
- package/dist/mcp-server/tools/definitions/import-from-google.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/import-from-google.tool.js +63 -2
- package/dist/mcp-server/tools/definitions/import-from-google.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/manage-ad-extensions.tool.d.ts +48 -7
- package/dist/mcp-server/tools/definitions/manage-ad-extensions.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/manage-ad-extensions.tool.js +63 -2
- package/dist/mcp-server/tools/definitions/manage-ad-extensions.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/manage-criterions.tool.d.ts +52 -11
- package/dist/mcp-server/tools/definitions/manage-criterions.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/manage-criterions.tool.js +64 -2
- package/dist/mcp-server/tools/definitions/manage-criterions.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/submit-report.tool.d.ts +52 -7
- package/dist/mcp-server/tools/definitions/submit-report.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/submit-report.tool.js +96 -2
- package/dist/mcp-server/tools/definitions/submit-report.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/update-entity.tool.d.ts +26 -1608
- package/dist/mcp-server/tools/definitions/update-entity.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/update-entity.tool.js +2 -0
- package/dist/mcp-server/tools/definitions/update-entity.tool.js.map +1 -1
- package/dist/mcp-server/tools/utils/dry-run.d.ts +6 -0
- package/dist/mcp-server/tools/utils/dry-run.d.ts.map +1 -1
- package/dist/mcp-server/tools/utils/dry-run.js +27 -0
- package/dist/mcp-server/tools/utils/dry-run.js.map +1 -1
- package/dist/mcp-server/transports/streamable-http-transport.d.ts.map +1 -1
- package/dist/mcp-server/transports/streamable-http-transport.js +1 -0
- package/dist/mcp-server/transports/streamable-http-transport.js.map +1 -1
- package/dist/testkit/fixtures/index.d.ts +4 -0
- package/dist/testkit/fixtures/index.d.ts.map +1 -1
- package/dist/testkit/fixtures/index.js +102 -0
- package/dist/testkit/fixtures/index.js.map +1 -1
- package/dist/testkit/types.d.ts +2 -2
- package/dist/testkit/types.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { resolveSessionServices } from "../utils/resolve-session.js";
|
|
3
|
-
import { elicitDeleteConfirmation } from "@cesteral/shared";
|
|
3
|
+
import { elicitDeleteConfirmation, assertGovernedEffectDryRun, EffectResultSchema, EffectDryRunResultSchema, DispatchedCapabilitySchema, } from "@cesteral/shared";
|
|
4
4
|
const TOOL_NAME = "msads_delete_report_schedule";
|
|
5
5
|
const TOOL_TITLE = "Delete Microsoft Ads Report Schedule";
|
|
6
6
|
const TOOL_DESCRIPTION = `Delete (cancel) a Microsoft Advertising report schedule.
|
|
7
7
|
|
|
8
8
|
Note: The Microsoft Advertising API v13 JSON endpoints do not provide a programmatic endpoint to cancel or delete scheduled reports. Deletion must be performed via the Microsoft Advertising UI at app.ads.microsoft.com → Reports → Scheduled Reports.
|
|
9
9
|
|
|
10
|
-
This tool logs the deletion request and returns instructions for manual removal.`;
|
|
10
|
+
This tool logs the deletion request and returns instructions for manual removal — it does NOT programmatically delete the schedule, so it emits no completed-deletion effect.`;
|
|
11
11
|
export const DeleteReportScheduleInputSchema = z
|
|
12
12
|
.object({
|
|
13
13
|
scheduleId: z.string().min(1).describe("Schedule ID returned by msads_create_report_schedule"),
|
|
14
|
+
dry_run: z
|
|
15
|
+
.boolean()
|
|
16
|
+
.optional()
|
|
17
|
+
.default(false)
|
|
18
|
+
.describe("When true, validates the request and returns an EffectDryRunResult under `dryRun` without prompting for confirmation. (Microsoft Ads cannot delete schedules programmatically, so there is no effect to simulate.)"),
|
|
14
19
|
})
|
|
15
20
|
.describe("Parameters for deleting a Microsoft Ads report schedule");
|
|
16
21
|
export const DeleteReportScheduleOutputSchema = z
|
|
@@ -18,11 +23,28 @@ export const DeleteReportScheduleOutputSchema = z
|
|
|
18
23
|
confirmed: z.boolean(),
|
|
19
24
|
declineReason: z.string().optional(),
|
|
20
25
|
scheduleId: z.string(),
|
|
21
|
-
note: z.string().describe("Instructions for completing deletion"),
|
|
26
|
+
note: z.string().optional().describe("Instructions for completing deletion"),
|
|
22
27
|
timestamp: z.string().datetime(),
|
|
28
|
+
dryRun: EffectDryRunResultSchema.optional().describe("Present only when the request was made with `dry_run: true`. Nothing was deleted."),
|
|
29
|
+
effect: EffectResultSchema.optional().describe("Effect-class result identity. NOT emitted by this tool: Microsoft Ads has no programmatic schedule-delete endpoint, so a confirmed call logs a request (see `note`) but effects no deletion."),
|
|
30
|
+
dispatchedCapability: DispatchedCapabilitySchema.describe("The concrete (operation, entityKind) this call resolved to — `delete_schedule` with `canonicalEntityKind: null` (effect class). Present on every response."),
|
|
23
31
|
})
|
|
24
32
|
.describe("Delete schedule response");
|
|
25
33
|
export async function deleteReportScheduleLogic(input, context, sdkContext) {
|
|
34
|
+
const dispatchedCapability = {
|
|
35
|
+
operation: "delete_schedule",
|
|
36
|
+
canonicalEntityKind: null,
|
|
37
|
+
};
|
|
38
|
+
if (input.dry_run === true) {
|
|
39
|
+
const dryRun = buildEffectDryRun(input);
|
|
40
|
+
return {
|
|
41
|
+
confirmed: true,
|
|
42
|
+
scheduleId: input.scheduleId,
|
|
43
|
+
timestamp: new Date().toISOString(),
|
|
44
|
+
dryRun,
|
|
45
|
+
dispatchedCapability,
|
|
46
|
+
};
|
|
47
|
+
}
|
|
26
48
|
const confirmed = await elicitDeleteConfirmation({
|
|
27
49
|
entityLabel: "report schedule",
|
|
28
50
|
entityId: input.scheduleId,
|
|
@@ -35,6 +57,7 @@ export async function deleteReportScheduleLogic(input, context, sdkContext) {
|
|
|
35
57
|
scheduleId: input.scheduleId,
|
|
36
58
|
note: "Deletion cancelled by user.",
|
|
37
59
|
timestamp: new Date().toISOString(),
|
|
60
|
+
dispatchedCapability,
|
|
38
61
|
};
|
|
39
62
|
}
|
|
40
63
|
const { msadsReportingService } = resolveSessionServices(sdkContext);
|
|
@@ -42,11 +65,42 @@ export async function deleteReportScheduleLogic(input, context, sdkContext) {
|
|
|
42
65
|
return {
|
|
43
66
|
confirmed: true,
|
|
44
67
|
scheduleId: input.scheduleId,
|
|
45
|
-
note: `To delete schedule ${input.scheduleId}: visit app.ads.microsoft.com → Reports → Scheduled Reports and remove the report manually. The Microsoft Advertising REST API does not provide a programmatic delete endpoint.`,
|
|
68
|
+
note: `To delete schedule ${input.scheduleId}: visit app.ads.microsoft.com → Reports → Scheduled Reports and remove the report manually. The Microsoft Advertising REST API does not provide a programmatic delete endpoint — this schedule remains active until that manual step is completed.`,
|
|
46
69
|
timestamp: new Date().toISOString(),
|
|
70
|
+
dispatchedCapability,
|
|
47
71
|
};
|
|
48
72
|
}
|
|
73
|
+
function buildEffectDryRun(input) {
|
|
74
|
+
const validationErrors = [];
|
|
75
|
+
if (input.scheduleId.trim().length === 0) {
|
|
76
|
+
validationErrors.push({
|
|
77
|
+
code: "INVALID_SCHEDULE_ID",
|
|
78
|
+
message: "scheduleId must be a non-empty report-schedule id",
|
|
79
|
+
field: "scheduleId",
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
return assertGovernedEffectDryRun({
|
|
83
|
+
wouldSucceed: validationErrors.length === 0,
|
|
84
|
+
validationErrors,
|
|
85
|
+
validationSource: "symbolic",
|
|
86
|
+
expectedEffectSource: "none",
|
|
87
|
+
}, TOOL_NAME, { requiresValidation: true, requiresSimulation: false });
|
|
88
|
+
}
|
|
49
89
|
export function deleteReportScheduleResponseFormatter(result) {
|
|
90
|
+
if (result.dryRun) {
|
|
91
|
+
const { wouldSucceed, validationErrors, validationSource } = result.dryRun;
|
|
92
|
+
const verdict = wouldSucceed ? "is well-formed" : "would FAIL validation";
|
|
93
|
+
const errs = validationErrors.map((e) => ` - [${e.code}] ${e.message}`).join("\n");
|
|
94
|
+
return [
|
|
95
|
+
{
|
|
96
|
+
type: "text",
|
|
97
|
+
text: `Dry run: delete request for report schedule ${result.scheduleId} ${verdict} (validation: ${validationSource}). ` +
|
|
98
|
+
`Microsoft Ads has no programmatic delete endpoint — completion requires the manual UI step, so nothing would be deleted.` +
|
|
99
|
+
(errs ? `\n${errs}` : "") +
|
|
100
|
+
`\n\nTimestamp: ${result.timestamp}`,
|
|
101
|
+
},
|
|
102
|
+
];
|
|
103
|
+
}
|
|
50
104
|
if (!result.confirmed) {
|
|
51
105
|
return [
|
|
52
106
|
{
|
|
@@ -73,6 +127,23 @@ export const deleteReportScheduleTool = {
|
|
|
73
127
|
openWorldHint: false,
|
|
74
128
|
destructiveHint: true,
|
|
75
129
|
idempotentHint: true,
|
|
130
|
+
cesteral: {
|
|
131
|
+
kind: "write",
|
|
132
|
+
writeClass: "effect",
|
|
133
|
+
executableArgsExclude: ["dry_run"],
|
|
134
|
+
platform: "msads",
|
|
135
|
+
contractPlatformSlug: "msads",
|
|
136
|
+
contractToolSlug: "delete_report_schedule",
|
|
137
|
+
operation: ["delete_schedule"],
|
|
138
|
+
entityKinds: [],
|
|
139
|
+
entityIdArgs: [],
|
|
140
|
+
schemaVersion: 1,
|
|
141
|
+
contractId: "msads.delete_report_schedule.v1",
|
|
142
|
+
supportsDryRun: true,
|
|
143
|
+
supportsBeforeAfterSnapshot: false,
|
|
144
|
+
requiresValidation: true,
|
|
145
|
+
requiresSimulation: false,
|
|
146
|
+
},
|
|
76
147
|
},
|
|
77
148
|
inputExamples: [
|
|
78
149
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-report-schedule.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/delete-report-schedule.tool.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,
|
|
1
|
+
{"version":3,"file":"delete-report-schedule.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/delete-report-schedule.tool.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EACL,wBAAwB,EACxB,0BAA0B,EAC1B,kBAAkB,EAClB,wBAAwB,EACxB,0BAA0B,GAC3B,MAAM,kBAAkB,CAAC;AAW1B,MAAM,SAAS,GAAG,8BAA8B,CAAC;AACjD,MAAM,UAAU,GAAG,sCAAsC,CAAC;AAC1D,MAAM,gBAAgB,GAAG;;;;8KAIqJ,CAAC;AAE/K,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC;KAC7C,MAAM,CAAC;IACN,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,sDAAsD,CAAC;IAC9F,OAAO,EAAE,CAAC;SACP,OAAO,EAAE;SACT,QAAQ,EAAE;SACV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U;IACjB,WAAW,EAAE,gBAAgB;IAC7B,WAAW,EAAE,+BAA+B;IAC5C,YAAY,EAAE,gCAAgC;IAC9C,WAAW,EAAE;QACX,YAAY,EAAE,KAAK;QACnB,aAAa,EAAE,KAAK;QACpB,eAAe,EAAE,IAAI;QACrB,cAAc,EAAE,IAAI;QACpB,QAAQ,EAAE;YACR,IAAI,EAAE,OAAO;YACb,UAAU,EAAE,QAAQ;YACpB,qBAAqB,EAAE,CAAC,SAAS,CAAC;YAClC,QAAQ,EAAE,OAAO;YACjB,oBAAoB,EAAE,OAAO;YAC7B,gBAAgB,EAAE,wBAAwB;YAC1C,SAAS,EAAE,CAAC,iBAAiB,CAAC;YAE9B,WAAW,EAAE,EAAE;YACf,YAAY,EAAE,EAAE;YAChB,aAAa,EAAE,CAAC;YAChB,UAAU,EAAE,iCAAiC;YAC7C,cAAc,EAAE,IAAI;YACpB,2BAA2B,EAAE,KAAK;YAIlC,kBAAkB,EAAE,IAAI;YACxB,kBAAkB,EAAE,KAAK;SACa;KACzC;IACD,aAAa,EAAE;QACb;YACE,KAAK,EAAE,2BAA2B;YAClC,KAAK,EAAE;gBACL,UAAU,EAAE,cAAc;aAC3B;SACF;KACF;IACD,KAAK,EAAE,yBAAyB;IAChC,iBAAiB,EAAE,qCAAqC;CACzD,CAAC"}
|
|
@@ -45,20 +45,20 @@ export declare const DownloadReportOutputSchema: z.ZodObject<{
|
|
|
45
45
|
expiresAt: z.ZodString;
|
|
46
46
|
mimeType: z.ZodString;
|
|
47
47
|
}, "strip", z.ZodTypeAny, {
|
|
48
|
+
expiresAt: string;
|
|
48
49
|
mimeType: string;
|
|
49
50
|
signedUrl: string;
|
|
50
51
|
bucket: string;
|
|
51
52
|
objectName: string;
|
|
52
53
|
bytes: number;
|
|
53
|
-
expiresAt: string;
|
|
54
54
|
rowCount?: number | undefined;
|
|
55
55
|
}, {
|
|
56
|
+
expiresAt: string;
|
|
56
57
|
mimeType: string;
|
|
57
58
|
signedUrl: string;
|
|
58
59
|
bucket: string;
|
|
59
60
|
objectName: string;
|
|
60
61
|
bytes: number;
|
|
61
|
-
expiresAt: string;
|
|
62
62
|
rowCount?: number | undefined;
|
|
63
63
|
}>, z.ZodObject<{
|
|
64
64
|
error: z.ZodString;
|
|
@@ -93,12 +93,12 @@ export declare const DownloadReportOutputSchema: z.ZodObject<{
|
|
|
93
93
|
rawCsvResourceUri?: string | undefined;
|
|
94
94
|
rawCsvByteLength?: number | undefined;
|
|
95
95
|
spill?: {
|
|
96
|
+
expiresAt: string;
|
|
96
97
|
mimeType: string;
|
|
97
98
|
signedUrl: string;
|
|
98
99
|
bucket: string;
|
|
99
100
|
objectName: string;
|
|
100
101
|
bytes: number;
|
|
101
|
-
expiresAt: string;
|
|
102
102
|
rowCount?: number | undefined;
|
|
103
103
|
} | {
|
|
104
104
|
error: string;
|
|
@@ -118,12 +118,12 @@ export declare const DownloadReportOutputSchema: z.ZodObject<{
|
|
|
118
118
|
rawCsvResourceUri?: string | undefined;
|
|
119
119
|
rawCsvByteLength?: number | undefined;
|
|
120
120
|
spill?: {
|
|
121
|
+
expiresAt: string;
|
|
121
122
|
mimeType: string;
|
|
122
123
|
signedUrl: string;
|
|
123
124
|
bucket: string;
|
|
124
125
|
objectName: string;
|
|
125
126
|
bytes: number;
|
|
126
|
-
expiresAt: string;
|
|
127
127
|
rowCount?: number | undefined;
|
|
128
128
|
} | {
|
|
129
129
|
error: string;
|
|
@@ -182,20 +182,20 @@ export declare const downloadReportTool: {
|
|
|
182
182
|
expiresAt: z.ZodString;
|
|
183
183
|
mimeType: z.ZodString;
|
|
184
184
|
}, "strip", z.ZodTypeAny, {
|
|
185
|
+
expiresAt: string;
|
|
185
186
|
mimeType: string;
|
|
186
187
|
signedUrl: string;
|
|
187
188
|
bucket: string;
|
|
188
189
|
objectName: string;
|
|
189
190
|
bytes: number;
|
|
190
|
-
expiresAt: string;
|
|
191
191
|
rowCount?: number | undefined;
|
|
192
192
|
}, {
|
|
193
|
+
expiresAt: string;
|
|
193
194
|
mimeType: string;
|
|
194
195
|
signedUrl: string;
|
|
195
196
|
bucket: string;
|
|
196
197
|
objectName: string;
|
|
197
198
|
bytes: number;
|
|
198
|
-
expiresAt: string;
|
|
199
199
|
rowCount?: number | undefined;
|
|
200
200
|
}>, z.ZodObject<{
|
|
201
201
|
error: z.ZodString;
|
|
@@ -230,12 +230,12 @@ export declare const downloadReportTool: {
|
|
|
230
230
|
rawCsvResourceUri?: string | undefined;
|
|
231
231
|
rawCsvByteLength?: number | undefined;
|
|
232
232
|
spill?: {
|
|
233
|
+
expiresAt: string;
|
|
233
234
|
mimeType: string;
|
|
234
235
|
signedUrl: string;
|
|
235
236
|
bucket: string;
|
|
236
237
|
objectName: string;
|
|
237
238
|
bytes: number;
|
|
238
|
-
expiresAt: string;
|
|
239
239
|
rowCount?: number | undefined;
|
|
240
240
|
} | {
|
|
241
241
|
error: string;
|
|
@@ -255,12 +255,12 @@ export declare const downloadReportTool: {
|
|
|
255
255
|
rawCsvResourceUri?: string | undefined;
|
|
256
256
|
rawCsvByteLength?: number | undefined;
|
|
257
257
|
spill?: {
|
|
258
|
+
expiresAt: string;
|
|
258
259
|
mimeType: string;
|
|
259
260
|
signedUrl: string;
|
|
260
261
|
bucket: string;
|
|
261
262
|
objectName: string;
|
|
262
263
|
bytes: number;
|
|
263
|
-
expiresAt: string;
|
|
264
264
|
rowCount?: number | undefined;
|
|
265
265
|
} | {
|
|
266
266
|
error: string;
|
|
@@ -1,27 +1,39 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import type { RequestContext, McpTextContent, SdkContext } from "@cesteral/shared";
|
|
2
|
+
import type { RequestContext, McpTextContent, SdkContext, EffectResult, DispatchedCapability } from "@cesteral/shared";
|
|
3
3
|
export declare const ImportFromGoogleInputSchema: z.ZodObject<{
|
|
4
4
|
operation: z.ZodEnum<["create", "getStatus", "getResults"]>;
|
|
5
5
|
data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
6
|
+
dry_run: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
6
7
|
}, "strip", z.ZodTypeAny, {
|
|
7
8
|
data: Record<string, unknown>;
|
|
9
|
+
dry_run: boolean;
|
|
8
10
|
operation: "create" | "getStatus" | "getResults";
|
|
9
11
|
}, {
|
|
10
12
|
data: Record<string, unknown>;
|
|
11
13
|
operation: "create" | "getStatus" | "getResults";
|
|
14
|
+
dry_run?: boolean | undefined;
|
|
12
15
|
}>;
|
|
13
16
|
export declare const ImportFromGoogleOutputSchema: z.ZodObject<{
|
|
14
|
-
result: z.ZodRecord<z.ZodString, z.ZodAny
|
|
17
|
+
result: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
15
18
|
operation: z.ZodString;
|
|
16
19
|
timestamp: z.ZodString;
|
|
20
|
+
dryRun: z.ZodOptional<z.ZodType<import("@cesteral/contract-schema").EffectDryRunResult, z.ZodTypeDef, import("@cesteral/contract-schema").EffectDryRunResult>>;
|
|
21
|
+
effect: z.ZodOptional<z.ZodType<EffectResult, z.ZodTypeDef, EffectResult>>;
|
|
22
|
+
dispatchedCapability: z.ZodType<DispatchedCapability, z.ZodTypeDef, DispatchedCapability>;
|
|
17
23
|
}, "strip", z.ZodTypeAny, {
|
|
18
24
|
timestamp: string;
|
|
19
|
-
|
|
25
|
+
dispatchedCapability: DispatchedCapability;
|
|
20
26
|
operation: string;
|
|
27
|
+
result?: Record<string, any> | undefined;
|
|
28
|
+
dryRun?: import("@cesteral/contract-schema").EffectDryRunResult | undefined;
|
|
29
|
+
effect?: EffectResult | undefined;
|
|
21
30
|
}, {
|
|
22
31
|
timestamp: string;
|
|
23
|
-
|
|
32
|
+
dispatchedCapability: DispatchedCapability;
|
|
24
33
|
operation: string;
|
|
34
|
+
result?: Record<string, any> | undefined;
|
|
35
|
+
dryRun?: import("@cesteral/contract-schema").EffectDryRunResult | undefined;
|
|
36
|
+
effect?: EffectResult | undefined;
|
|
25
37
|
}>;
|
|
26
38
|
type ImportFromGoogleInput = z.infer<typeof ImportFromGoogleInputSchema>;
|
|
27
39
|
type ImportFromGoogleOutput = z.infer<typeof ImportFromGoogleOutputSchema>;
|
|
@@ -34,31 +46,60 @@ export declare const importFromGoogleTool: {
|
|
|
34
46
|
inputSchema: z.ZodObject<{
|
|
35
47
|
operation: z.ZodEnum<["create", "getStatus", "getResults"]>;
|
|
36
48
|
data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
49
|
+
dry_run: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
37
50
|
}, "strip", z.ZodTypeAny, {
|
|
38
51
|
data: Record<string, unknown>;
|
|
52
|
+
dry_run: boolean;
|
|
39
53
|
operation: "create" | "getStatus" | "getResults";
|
|
40
54
|
}, {
|
|
41
55
|
data: Record<string, unknown>;
|
|
42
56
|
operation: "create" | "getStatus" | "getResults";
|
|
57
|
+
dry_run?: boolean | undefined;
|
|
43
58
|
}>;
|
|
44
59
|
outputSchema: z.ZodObject<{
|
|
45
|
-
result: z.ZodRecord<z.ZodString, z.ZodAny
|
|
60
|
+
result: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
46
61
|
operation: z.ZodString;
|
|
47
62
|
timestamp: z.ZodString;
|
|
63
|
+
dryRun: z.ZodOptional<z.ZodType<import("@cesteral/contract-schema").EffectDryRunResult, z.ZodTypeDef, import("@cesteral/contract-schema").EffectDryRunResult>>;
|
|
64
|
+
effect: z.ZodOptional<z.ZodType<EffectResult, z.ZodTypeDef, EffectResult>>;
|
|
65
|
+
dispatchedCapability: z.ZodType<DispatchedCapability, z.ZodTypeDef, DispatchedCapability>;
|
|
48
66
|
}, "strip", z.ZodTypeAny, {
|
|
49
67
|
timestamp: string;
|
|
50
|
-
|
|
68
|
+
dispatchedCapability: DispatchedCapability;
|
|
51
69
|
operation: string;
|
|
70
|
+
result?: Record<string, any> | undefined;
|
|
71
|
+
dryRun?: import("@cesteral/contract-schema").EffectDryRunResult | undefined;
|
|
72
|
+
effect?: EffectResult | undefined;
|
|
52
73
|
}, {
|
|
53
74
|
timestamp: string;
|
|
54
|
-
|
|
75
|
+
dispatchedCapability: DispatchedCapability;
|
|
55
76
|
operation: string;
|
|
77
|
+
result?: Record<string, any> | undefined;
|
|
78
|
+
dryRun?: import("@cesteral/contract-schema").EffectDryRunResult | undefined;
|
|
79
|
+
effect?: EffectResult | undefined;
|
|
56
80
|
}>;
|
|
57
81
|
annotations: {
|
|
58
82
|
readOnlyHint: boolean;
|
|
59
83
|
openWorldHint: boolean;
|
|
60
84
|
idempotentHint: boolean;
|
|
61
85
|
destructiveHint: boolean;
|
|
86
|
+
cesteral: {
|
|
87
|
+
kind: "write";
|
|
88
|
+
writeClass: "effect";
|
|
89
|
+
executableArgsExclude: string[];
|
|
90
|
+
platform: string;
|
|
91
|
+
contractPlatformSlug: string;
|
|
92
|
+
contractToolSlug: string;
|
|
93
|
+
operation: "manage"[];
|
|
94
|
+
entityKinds: never[];
|
|
95
|
+
entityIdArgs: never[];
|
|
96
|
+
schemaVersion: number;
|
|
97
|
+
contractId: string;
|
|
98
|
+
supportsDryRun: true;
|
|
99
|
+
supportsBeforeAfterSnapshot: false;
|
|
100
|
+
requiresValidation: true;
|
|
101
|
+
requiresSimulation: true;
|
|
102
|
+
};
|
|
62
103
|
};
|
|
63
104
|
inputExamples: {
|
|
64
105
|
label: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"import-from-google.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/import-from-google.tool.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"import-from-google.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/import-from-google.tool.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB,OAAO,KAAK,EACV,cAAc,EACd,cAAc,EACd,UAAU,EACV,YAAY,EACZ,oBAAoB,EAErB,MAAM,kBAAkB,CAAC;AAa1B,eAAO,MAAM,2BAA2B;;;;;;;;;;;;EAkBO,CAAC;AAEhD,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;EAeH,CAAC;AAEvC,KAAK,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AACzE,KAAK,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAQ3E,wBAAsB,qBAAqB,CACzC,KAAK,EAAE,qBAAqB,EAC5B,OAAO,EAAE,cAAc,EACvB,UAAU,CAAC,EAAE,UAAU,GACtB,OAAO,CAAC,sBAAsB,CAAC,CAyDjC;AAED,wBAAgB,iCAAiC,CAC/C,MAAM,EAAE,sBAAsB,GAC7B,cAAc,EAAE,CAgBlB;AAED,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+ChC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { resolveSessionServices } from "../utils/resolve-session.js";
|
|
3
|
-
import { McpError, JsonRpcErrorCode } from "@cesteral/shared";
|
|
3
|
+
import { McpError, JsonRpcErrorCode, assertGovernedEffectDryRun, EffectResultSchema, EffectDryRunResultSchema, DispatchedCapabilitySchema, } from "@cesteral/shared";
|
|
4
4
|
const TOOL_NAME = "msads_import_from_google";
|
|
5
5
|
const TOOL_TITLE = "Import from Google Ads";
|
|
6
6
|
const TOOL_DESCRIPTION = `Import campaigns from Google Ads into Microsoft Advertising using the ImportJobs API.
|
|
@@ -19,13 +19,21 @@ export const ImportFromGoogleInputSchema = z
|
|
|
19
19
|
data: z
|
|
20
20
|
.record(z.unknown())
|
|
21
21
|
.describe("Operation data — for create: import job config; for getStatus/getResults: { ImportJobId }"),
|
|
22
|
+
dry_run: z
|
|
23
|
+
.boolean()
|
|
24
|
+
.optional()
|
|
25
|
+
.default(false)
|
|
26
|
+
.describe("When true, validates the request and returns an EffectDryRunResult under `dryRun` without calling the Microsoft Ads API. Nothing is imported."),
|
|
22
27
|
})
|
|
23
28
|
.describe("Parameters for Google Ads import");
|
|
24
29
|
export const ImportFromGoogleOutputSchema = z
|
|
25
30
|
.object({
|
|
26
|
-
result: z.record(z.any()),
|
|
31
|
+
result: z.record(z.any()).optional(),
|
|
27
32
|
operation: z.string(),
|
|
28
33
|
timestamp: z.string().datetime(),
|
|
34
|
+
dryRun: EffectDryRunResultSchema.optional().describe("Present only when the request was made with `dry_run: true`. Nothing was imported."),
|
|
35
|
+
effect: EffectResultSchema.optional().describe("Effect-class result identity (effectKind `import_job_managed` + scalar audit summary). Present on a confirmed execute."),
|
|
36
|
+
dispatchedCapability: DispatchedCapabilitySchema.describe("The concrete (operation, entityKind) this call resolved to — `manage` with `canonicalEntityKind: null` (effect class; a Google Ads import is not a canonical entity). Present on every response."),
|
|
29
37
|
})
|
|
30
38
|
.describe("Import operation result");
|
|
31
39
|
const OPERATION_PATHS = {
|
|
@@ -34,19 +42,55 @@ const OPERATION_PATHS = {
|
|
|
34
42
|
getResults: "/ImportResults/QueryByIds",
|
|
35
43
|
};
|
|
36
44
|
export async function importFromGoogleLogic(input, context, sdkContext) {
|
|
45
|
+
const dispatchedCapability = {
|
|
46
|
+
operation: "manage",
|
|
47
|
+
canonicalEntityKind: null,
|
|
48
|
+
};
|
|
49
|
+
if (input.dry_run === true) {
|
|
50
|
+
return {
|
|
51
|
+
operation: input.operation,
|
|
52
|
+
timestamp: new Date().toISOString(),
|
|
53
|
+
dryRun: assertGovernedEffectDryRun({
|
|
54
|
+
wouldSucceed: true,
|
|
55
|
+
validationErrors: [],
|
|
56
|
+
validationSource: "symbolic",
|
|
57
|
+
expectedEffectSource: "symbolic",
|
|
58
|
+
expectedEffect: {
|
|
59
|
+
effectKind: "import_job_managed",
|
|
60
|
+
summary: { operation: input.operation },
|
|
61
|
+
},
|
|
62
|
+
}, TOOL_NAME, { requiresValidation: true, requiresSimulation: true }),
|
|
63
|
+
dispatchedCapability,
|
|
64
|
+
};
|
|
65
|
+
}
|
|
37
66
|
const { msadsService } = resolveSessionServices(sdkContext);
|
|
38
67
|
const path = OPERATION_PATHS[input.operation];
|
|
39
68
|
if (!path) {
|
|
40
69
|
throw new McpError(JsonRpcErrorCode.InvalidParams, `Unknown import operation: ${input.operation}`);
|
|
41
70
|
}
|
|
42
71
|
const result = (await msadsService.executeOperation(path, input.data, context));
|
|
72
|
+
const effect = {
|
|
73
|
+
effectKind: "import_job_managed",
|
|
74
|
+
summary: { operation: input.operation },
|
|
75
|
+
};
|
|
43
76
|
return {
|
|
44
77
|
result,
|
|
45
78
|
operation: input.operation,
|
|
46
79
|
timestamp: new Date().toISOString(),
|
|
80
|
+
effect,
|
|
81
|
+
dispatchedCapability,
|
|
47
82
|
};
|
|
48
83
|
}
|
|
49
84
|
export function importFromGoogleResponseFormatter(result) {
|
|
85
|
+
if (result.dryRun) {
|
|
86
|
+
const { wouldSucceed, validationSource, expectedEffectSource } = result.dryRun;
|
|
87
|
+
return [
|
|
88
|
+
{
|
|
89
|
+
type: "text",
|
|
90
|
+
text: `Dry run: Google Ads import ${result.operation} ${wouldSucceed ? "would succeed" : "would FAIL"} (validation: ${validationSource}, expected-effect: ${expectedEffectSource}). Nothing was imported.\n\nTimestamp: ${result.timestamp}`,
|
|
91
|
+
},
|
|
92
|
+
];
|
|
93
|
+
}
|
|
50
94
|
return [
|
|
51
95
|
{
|
|
52
96
|
type: "text",
|
|
@@ -65,6 +109,23 @@ export const importFromGoogleTool = {
|
|
|
65
109
|
openWorldHint: false,
|
|
66
110
|
idempotentHint: false,
|
|
67
111
|
destructiveHint: false,
|
|
112
|
+
cesteral: {
|
|
113
|
+
kind: "write",
|
|
114
|
+
writeClass: "effect",
|
|
115
|
+
executableArgsExclude: ["dry_run"],
|
|
116
|
+
platform: "msads",
|
|
117
|
+
contractPlatformSlug: "msads",
|
|
118
|
+
contractToolSlug: "import_from_google",
|
|
119
|
+
operation: ["manage"],
|
|
120
|
+
entityKinds: [],
|
|
121
|
+
entityIdArgs: [],
|
|
122
|
+
schemaVersion: 1,
|
|
123
|
+
contractId: "msads.import_from_google.v1",
|
|
124
|
+
supportsDryRun: true,
|
|
125
|
+
supportsBeforeAfterSnapshot: false,
|
|
126
|
+
requiresValidation: true,
|
|
127
|
+
requiresSimulation: true,
|
|
128
|
+
},
|
|
68
129
|
},
|
|
69
130
|
inputExamples: [
|
|
70
131
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"import-from-google.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/import-from-google.tool.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,
|
|
1
|
+
{"version":3,"file":"import-from-google.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/import-from-google.tool.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EACL,QAAQ,EACR,gBAAgB,EAChB,0BAA0B,EAC1B,kBAAkB,EAClB,wBAAwB,EACxB,0BAA0B,GAC3B,MAAM,kBAAkB,CAAC;AAU1B,MAAM,SAAS,GAAG,0BAA0B,CAAC;AAC7C,MAAM,UAAU,GAAG,wBAAwB,CAAC;AAC5C,MAAM,gBAAgB,GAAG;;;;;;;qCAOY,CAAC;AAEtC,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC;KACzC,MAAM,CAAC;IACN,SAAS,EAAE,CAAC;SACT,IAAI,CAAC,CAAC,QAAQ,EAAE,WAAW,EAAE,YAAY,CAAC,CAAC;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,EAAE,IAAI;SACc;KACzC;IACD,aAAa,EAAE;QACb;YACE,KAAK,EAAE,8BAA8B;YACrC,KAAK,EAAE;gBACL,SAAS,EAAE,QAAQ;gBACnB,IAAI,EAAE;oBACJ,UAAU,EAAE;wBACV;4BACE,IAAI,EAAE,iBAAiB;4BACvB,eAAe,EAAE,cAAc;yBAChC;qBACF;iBACF;aACF;SACF;KACF;IACD,KAAK,EAAE,qBAAqB;IAC5B,iBAAiB,EAAE,iCAAiC;CACrD,CAAC"}
|
|
@@ -1,27 +1,39 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import type { RequestContext, McpTextContent, SdkContext } from "@cesteral/shared";
|
|
2
|
+
import type { RequestContext, McpTextContent, SdkContext, EffectResult, DispatchedCapability } from "@cesteral/shared";
|
|
3
3
|
export declare const ManageAdExtensionsInputSchema: z.ZodObject<{
|
|
4
4
|
operation: z.ZodEnum<["setAssociations", "deleteAssociations", "getAssociations"]>;
|
|
5
5
|
data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
6
|
+
dry_run: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
6
7
|
}, "strip", z.ZodTypeAny, {
|
|
7
8
|
data: Record<string, unknown>;
|
|
9
|
+
dry_run: boolean;
|
|
8
10
|
operation: "setAssociations" | "deleteAssociations" | "getAssociations";
|
|
9
11
|
}, {
|
|
10
12
|
data: Record<string, unknown>;
|
|
11
13
|
operation: "setAssociations" | "deleteAssociations" | "getAssociations";
|
|
14
|
+
dry_run?: boolean | undefined;
|
|
12
15
|
}>;
|
|
13
16
|
export declare const ManageAdExtensionsOutputSchema: z.ZodObject<{
|
|
14
|
-
result: z.ZodRecord<z.ZodString, z.ZodAny
|
|
17
|
+
result: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
15
18
|
operation: z.ZodString;
|
|
16
19
|
timestamp: z.ZodString;
|
|
20
|
+
dryRun: z.ZodOptional<z.ZodType<import("@cesteral/contract-schema").EffectDryRunResult, z.ZodTypeDef, import("@cesteral/contract-schema").EffectDryRunResult>>;
|
|
21
|
+
effect: z.ZodOptional<z.ZodType<EffectResult, z.ZodTypeDef, EffectResult>>;
|
|
22
|
+
dispatchedCapability: z.ZodType<DispatchedCapability, z.ZodTypeDef, DispatchedCapability>;
|
|
17
23
|
}, "strip", z.ZodTypeAny, {
|
|
18
24
|
timestamp: string;
|
|
19
|
-
|
|
25
|
+
dispatchedCapability: DispatchedCapability;
|
|
20
26
|
operation: string;
|
|
27
|
+
result?: Record<string, any> | undefined;
|
|
28
|
+
dryRun?: import("@cesteral/contract-schema").EffectDryRunResult | undefined;
|
|
29
|
+
effect?: EffectResult | undefined;
|
|
21
30
|
}, {
|
|
22
31
|
timestamp: string;
|
|
23
|
-
|
|
32
|
+
dispatchedCapability: DispatchedCapability;
|
|
24
33
|
operation: string;
|
|
34
|
+
result?: Record<string, any> | undefined;
|
|
35
|
+
dryRun?: import("@cesteral/contract-schema").EffectDryRunResult | undefined;
|
|
36
|
+
effect?: EffectResult | undefined;
|
|
25
37
|
}>;
|
|
26
38
|
type ManageAdExtensionsInput = z.infer<typeof ManageAdExtensionsInputSchema>;
|
|
27
39
|
type ManageAdExtensionsOutput = z.infer<typeof ManageAdExtensionsOutputSchema>;
|
|
@@ -34,31 +46,60 @@ export declare const manageAdExtensionsTool: {
|
|
|
34
46
|
inputSchema: z.ZodObject<{
|
|
35
47
|
operation: z.ZodEnum<["setAssociations", "deleteAssociations", "getAssociations"]>;
|
|
36
48
|
data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
49
|
+
dry_run: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
37
50
|
}, "strip", z.ZodTypeAny, {
|
|
38
51
|
data: Record<string, unknown>;
|
|
52
|
+
dry_run: boolean;
|
|
39
53
|
operation: "setAssociations" | "deleteAssociations" | "getAssociations";
|
|
40
54
|
}, {
|
|
41
55
|
data: Record<string, unknown>;
|
|
42
56
|
operation: "setAssociations" | "deleteAssociations" | "getAssociations";
|
|
57
|
+
dry_run?: boolean | undefined;
|
|
43
58
|
}>;
|
|
44
59
|
outputSchema: z.ZodObject<{
|
|
45
|
-
result: z.ZodRecord<z.ZodString, z.ZodAny
|
|
60
|
+
result: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
46
61
|
operation: z.ZodString;
|
|
47
62
|
timestamp: z.ZodString;
|
|
63
|
+
dryRun: z.ZodOptional<z.ZodType<import("@cesteral/contract-schema").EffectDryRunResult, z.ZodTypeDef, import("@cesteral/contract-schema").EffectDryRunResult>>;
|
|
64
|
+
effect: z.ZodOptional<z.ZodType<EffectResult, z.ZodTypeDef, EffectResult>>;
|
|
65
|
+
dispatchedCapability: z.ZodType<DispatchedCapability, z.ZodTypeDef, DispatchedCapability>;
|
|
48
66
|
}, "strip", z.ZodTypeAny, {
|
|
49
67
|
timestamp: string;
|
|
50
|
-
|
|
68
|
+
dispatchedCapability: DispatchedCapability;
|
|
51
69
|
operation: string;
|
|
70
|
+
result?: Record<string, any> | undefined;
|
|
71
|
+
dryRun?: import("@cesteral/contract-schema").EffectDryRunResult | undefined;
|
|
72
|
+
effect?: EffectResult | undefined;
|
|
52
73
|
}, {
|
|
53
74
|
timestamp: string;
|
|
54
|
-
|
|
75
|
+
dispatchedCapability: DispatchedCapability;
|
|
55
76
|
operation: string;
|
|
77
|
+
result?: Record<string, any> | undefined;
|
|
78
|
+
dryRun?: import("@cesteral/contract-schema").EffectDryRunResult | undefined;
|
|
79
|
+
effect?: EffectResult | undefined;
|
|
56
80
|
}>;
|
|
57
81
|
annotations: {
|
|
58
82
|
readOnlyHint: boolean;
|
|
59
83
|
openWorldHint: boolean;
|
|
60
84
|
idempotentHint: boolean;
|
|
61
85
|
destructiveHint: boolean;
|
|
86
|
+
cesteral: {
|
|
87
|
+
kind: "write";
|
|
88
|
+
writeClass: "effect";
|
|
89
|
+
executableArgsExclude: string[];
|
|
90
|
+
platform: string;
|
|
91
|
+
contractPlatformSlug: string;
|
|
92
|
+
contractToolSlug: string;
|
|
93
|
+
operation: "manage"[];
|
|
94
|
+
entityKinds: never[];
|
|
95
|
+
entityIdArgs: never[];
|
|
96
|
+
schemaVersion: number;
|
|
97
|
+
contractId: string;
|
|
98
|
+
supportsDryRun: true;
|
|
99
|
+
supportsBeforeAfterSnapshot: false;
|
|
100
|
+
requiresValidation: true;
|
|
101
|
+
requiresSimulation: true;
|
|
102
|
+
};
|
|
62
103
|
};
|
|
63
104
|
inputExamples: {
|
|
64
105
|
label: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manage-ad-extensions.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/manage-ad-extensions.tool.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"manage-ad-extensions.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/manage-ad-extensions.tool.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB,OAAO,KAAK,EACV,cAAc,EACd,cAAc,EACd,UAAU,EACV,YAAY,EACZ,oBAAoB,EAErB,MAAM,kBAAkB,CAAC;AAW1B,eAAO,MAAM,6BAA6B;;;;;;;;;;;;EAcU,CAAC;AAErD,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;EAeE,CAAC;AAE9C,KAAK,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAC7E,KAAK,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AAQ/E,wBAAsB,uBAAuB,CAC3C,KAAK,EAAE,uBAAuB,EAC9B,OAAO,EAAE,cAAc,EACvB,UAAU,CAAC,EAAE,UAAU,GACtB,OAAO,CAAC,wBAAwB,CAAC,CA2DnC;AAED,wBAAgB,mCAAmC,CACjD,MAAM,EAAE,wBAAwB,GAC/B,cAAc,EAAE,CAgBlB;AAED,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4ClC,CAAC"}
|