@cesteral/msads-mcp 1.1.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 +110 -0
- package/dist/testkit/fixtures/index.js.map +1 -1
- package/dist/testkit/types.d.ts +2 -1
- package/dist/testkit/types.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { resolveSessionServices } from "../utils/resolve-session.js";
|
|
3
|
+
import { assertGovernedEffectDryRun, EffectResultSchema, EffectDryRunResultSchema, DispatchedCapabilitySchema, } from "@cesteral/shared";
|
|
3
4
|
const TOOL_NAME = "msads_create_report_schedule";
|
|
4
5
|
const TOOL_TITLE = "Create Microsoft Ads Report Schedule";
|
|
5
6
|
const TOOL_DESCRIPTION = `Create a scheduled report request in Microsoft Advertising.
|
|
@@ -18,6 +19,8 @@ Submits a report request with a Schedule object, which Microsoft Advertising wil
|
|
|
18
19
|
\`\`\`
|
|
19
20
|
|
|
20
21
|
Note: Microsoft Advertising's API has limited schedule management. Use the UI at app.ads.microsoft.com to view, edit, or delete existing schedules.`;
|
|
22
|
+
const EFFECT_KIND = "report_schedule_saved";
|
|
23
|
+
const ENTITY_LABEL = "report_schedule";
|
|
21
24
|
export const CreateReportScheduleInputSchema = z
|
|
22
25
|
.object({
|
|
23
26
|
accountId: z.string().describe("Microsoft Ads Account ID"),
|
|
@@ -37,16 +40,39 @@ export const CreateReportScheduleInputSchema = z
|
|
|
37
40
|
Frequency: z.enum(["Daily", "Weekly", "Monthly"]).describe("How often the report runs"),
|
|
38
41
|
})
|
|
39
42
|
.describe("Schedule configuration"),
|
|
43
|
+
dry_run: z
|
|
44
|
+
.boolean()
|
|
45
|
+
.optional()
|
|
46
|
+
.default(false)
|
|
47
|
+
.describe("When true, validates the request and returns an EffectDryRunResult under `dryRun` (expected effect = the would-be schedule creation) without calling the Microsoft Ads API. No schedule is created."),
|
|
40
48
|
})
|
|
41
49
|
.describe("Parameters for creating a scheduled Microsoft Ads report");
|
|
42
50
|
export const CreateReportScheduleOutputSchema = z
|
|
43
51
|
.object({
|
|
44
|
-
scheduleId: z
|
|
45
|
-
|
|
52
|
+
scheduleId: z
|
|
53
|
+
.string()
|
|
54
|
+
.optional()
|
|
55
|
+
.describe("Schedule ID (ReportRequestId of first scheduled run). Absent on a dry_run (nothing was created)."),
|
|
56
|
+
scheduleName: z.string().optional(),
|
|
46
57
|
timestamp: z.string().datetime(),
|
|
58
|
+
dryRun: EffectDryRunResultSchema.optional().describe("Present only when the request was made with `dry_run: true`. No schedule was created."),
|
|
59
|
+
effect: EffectResultSchema.optional().describe("Effect-class result identity (effectKind `report_schedule_saved` + scalar audit summary). Present on a confirmed execute. Effect writes carry no canonical entity snapshot."),
|
|
60
|
+
dispatchedCapability: DispatchedCapabilitySchema.describe("The concrete (operation, entityKind) this call resolved to — `create_schedule` with `canonicalEntityKind: null` (effect class). Present on every response."),
|
|
47
61
|
})
|
|
48
62
|
.describe("Created report schedule");
|
|
49
63
|
export async function createReportScheduleLogic(input, context, sdkContext) {
|
|
64
|
+
const dispatchedCapability = {
|
|
65
|
+
operation: "create_schedule",
|
|
66
|
+
canonicalEntityKind: null,
|
|
67
|
+
};
|
|
68
|
+
if (input.dry_run === true) {
|
|
69
|
+
const dryRun = buildEffectDryRun(input);
|
|
70
|
+
return {
|
|
71
|
+
timestamp: new Date().toISOString(),
|
|
72
|
+
dryRun,
|
|
73
|
+
dispatchedCapability,
|
|
74
|
+
};
|
|
75
|
+
}
|
|
50
76
|
const { msadsReportingService } = resolveSessionServices(sdkContext);
|
|
51
77
|
const result = await msadsReportingService.createReportSchedule({
|
|
52
78
|
reportType: input.reportType,
|
|
@@ -57,13 +83,77 @@ export async function createReportScheduleLogic(input, context, sdkContext) {
|
|
|
57
83
|
scheduleName: input.scheduleName,
|
|
58
84
|
schedule: input.schedule,
|
|
59
85
|
}, context);
|
|
86
|
+
const effect = {
|
|
87
|
+
effectKind: EFFECT_KIND,
|
|
88
|
+
summary: { entity_label: ENTITY_LABEL, schedule_handle: result.scheduleId },
|
|
89
|
+
};
|
|
60
90
|
return {
|
|
61
91
|
scheduleId: result.scheduleId,
|
|
62
92
|
scheduleName: result.scheduleName,
|
|
63
93
|
timestamp: new Date().toISOString(),
|
|
94
|
+
effect,
|
|
95
|
+
dispatchedCapability,
|
|
64
96
|
};
|
|
65
97
|
}
|
|
98
|
+
function buildEffectDryRun(input) {
|
|
99
|
+
const validationErrors = [];
|
|
100
|
+
if (input.scheduleName.trim().length === 0) {
|
|
101
|
+
validationErrors.push({
|
|
102
|
+
code: "INVALID_SCHEDULE_NAME",
|
|
103
|
+
message: "scheduleName must be a non-empty schedule name",
|
|
104
|
+
field: "scheduleName",
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
const dateRe = /^\d{4}-\d{2}-\d{2}$/;
|
|
108
|
+
const startOk = dateRe.test(input.startDate);
|
|
109
|
+
const endOk = dateRe.test(input.endDate);
|
|
110
|
+
if (!startOk) {
|
|
111
|
+
validationErrors.push({
|
|
112
|
+
code: "INVALID_DATE_FORMAT",
|
|
113
|
+
message: `startDate must be YYYY-MM-DD — got "${input.startDate}"`,
|
|
114
|
+
field: "startDate",
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
if (!endOk) {
|
|
118
|
+
validationErrors.push({
|
|
119
|
+
code: "INVALID_DATE_FORMAT",
|
|
120
|
+
message: `endDate must be YYYY-MM-DD — got "${input.endDate}"`,
|
|
121
|
+
field: "endDate",
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
if (startOk && endOk && input.startDate > input.endDate) {
|
|
125
|
+
validationErrors.push({
|
|
126
|
+
code: "INVALID_DATE_RANGE",
|
|
127
|
+
message: `startDate (${input.startDate}) must be on or before endDate (${input.endDate})`,
|
|
128
|
+
field: "startDate",
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
const expectedEffect = {
|
|
132
|
+
effectKind: EFFECT_KIND,
|
|
133
|
+
summary: { entity_label: ENTITY_LABEL },
|
|
134
|
+
};
|
|
135
|
+
return assertGovernedEffectDryRun({
|
|
136
|
+
wouldSucceed: validationErrors.length === 0,
|
|
137
|
+
validationErrors,
|
|
138
|
+
validationSource: "symbolic",
|
|
139
|
+
expectedEffectSource: "symbolic",
|
|
140
|
+
expectedEffect,
|
|
141
|
+
}, TOOL_NAME, { requiresValidation: true, requiresSimulation: true });
|
|
142
|
+
}
|
|
66
143
|
export function createReportScheduleResponseFormatter(result) {
|
|
144
|
+
if (result.dryRun) {
|
|
145
|
+
const { wouldSucceed, validationErrors, validationSource, expectedEffectSource } = result.dryRun;
|
|
146
|
+
const verdict = wouldSucceed ? "would succeed" : "would FAIL";
|
|
147
|
+
const errs = validationErrors.map((e) => ` - [${e.code}] ${e.message}`).join("\n");
|
|
148
|
+
return [
|
|
149
|
+
{
|
|
150
|
+
type: "text",
|
|
151
|
+
text: `Dry run: creating a report schedule ${verdict} (validation: ${validationSource}, expected-effect: ${expectedEffectSource}). No schedule was created.` +
|
|
152
|
+
(errs ? `\n${errs}` : "") +
|
|
153
|
+
`\n\nTimestamp: ${result.timestamp}`,
|
|
154
|
+
},
|
|
155
|
+
];
|
|
156
|
+
}
|
|
67
157
|
return [
|
|
68
158
|
{
|
|
69
159
|
type: "text",
|
|
@@ -82,6 +172,23 @@ export const createReportScheduleTool = {
|
|
|
82
172
|
openWorldHint: false,
|
|
83
173
|
destructiveHint: false,
|
|
84
174
|
idempotentHint: false,
|
|
175
|
+
cesteral: {
|
|
176
|
+
kind: "write",
|
|
177
|
+
writeClass: "effect",
|
|
178
|
+
executableArgsExclude: ["dry_run"],
|
|
179
|
+
platform: "msads",
|
|
180
|
+
contractPlatformSlug: "msads",
|
|
181
|
+
contractToolSlug: "create_report_schedule",
|
|
182
|
+
operation: ["create_schedule"],
|
|
183
|
+
entityKinds: [],
|
|
184
|
+
entityIdArgs: [],
|
|
185
|
+
schemaVersion: 1,
|
|
186
|
+
contractId: "msads.create_report_schedule.v1",
|
|
187
|
+
supportsDryRun: true,
|
|
188
|
+
supportsBeforeAfterSnapshot: false,
|
|
189
|
+
requiresValidation: true,
|
|
190
|
+
requiresSimulation: true,
|
|
191
|
+
},
|
|
85
192
|
},
|
|
86
193
|
inputExamples: [
|
|
87
194
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-report-schedule.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/create-report-schedule.tool.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"create-report-schedule.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/create-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,0BAA0B,EAC1B,kBAAkB,EAClB,wBAAwB,E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;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;YAClC,kBAAkB,EAAE,IAAI;YACxB,kBAAkB,EAAE,IAAI;SACc;KACzC;IACD,aAAa,EAAE;QACb;YACE,KAAK,EAAE,sCAAsC;YAC7C,KAAK,EAAE;gBACL,SAAS,EAAE,WAAW;gBACtB,YAAY,EAAE,wBAAwB;gBACtC,UAAU,EAAE,kCAAkC;gBAC9C,OAAO,EAAE,CAAC,cAAc,EAAE,aAAa,EAAE,QAAQ,EAAE,OAAO,EAAE,aAAa,CAAC;gBAC1E,SAAS,EAAE,YAAY;gBACvB,OAAO,EAAE,YAAY;gBACrB,WAAW,EAAE,OAAO;gBACpB,QAAQ,EAAE;oBACR,SAAS,EAAE,YAAY;oBACvB,OAAO,EAAE,YAAY;oBACrB,SAAS,EAAE,QAAQ;iBACpB;aACF;SACF;KACF;IACD,KAAK,EAAE,yBAAyB;IAChC,iBAAiB,EAAE,qCAAqC;CACzD,CAAC"}
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import type { RequestContext, McpTextContent, SdkContext } from "@cesteral/shared";
|
|
2
|
+
import type { RequestContext, McpTextContent, SdkContext, EffectResult, EffectDryRunResult, DispatchedCapability } from "@cesteral/shared";
|
|
3
3
|
export declare const DeleteEntityInputSchema: z.ZodObject<{
|
|
4
4
|
entityType: z.ZodEnum<[string, ...string[]]>;
|
|
5
5
|
entityIds: z.ZodArray<z.ZodString, "many">;
|
|
6
6
|
additionalParams: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
7
|
+
dry_run: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
7
8
|
}, "strip", z.ZodTypeAny, {
|
|
8
9
|
entityType: string;
|
|
9
10
|
entityIds: string[];
|
|
11
|
+
dry_run: boolean;
|
|
10
12
|
additionalParams?: Record<string, unknown> | undefined;
|
|
11
13
|
}, {
|
|
12
14
|
entityType: string;
|
|
13
15
|
entityIds: string[];
|
|
14
16
|
additionalParams?: Record<string, unknown> | undefined;
|
|
17
|
+
dry_run?: boolean | undefined;
|
|
15
18
|
}>;
|
|
16
19
|
export declare const DeleteEntityOutputSchema: z.ZodObject<{
|
|
17
20
|
confirmed: z.ZodBoolean;
|
|
@@ -19,20 +22,32 @@ export declare const DeleteEntityOutputSchema: z.ZodObject<{
|
|
|
19
22
|
result: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
20
23
|
entityType: z.ZodString;
|
|
21
24
|
deletedCount: z.ZodNumber;
|
|
25
|
+
failedCount: z.ZodNumber;
|
|
22
26
|
timestamp: z.ZodString;
|
|
27
|
+
dryRun: z.ZodOptional<z.ZodType<EffectDryRunResult, z.ZodTypeDef, EffectDryRunResult>>;
|
|
28
|
+
effect: z.ZodOptional<z.ZodType<EffectResult, z.ZodTypeDef, EffectResult>>;
|
|
29
|
+
dispatchedCapability: z.ZodType<DispatchedCapability, z.ZodTypeDef, DispatchedCapability>;
|
|
23
30
|
}, "strip", z.ZodTypeAny, {
|
|
24
31
|
entityType: string;
|
|
25
32
|
timestamp: string;
|
|
26
33
|
result: Record<string, any>;
|
|
34
|
+
dispatchedCapability: DispatchedCapability;
|
|
27
35
|
confirmed: boolean;
|
|
28
36
|
deletedCount: number;
|
|
37
|
+
failedCount: number;
|
|
38
|
+
dryRun?: EffectDryRunResult | undefined;
|
|
39
|
+
effect?: EffectResult | undefined;
|
|
29
40
|
declineReason?: string | undefined;
|
|
30
41
|
}, {
|
|
31
42
|
entityType: string;
|
|
32
43
|
timestamp: string;
|
|
33
44
|
result: Record<string, any>;
|
|
45
|
+
dispatchedCapability: DispatchedCapability;
|
|
34
46
|
confirmed: boolean;
|
|
35
47
|
deletedCount: number;
|
|
48
|
+
failedCount: number;
|
|
49
|
+
dryRun?: EffectDryRunResult | undefined;
|
|
50
|
+
effect?: EffectResult | undefined;
|
|
36
51
|
declineReason?: string | undefined;
|
|
37
52
|
}>;
|
|
38
53
|
type DeleteEntityInput = z.infer<typeof DeleteEntityInputSchema>;
|
|
@@ -47,14 +62,17 @@ export declare const deleteEntityTool: {
|
|
|
47
62
|
entityType: z.ZodEnum<[string, ...string[]]>;
|
|
48
63
|
entityIds: z.ZodArray<z.ZodString, "many">;
|
|
49
64
|
additionalParams: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
65
|
+
dry_run: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
50
66
|
}, "strip", z.ZodTypeAny, {
|
|
51
67
|
entityType: string;
|
|
52
68
|
entityIds: string[];
|
|
69
|
+
dry_run: boolean;
|
|
53
70
|
additionalParams?: Record<string, unknown> | undefined;
|
|
54
71
|
}, {
|
|
55
72
|
entityType: string;
|
|
56
73
|
entityIds: string[];
|
|
57
74
|
additionalParams?: Record<string, unknown> | undefined;
|
|
75
|
+
dry_run?: boolean | undefined;
|
|
58
76
|
}>;
|
|
59
77
|
outputSchema: z.ZodObject<{
|
|
60
78
|
confirmed: z.ZodBoolean;
|
|
@@ -62,20 +80,32 @@ export declare const deleteEntityTool: {
|
|
|
62
80
|
result: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
63
81
|
entityType: z.ZodString;
|
|
64
82
|
deletedCount: z.ZodNumber;
|
|
83
|
+
failedCount: z.ZodNumber;
|
|
65
84
|
timestamp: z.ZodString;
|
|
85
|
+
dryRun: z.ZodOptional<z.ZodType<EffectDryRunResult, z.ZodTypeDef, EffectDryRunResult>>;
|
|
86
|
+
effect: z.ZodOptional<z.ZodType<EffectResult, z.ZodTypeDef, EffectResult>>;
|
|
87
|
+
dispatchedCapability: z.ZodType<DispatchedCapability, z.ZodTypeDef, DispatchedCapability>;
|
|
66
88
|
}, "strip", z.ZodTypeAny, {
|
|
67
89
|
entityType: string;
|
|
68
90
|
timestamp: string;
|
|
69
91
|
result: Record<string, any>;
|
|
92
|
+
dispatchedCapability: DispatchedCapability;
|
|
70
93
|
confirmed: boolean;
|
|
71
94
|
deletedCount: number;
|
|
95
|
+
failedCount: number;
|
|
96
|
+
dryRun?: EffectDryRunResult | undefined;
|
|
97
|
+
effect?: EffectResult | undefined;
|
|
72
98
|
declineReason?: string | undefined;
|
|
73
99
|
}, {
|
|
74
100
|
entityType: string;
|
|
75
101
|
timestamp: string;
|
|
76
102
|
result: Record<string, any>;
|
|
103
|
+
dispatchedCapability: DispatchedCapability;
|
|
77
104
|
confirmed: boolean;
|
|
78
105
|
deletedCount: number;
|
|
106
|
+
failedCount: number;
|
|
107
|
+
dryRun?: EffectDryRunResult | undefined;
|
|
108
|
+
effect?: EffectResult | undefined;
|
|
79
109
|
declineReason?: string | undefined;
|
|
80
110
|
}>;
|
|
81
111
|
annotations: {
|
|
@@ -83,6 +113,23 @@ export declare const deleteEntityTool: {
|
|
|
83
113
|
openWorldHint: boolean;
|
|
84
114
|
idempotentHint: boolean;
|
|
85
115
|
destructiveHint: boolean;
|
|
116
|
+
cesteral: {
|
|
117
|
+
kind: "write";
|
|
118
|
+
writeClass: "effect";
|
|
119
|
+
executableArgsExclude: string[];
|
|
120
|
+
platform: string;
|
|
121
|
+
contractPlatformSlug: string;
|
|
122
|
+
contractToolSlug: string;
|
|
123
|
+
operation: "bulk_job"[];
|
|
124
|
+
entityKinds: never[];
|
|
125
|
+
entityIdArgs: never[];
|
|
126
|
+
schemaVersion: number;
|
|
127
|
+
contractId: string;
|
|
128
|
+
supportsDryRun: true;
|
|
129
|
+
supportsBeforeAfterSnapshot: false;
|
|
130
|
+
requiresValidation: true;
|
|
131
|
+
requiresSimulation: true;
|
|
132
|
+
};
|
|
86
133
|
};
|
|
87
134
|
inputExamples: {
|
|
88
135
|
label: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-entity.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/delete-entity.tool.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"delete-entity.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/delete-entity.tool.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB,OAAO,KAAK,EACV,cAAc,EACd,cAAc,EACd,UAAU,EACV,YAAY,EACZ,kBAAkB,EAClB,oBAAoB,EAGrB,MAAM,kBAAkB,CAAC;AAU1B,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;EAgByB,CAAC;AAE9D,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqBA,CAAC;AAEtC,KAAK,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACjE,KAAK,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAEnE,wBAAsB,iBAAiB,CACrC,KAAK,EAAE,iBAAiB,EACxB,OAAO,EAAE,cAAc,EACvB,UAAU,CAAC,EAAE,UAAU,GACtB,OAAO,CAAC,kBAAkB,CAAC,CA8E7B;AAyDD,wBAAgB,6BAA6B,CAAC,MAAM,EAAE,kBAAkB,GAAG,cAAc,EAAE,CAmC1F;AAED,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuC5B,CAAC"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { resolveSessionServices } from "../utils/resolve-session.js";
|
|
3
3
|
import { getEntityTypeEnum } from "../utils/entity-mapping.js";
|
|
4
|
-
import { elicitBulkDeleteConfirmation } from "@cesteral/shared";
|
|
4
|
+
import { elicitBulkDeleteConfirmation, assertGovernedEffectDryRun, EffectResultSchema, EffectDryRunResultSchema, DispatchedCapabilitySchema, } from "@cesteral/shared";
|
|
5
5
|
const TOOL_NAME = "msads_delete_entity";
|
|
6
6
|
const TOOL_TITLE = "Delete Microsoft Ads Entity";
|
|
7
7
|
const TOOL_DESCRIPTION = `Delete one or more Microsoft Advertising entities by their IDs.
|
|
8
8
|
|
|
9
9
|
This is a destructive operation — entities will be permanently deleted.`;
|
|
10
|
+
const EFFECT_KIND = "entities_deleted";
|
|
10
11
|
export const DeleteEntityInputSchema = z
|
|
11
12
|
.object({
|
|
12
13
|
entityType: z.enum(getEntityTypeEnum()).describe("Type of entity to delete"),
|
|
@@ -15,6 +16,11 @@ export const DeleteEntityInputSchema = z
|
|
|
15
16
|
.record(z.unknown())
|
|
16
17
|
.optional()
|
|
17
18
|
.describe("Additional parameters (e.g., AccountId)"),
|
|
19
|
+
dry_run: z
|
|
20
|
+
.boolean()
|
|
21
|
+
.optional()
|
|
22
|
+
.default(false)
|
|
23
|
+
.describe("When true, symbolically validates the batch and returns an EffectDryRunResult under `dryRun` (expected effect = the would-be bulk delete) without prompting for confirmation or calling the Microsoft Ads API. No entities are deleted."),
|
|
18
24
|
})
|
|
19
25
|
.describe("Parameters for deleting Microsoft Ads entities");
|
|
20
26
|
export const DeleteEntityOutputSchema = z
|
|
@@ -23,11 +29,34 @@ export const DeleteEntityOutputSchema = z
|
|
|
23
29
|
declineReason: z.string().optional(),
|
|
24
30
|
result: z.record(z.any()),
|
|
25
31
|
entityType: z.string(),
|
|
26
|
-
deletedCount: z
|
|
32
|
+
deletedCount: z
|
|
33
|
+
.number()
|
|
34
|
+
.describe("Number of ids Microsoft Ads accepted (requested − PartialErrors)"),
|
|
35
|
+
failedCount: z.number().describe("Number of ids Microsoft Ads rejected via PartialErrors"),
|
|
27
36
|
timestamp: z.string().datetime(),
|
|
37
|
+
dryRun: EffectDryRunResultSchema.optional().describe("Present only when the request was made with `dry_run: true`. No entities were deleted."),
|
|
38
|
+
effect: EffectResultSchema.optional().describe("Effect-class result identity (effectKind `entities_deleted` + scalar batch audit summary with requested/succeeded/failed counts derived from the Microsoft Ads PartialErrors). Present on a confirmed execute. A bulk delete is governed as a single batch effect — it carries no per-entity canonical snapshot."),
|
|
39
|
+
dispatchedCapability: DispatchedCapabilitySchema.describe("The concrete (operation, entityKind) this call resolved to — `bulk_job` with `canonicalEntityKind: null` (effect class). Present on every response."),
|
|
28
40
|
})
|
|
29
41
|
.describe("Entity deletion result");
|
|
30
42
|
export async function deleteEntityLogic(input, context, sdkContext) {
|
|
43
|
+
const dispatchedCapability = {
|
|
44
|
+
operation: "bulk_job",
|
|
45
|
+
canonicalEntityKind: null,
|
|
46
|
+
};
|
|
47
|
+
if (input.dry_run === true) {
|
|
48
|
+
const dryRun = buildBulkEffectDryRun(input);
|
|
49
|
+
return {
|
|
50
|
+
confirmed: true,
|
|
51
|
+
result: {},
|
|
52
|
+
entityType: input.entityType,
|
|
53
|
+
deletedCount: 0,
|
|
54
|
+
failedCount: 0,
|
|
55
|
+
timestamp: new Date().toISOString(),
|
|
56
|
+
dryRun,
|
|
57
|
+
dispatchedCapability,
|
|
58
|
+
};
|
|
59
|
+
}
|
|
31
60
|
const confirmed = await elicitBulkDeleteConfirmation({
|
|
32
61
|
count: input.entityIds.length,
|
|
33
62
|
entityLabel: input.entityType,
|
|
@@ -41,20 +70,91 @@ export async function deleteEntityLogic(input, context, sdkContext) {
|
|
|
41
70
|
result: {},
|
|
42
71
|
entityType: input.entityType,
|
|
43
72
|
deletedCount: 0,
|
|
73
|
+
failedCount: 0,
|
|
44
74
|
timestamp: new Date().toISOString(),
|
|
75
|
+
dispatchedCapability,
|
|
45
76
|
};
|
|
46
77
|
}
|
|
47
78
|
const { msadsService } = resolveSessionServices(sdkContext);
|
|
48
79
|
const result = (await msadsService.deleteEntity(input.entityType, input.entityIds, input.additionalParams, context));
|
|
80
|
+
const requested = input.entityIds.length;
|
|
81
|
+
const failedCount = countMsAdsPartialFailures(result, requested);
|
|
82
|
+
const succeeded = requested - failedCount;
|
|
83
|
+
const effect = {
|
|
84
|
+
effectKind: EFFECT_KIND,
|
|
85
|
+
summary: {
|
|
86
|
+
entity_kind: input.entityType,
|
|
87
|
+
requested,
|
|
88
|
+
succeeded,
|
|
89
|
+
failed: failedCount,
|
|
90
|
+
partial_success: succeeded > 0 && failedCount > 0,
|
|
91
|
+
},
|
|
92
|
+
};
|
|
49
93
|
return {
|
|
50
94
|
confirmed: true,
|
|
51
95
|
result,
|
|
52
96
|
entityType: input.entityType,
|
|
53
|
-
deletedCount:
|
|
97
|
+
deletedCount: succeeded,
|
|
98
|
+
failedCount,
|
|
54
99
|
timestamp: new Date().toISOString(),
|
|
100
|
+
effect,
|
|
101
|
+
dispatchedCapability,
|
|
55
102
|
};
|
|
56
103
|
}
|
|
104
|
+
function countMsAdsPartialFailures(result, requested) {
|
|
105
|
+
if (!result || typeof result !== "object")
|
|
106
|
+
return 0;
|
|
107
|
+
const partialErrors = result.PartialErrors;
|
|
108
|
+
if (!Array.isArray(partialErrors))
|
|
109
|
+
return 0;
|
|
110
|
+
const failedIndices = new Set();
|
|
111
|
+
for (const entry of partialErrors) {
|
|
112
|
+
const index = entry?.Index;
|
|
113
|
+
if (typeof index === "number" && Number.isInteger(index) && index >= 0 && index < requested) {
|
|
114
|
+
failedIndices.add(index);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
return failedIndices.size;
|
|
118
|
+
}
|
|
119
|
+
function buildBulkEffectDryRun(input) {
|
|
120
|
+
const validationErrors = [];
|
|
121
|
+
input.entityIds.forEach((entityId, i) => {
|
|
122
|
+
if (!entityId || entityId.trim().length === 0) {
|
|
123
|
+
validationErrors.push({
|
|
124
|
+
code: "INVALID_ENTITY_ID",
|
|
125
|
+
message: `entityIds[${i}] must be a non-empty entity ID`,
|
|
126
|
+
field: `entityIds.${i}`,
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
const expectedEffect = {
|
|
131
|
+
effectKind: EFFECT_KIND,
|
|
132
|
+
summary: { entity_kind: input.entityType, requested: input.entityIds.length },
|
|
133
|
+
};
|
|
134
|
+
return assertGovernedEffectDryRun({
|
|
135
|
+
wouldSucceed: validationErrors.length === 0,
|
|
136
|
+
validationErrors,
|
|
137
|
+
validationSource: "symbolic",
|
|
138
|
+
expectedEffectSource: "symbolic",
|
|
139
|
+
expectedEffect,
|
|
140
|
+
}, TOOL_NAME, { requiresValidation: true, requiresSimulation: true });
|
|
141
|
+
}
|
|
57
142
|
export function deleteEntityResponseFormatter(result) {
|
|
143
|
+
if (result.dryRun) {
|
|
144
|
+
const { wouldSucceed, validationErrors, validationSource, expectedEffectSource } = result.dryRun;
|
|
145
|
+
const verdict = wouldSucceed ? "would succeed" : "would FAIL";
|
|
146
|
+
const errs = validationErrors.map((e) => ` - [${e.code}] ${e.message}`).join("\n");
|
|
147
|
+
const n = result.dryRun.expectedEffect?.summary.requested ?? 0;
|
|
148
|
+
const kind = result.dryRun.expectedEffect?.summary.entity_kind ?? "entity";
|
|
149
|
+
return [
|
|
150
|
+
{
|
|
151
|
+
type: "text",
|
|
152
|
+
text: `Dry run: bulk-deleting ${String(n)} ${String(kind)}(s) ${verdict} (validation: ${validationSource}, expected-effect: ${expectedEffectSource}). No entities were deleted.` +
|
|
153
|
+
(errs ? `\n${errs}` : "") +
|
|
154
|
+
`\n\nTimestamp: ${result.timestamp}`,
|
|
155
|
+
},
|
|
156
|
+
];
|
|
157
|
+
}
|
|
58
158
|
if (!result.confirmed) {
|
|
59
159
|
return [
|
|
60
160
|
{
|
|
@@ -63,10 +163,12 @@ export function deleteEntityResponseFormatter(result) {
|
|
|
63
163
|
},
|
|
64
164
|
];
|
|
65
165
|
}
|
|
166
|
+
const total = result.deletedCount + result.failedCount;
|
|
167
|
+
const failedNote = result.failedCount > 0 ? ` (${result.failedCount} rejected via PartialErrors)` : "";
|
|
66
168
|
return [
|
|
67
169
|
{
|
|
68
170
|
type: "text",
|
|
69
|
-
text: `Deleted ${result.deletedCount} ${result.entityType} entities\n\nResult:\n${JSON.stringify(result.result, null, 2)}\n\nTimestamp: ${result.timestamp}`,
|
|
171
|
+
text: `Deleted ${result.deletedCount}/${total} ${result.entityType} entities${failedNote}\n\nResult:\n${JSON.stringify(result.result, null, 2)}\n\nTimestamp: ${result.timestamp}`,
|
|
70
172
|
},
|
|
71
173
|
];
|
|
72
174
|
}
|
|
@@ -81,6 +183,23 @@ export const deleteEntityTool = {
|
|
|
81
183
|
openWorldHint: false,
|
|
82
184
|
idempotentHint: false,
|
|
83
185
|
destructiveHint: true,
|
|
186
|
+
cesteral: {
|
|
187
|
+
kind: "write",
|
|
188
|
+
writeClass: "effect",
|
|
189
|
+
executableArgsExclude: ["dry_run"],
|
|
190
|
+
platform: "msads",
|
|
191
|
+
contractPlatformSlug: "msads",
|
|
192
|
+
contractToolSlug: "delete_entity",
|
|
193
|
+
operation: ["bulk_job"],
|
|
194
|
+
entityKinds: [],
|
|
195
|
+
entityIdArgs: [],
|
|
196
|
+
schemaVersion: 1,
|
|
197
|
+
contractId: "msads.delete_entity.v1",
|
|
198
|
+
supportsDryRun: true,
|
|
199
|
+
supportsBeforeAfterSnapshot: false,
|
|
200
|
+
requiresValidation: true,
|
|
201
|
+
requiresSimulation: true,
|
|
202
|
+
},
|
|
84
203
|
},
|
|
85
204
|
inputExamples: [
|
|
86
205
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-entity.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/delete-entity.tool.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAwB,MAAM,4BAA4B,CAAC;AACrF,OAAO,
|
|
1
|
+
{"version":3,"file":"delete-entity.t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CAAC,UAAU,CAAC;YAGvB,WAAW,EAAE,EAAE;YACf,YAAY,EAAE,EAAE;YAChB,aAAa,EAAE,CAAC;YAChB,UAAU,EAAE,wBAAwB;YACpC,cAAc,EAAE,IAAI;YACpB,2BAA2B,EAAE,KAAK;YAClC,kBAAkB,EAAE,IAAI;YACxB,kBAAkB,EAAE,IAAI;SACc;KACzC;IACD,aAAa,EAAE;QACb;YACE,KAAK,EAAE,kBAAkB;YACzB,KAAK,EAAE,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC,EAAE;SACnE;KACF;IACD,KAAK,EAAE,iBAAiB;IACxB,iBAAiB,EAAE,6BAA6B;CACjD,CAAC"}
|
|
@@ -1,29 +1,41 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import type { RequestContext, McpTextContent, SdkContext } from "@cesteral/shared";
|
|
2
|
+
import type { RequestContext, McpTextContent, SdkContext, EffectDryRunResult, DispatchedCapability } from "@cesteral/shared";
|
|
3
3
|
export declare const DeleteReportScheduleInputSchema: z.ZodObject<{
|
|
4
4
|
scheduleId: z.ZodString;
|
|
5
|
+
dry_run: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
5
6
|
}, "strip", z.ZodTypeAny, {
|
|
6
7
|
scheduleId: string;
|
|
8
|
+
dry_run: boolean;
|
|
7
9
|
}, {
|
|
8
10
|
scheduleId: string;
|
|
11
|
+
dry_run?: boolean | undefined;
|
|
9
12
|
}>;
|
|
10
13
|
export declare const DeleteReportScheduleOutputSchema: z.ZodObject<{
|
|
11
14
|
confirmed: z.ZodBoolean;
|
|
12
15
|
declineReason: z.ZodOptional<z.ZodString>;
|
|
13
16
|
scheduleId: z.ZodString;
|
|
14
|
-
note: z.ZodString
|
|
17
|
+
note: z.ZodOptional<z.ZodString>;
|
|
15
18
|
timestamp: z.ZodString;
|
|
19
|
+
dryRun: z.ZodOptional<z.ZodType<EffectDryRunResult, z.ZodTypeDef, EffectDryRunResult>>;
|
|
20
|
+
effect: z.ZodOptional<z.ZodType<import("@cesteral/contract-schema").EffectResult, z.ZodTypeDef, import("@cesteral/contract-schema").EffectResult>>;
|
|
21
|
+
dispatchedCapability: z.ZodType<DispatchedCapability, z.ZodTypeDef, DispatchedCapability>;
|
|
16
22
|
}, "strip", z.ZodTypeAny, {
|
|
17
23
|
scheduleId: string;
|
|
18
|
-
note: string;
|
|
19
24
|
timestamp: string;
|
|
25
|
+
dispatchedCapability: DispatchedCapability;
|
|
20
26
|
confirmed: boolean;
|
|
27
|
+
note?: string | undefined;
|
|
28
|
+
dryRun?: EffectDryRunResult | undefined;
|
|
29
|
+
effect?: import("@cesteral/contract-schema").EffectResult | undefined;
|
|
21
30
|
declineReason?: string | undefined;
|
|
22
31
|
}, {
|
|
23
32
|
scheduleId: string;
|
|
24
|
-
note: string;
|
|
25
33
|
timestamp: string;
|
|
34
|
+
dispatchedCapability: DispatchedCapability;
|
|
26
35
|
confirmed: boolean;
|
|
36
|
+
note?: string | undefined;
|
|
37
|
+
dryRun?: EffectDryRunResult | undefined;
|
|
38
|
+
effect?: import("@cesteral/contract-schema").EffectResult | undefined;
|
|
27
39
|
declineReason?: string | undefined;
|
|
28
40
|
}>;
|
|
29
41
|
type DeleteReportScheduleInput = z.infer<typeof DeleteReportScheduleInputSchema>;
|
|
@@ -36,28 +48,40 @@ export declare const deleteReportScheduleTool: {
|
|
|
36
48
|
description: string;
|
|
37
49
|
inputSchema: z.ZodObject<{
|
|
38
50
|
scheduleId: z.ZodString;
|
|
51
|
+
dry_run: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
39
52
|
}, "strip", z.ZodTypeAny, {
|
|
40
53
|
scheduleId: string;
|
|
54
|
+
dry_run: boolean;
|
|
41
55
|
}, {
|
|
42
56
|
scheduleId: string;
|
|
57
|
+
dry_run?: boolean | undefined;
|
|
43
58
|
}>;
|
|
44
59
|
outputSchema: z.ZodObject<{
|
|
45
60
|
confirmed: z.ZodBoolean;
|
|
46
61
|
declineReason: z.ZodOptional<z.ZodString>;
|
|
47
62
|
scheduleId: z.ZodString;
|
|
48
|
-
note: z.ZodString
|
|
63
|
+
note: z.ZodOptional<z.ZodString>;
|
|
49
64
|
timestamp: z.ZodString;
|
|
65
|
+
dryRun: z.ZodOptional<z.ZodType<EffectDryRunResult, z.ZodTypeDef, EffectDryRunResult>>;
|
|
66
|
+
effect: z.ZodOptional<z.ZodType<import("@cesteral/contract-schema").EffectResult, z.ZodTypeDef, import("@cesteral/contract-schema").EffectResult>>;
|
|
67
|
+
dispatchedCapability: z.ZodType<DispatchedCapability, z.ZodTypeDef, DispatchedCapability>;
|
|
50
68
|
}, "strip", z.ZodTypeAny, {
|
|
51
69
|
scheduleId: string;
|
|
52
|
-
note: string;
|
|
53
70
|
timestamp: string;
|
|
71
|
+
dispatchedCapability: DispatchedCapability;
|
|
54
72
|
confirmed: boolean;
|
|
73
|
+
note?: string | undefined;
|
|
74
|
+
dryRun?: EffectDryRunResult | undefined;
|
|
75
|
+
effect?: import("@cesteral/contract-schema").EffectResult | undefined;
|
|
55
76
|
declineReason?: string | undefined;
|
|
56
77
|
}, {
|
|
57
78
|
scheduleId: string;
|
|
58
|
-
note: string;
|
|
59
79
|
timestamp: string;
|
|
80
|
+
dispatchedCapability: DispatchedCapability;
|
|
60
81
|
confirmed: boolean;
|
|
82
|
+
note?: string | undefined;
|
|
83
|
+
dryRun?: EffectDryRunResult | undefined;
|
|
84
|
+
effect?: import("@cesteral/contract-schema").EffectResult | undefined;
|
|
61
85
|
declineReason?: string | undefined;
|
|
62
86
|
}>;
|
|
63
87
|
annotations: {
|
|
@@ -65,6 +89,23 @@ export declare const deleteReportScheduleTool: {
|
|
|
65
89
|
openWorldHint: boolean;
|
|
66
90
|
destructiveHint: boolean;
|
|
67
91
|
idempotentHint: boolean;
|
|
92
|
+
cesteral: {
|
|
93
|
+
kind: "write";
|
|
94
|
+
writeClass: "effect";
|
|
95
|
+
executableArgsExclude: string[];
|
|
96
|
+
platform: string;
|
|
97
|
+
contractPlatformSlug: string;
|
|
98
|
+
contractToolSlug: string;
|
|
99
|
+
operation: "delete_schedule"[];
|
|
100
|
+
entityKinds: never[];
|
|
101
|
+
entityIdArgs: never[];
|
|
102
|
+
schemaVersion: number;
|
|
103
|
+
contractId: string;
|
|
104
|
+
supportsDryRun: true;
|
|
105
|
+
supportsBeforeAfterSnapshot: false;
|
|
106
|
+
requiresValidation: true;
|
|
107
|
+
requiresSimulation: false;
|
|
108
|
+
};
|
|
68
109
|
};
|
|
69
110
|
inputExamples: {
|
|
70
111
|
label: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-report-schedule.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/delete-report-schedule.tool.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"delete-report-schedule.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/delete-report-schedule.tool.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,OAAO,KAAK,EACV,cAAc,EACd,cAAc,EACd,UAAU,EACV,kBAAkB,EAClB,oBAAoB,EAGrB,MAAM,kBAAkB,CAAC;AAU1B,eAAO,MAAM,+BAA+B;;;;;;;;;EAW0B,CAAC;AAEvE,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiBN,CAAC;AAExC,KAAK,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AACjF,KAAK,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAEnF,wBAAsB,yBAAyB,CAC7C,KAAK,EAAE,yBAAyB,EAChC,OAAO,EAAE,cAAc,EACvB,UAAU,CAAC,EAAE,UAAU,GACtB,OAAO,CAAC,0BAA0B,CAAC,CAqDrC;AA+BD,wBAAgB,qCAAqC,CACnD,MAAM,EAAE,0BAA0B,GACjC,cAAc,EAAE,CA8BlB;AAED,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2CpC,CAAC"}
|