@sonisoft/now-sdk-ext-mcp 1.0.0 → 2.2.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/README.md +23 -3
- package/dist/index.js +28 -0
- package/dist/index.js.map +1 -1
- package/dist/tools/catalog.d.ts +8 -0
- package/dist/tools/catalog.d.ts.map +1 -0
- package/dist/tools/catalog.js +352 -0
- package/dist/tools/catalog.js.map +1 -0
- package/dist/tools/execute-script.d.ts.map +1 -1
- package/dist/tools/execute-script.js +30 -15
- package/dist/tools/execute-script.js.map +1 -1
- package/dist/tools/flow.d.ts +9 -0
- package/dist/tools/flow.d.ts.map +1 -0
- package/dist/tools/flow.js +436 -0
- package/dist/tools/flow.js.map +1 -0
- package/dist/tools/knowledge.d.ts +11 -0
- package/dist/tools/knowledge.d.ts.map +1 -0
- package/dist/tools/knowledge.js +527 -0
- package/dist/tools/knowledge.js.map +1 -0
- package/dist/tools/scope.js +2 -2
- package/dist/tools/scope.js.map +1 -1
- package/dist/tools/xml-record.d.ts +15 -0
- package/dist/tools/xml-record.d.ts.map +1 -0
- package/dist/tools/xml-record.js +145 -0
- package/dist/tools/xml-record.js.map +1 -0
- package/package.json +12 -6
|
@@ -0,0 +1,436 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { FlowManager } from "@sonisoft/now-sdk-ext-core";
|
|
3
|
+
import { withConnectionRetry } from "../common/connection.js";
|
|
4
|
+
/**
|
|
5
|
+
* Instance parameter description shared across flow tools.
|
|
6
|
+
*/
|
|
7
|
+
const INSTANCE_DESC = "The ServiceNow instance auth alias to use. " +
|
|
8
|
+
'This is the alias configured via `now-sdk auth --add` (e.g., "dev224436", "prod", "test"). ' +
|
|
9
|
+
'The user will typically refer to this by name when saying things like "on my dev224436 instance". ' +
|
|
10
|
+
"If not provided, falls back to the SN_AUTH_ALIAS environment variable.";
|
|
11
|
+
/**
|
|
12
|
+
* Shared Zod schema fragments for execution parameters common to all
|
|
13
|
+
* execute_flow / execute_subflow / execute_action tools.
|
|
14
|
+
*/
|
|
15
|
+
const executionInputSchema = {
|
|
16
|
+
instance: z.string().optional().describe(INSTANCE_DESC),
|
|
17
|
+
scoped_name: z
|
|
18
|
+
.string()
|
|
19
|
+
.describe('Scoped name of the flow/subflow/action to execute (e.g., "global.my_flow", ' +
|
|
20
|
+
'"x_myapp_custom.create_incident_subflow").'),
|
|
21
|
+
inputs: z
|
|
22
|
+
.record(z.unknown())
|
|
23
|
+
.optional()
|
|
24
|
+
.describe("Input name-value pairs to pass to the flow/subflow/action. " +
|
|
25
|
+
"Keys are the input variable names defined in Flow Designer."),
|
|
26
|
+
mode: z
|
|
27
|
+
.enum(["foreground", "background"])
|
|
28
|
+
.optional()
|
|
29
|
+
.describe('Execution mode. "foreground" (default) runs synchronously and returns outputs ' +
|
|
30
|
+
"when complete. " +
|
|
31
|
+
'"background" returns immediately with a context ID — use get_flow_context_status ' +
|
|
32
|
+
"to poll, then get_flow_outputs or get_flow_error to retrieve results. " +
|
|
33
|
+
"Use background for flows with approval/wait steps."),
|
|
34
|
+
timeout: z
|
|
35
|
+
.number()
|
|
36
|
+
.optional()
|
|
37
|
+
.describe("Timeout in milliseconds for the execution. " +
|
|
38
|
+
"Only applies to foreground mode. Default is the ServiceNow server default (~30s)."),
|
|
39
|
+
quick: z
|
|
40
|
+
.boolean()
|
|
41
|
+
.optional()
|
|
42
|
+
.describe("Skip creation of execution detail records for better performance. " +
|
|
43
|
+
"Default false. Use true in CI/CD or when you don't need step-level detail."),
|
|
44
|
+
scope: z
|
|
45
|
+
.string()
|
|
46
|
+
.optional()
|
|
47
|
+
.describe("Scope context for script execution. Can be a scope name " +
|
|
48
|
+
'(e.g., "x_myapp_custom") or sys_id. Use when the flow is in a scoped app.'),
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Format a FlowExecutionResult into human-readable text output.
|
|
52
|
+
*/
|
|
53
|
+
function formatExecutionResult(result) {
|
|
54
|
+
const lines = [];
|
|
55
|
+
lines.push(`=== Flow Execution Result ===`);
|
|
56
|
+
lines.push(`Success: ${result.success}`);
|
|
57
|
+
lines.push(`Type: ${result.flowObjectType}`);
|
|
58
|
+
lines.push(`Name: ${result.flowObjectName}`);
|
|
59
|
+
if (result.contextId) {
|
|
60
|
+
lines.push(`Context ID: ${result.contextId}`);
|
|
61
|
+
}
|
|
62
|
+
if (result.executionDate) {
|
|
63
|
+
lines.push(`Execution Date: ${result.executionDate}`);
|
|
64
|
+
}
|
|
65
|
+
if (result.errorMessage) {
|
|
66
|
+
lines.push(`Error: ${result.errorMessage}`);
|
|
67
|
+
}
|
|
68
|
+
if (result.outputs && Object.keys(result.outputs).length > 0) {
|
|
69
|
+
lines.push("");
|
|
70
|
+
lines.push("Outputs:");
|
|
71
|
+
lines.push(JSON.stringify(result.outputs, null, 2));
|
|
72
|
+
}
|
|
73
|
+
if (result.debugOutput) {
|
|
74
|
+
lines.push("");
|
|
75
|
+
lines.push("Debug Output:");
|
|
76
|
+
lines.push(result.debugOutput);
|
|
77
|
+
}
|
|
78
|
+
return lines.join("\n");
|
|
79
|
+
}
|
|
80
|
+
// ============================================================
|
|
81
|
+
// 1. execute_flow
|
|
82
|
+
// ============================================================
|
|
83
|
+
export function registerExecuteFlowTool(server) {
|
|
84
|
+
server.registerTool("execute_flow", {
|
|
85
|
+
title: "Execute Flow",
|
|
86
|
+
description: "Execute a ServiceNow Flow Designer flow by scoped name. " +
|
|
87
|
+
"Runs the flow using sn_fd.FlowAPI via a background script.\n\n" +
|
|
88
|
+
"In foreground mode (default), the call blocks until the flow completes and " +
|
|
89
|
+
"returns outputs directly. In background mode, it returns immediately with a " +
|
|
90
|
+
"context ID that you can poll with get_flow_context_status.\n\n" +
|
|
91
|
+
"IMPORTANT: Flows with approval or wait steps MUST use background mode — " +
|
|
92
|
+
"foreground mode will fail if the flow enters a waiting state.",
|
|
93
|
+
inputSchema: executionInputSchema,
|
|
94
|
+
}, async ({ instance, scoped_name, inputs, mode, timeout, quick, scope }) => {
|
|
95
|
+
try {
|
|
96
|
+
const result = await withConnectionRetry(instance, async (snInstance) => {
|
|
97
|
+
const mgr = new FlowManager(snInstance, scope);
|
|
98
|
+
return await mgr.executeFlow({
|
|
99
|
+
scopedName: scoped_name,
|
|
100
|
+
inputs,
|
|
101
|
+
mode,
|
|
102
|
+
timeout,
|
|
103
|
+
quick,
|
|
104
|
+
scope,
|
|
105
|
+
});
|
|
106
|
+
});
|
|
107
|
+
return {
|
|
108
|
+
content: [
|
|
109
|
+
{ type: "text", text: formatExecutionResult(result) },
|
|
110
|
+
],
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
catch (error) {
|
|
114
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
115
|
+
return {
|
|
116
|
+
content: [
|
|
117
|
+
{ type: "text", text: `Error executing flow: ${message}` },
|
|
118
|
+
],
|
|
119
|
+
isError: true,
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
// ============================================================
|
|
125
|
+
// 2. execute_subflow
|
|
126
|
+
// ============================================================
|
|
127
|
+
export function registerExecuteSubflowTool(server) {
|
|
128
|
+
server.registerTool("execute_subflow", {
|
|
129
|
+
title: "Execute Subflow",
|
|
130
|
+
description: "Execute a ServiceNow Flow Designer subflow by scoped name. " +
|
|
131
|
+
"Subflows are reusable building blocks in Flow Designer — this is the " +
|
|
132
|
+
"primary tool for testing subflows during development.\n\n" +
|
|
133
|
+
"In foreground mode (default), the call blocks until the subflow completes " +
|
|
134
|
+
"and returns outputs directly. In background mode, it returns a context ID " +
|
|
135
|
+
"for polling with get_flow_context_status.\n\n" +
|
|
136
|
+
"Pass inputs as key-value pairs matching the subflow's input variables.",
|
|
137
|
+
inputSchema: executionInputSchema,
|
|
138
|
+
}, async ({ instance, scoped_name, inputs, mode, timeout, quick, scope }) => {
|
|
139
|
+
try {
|
|
140
|
+
const result = await withConnectionRetry(instance, async (snInstance) => {
|
|
141
|
+
const mgr = new FlowManager(snInstance, scope);
|
|
142
|
+
return await mgr.executeSubflow({
|
|
143
|
+
scopedName: scoped_name,
|
|
144
|
+
inputs,
|
|
145
|
+
mode,
|
|
146
|
+
timeout,
|
|
147
|
+
quick,
|
|
148
|
+
scope,
|
|
149
|
+
});
|
|
150
|
+
});
|
|
151
|
+
return {
|
|
152
|
+
content: [
|
|
153
|
+
{ type: "text", text: formatExecutionResult(result) },
|
|
154
|
+
],
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
catch (error) {
|
|
158
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
159
|
+
return {
|
|
160
|
+
content: [
|
|
161
|
+
{
|
|
162
|
+
type: "text",
|
|
163
|
+
text: `Error executing subflow: ${message}`,
|
|
164
|
+
},
|
|
165
|
+
],
|
|
166
|
+
isError: true,
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
// ============================================================
|
|
172
|
+
// 3. execute_action
|
|
173
|
+
// ============================================================
|
|
174
|
+
export function registerExecuteActionTool(server) {
|
|
175
|
+
server.registerTool("execute_action", {
|
|
176
|
+
title: "Execute Action",
|
|
177
|
+
description: "Execute a ServiceNow Flow Designer action by scoped name. " +
|
|
178
|
+
"Actions are the lowest-level building blocks in Flow Designer " +
|
|
179
|
+
"(e.g., lookup record, create task, send notification).\n\n" +
|
|
180
|
+
"In foreground mode (default), the call blocks until the action completes " +
|
|
181
|
+
"and returns outputs directly. Actions typically complete quickly and " +
|
|
182
|
+
"foreground mode is usually appropriate.",
|
|
183
|
+
inputSchema: executionInputSchema,
|
|
184
|
+
}, async ({ instance, scoped_name, inputs, mode, timeout, quick, scope }) => {
|
|
185
|
+
try {
|
|
186
|
+
const result = await withConnectionRetry(instance, async (snInstance) => {
|
|
187
|
+
const mgr = new FlowManager(snInstance, scope);
|
|
188
|
+
return await mgr.executeAction({
|
|
189
|
+
scopedName: scoped_name,
|
|
190
|
+
inputs,
|
|
191
|
+
mode,
|
|
192
|
+
timeout,
|
|
193
|
+
quick,
|
|
194
|
+
scope,
|
|
195
|
+
});
|
|
196
|
+
});
|
|
197
|
+
return {
|
|
198
|
+
content: [
|
|
199
|
+
{ type: "text", text: formatExecutionResult(result) },
|
|
200
|
+
],
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
catch (error) {
|
|
204
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
205
|
+
return {
|
|
206
|
+
content: [
|
|
207
|
+
{
|
|
208
|
+
type: "text",
|
|
209
|
+
text: `Error executing action: ${message}`,
|
|
210
|
+
},
|
|
211
|
+
],
|
|
212
|
+
isError: true,
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
// ============================================================
|
|
218
|
+
// 4. get_flow_context_status
|
|
219
|
+
// ============================================================
|
|
220
|
+
export function registerGetFlowContextStatusTool(server) {
|
|
221
|
+
server.registerTool("get_flow_context_status", {
|
|
222
|
+
title: "Get Flow Context Status",
|
|
223
|
+
description: "Query the current status of a flow execution by its context ID. " +
|
|
224
|
+
"Use this to poll background flow executions started with execute_flow, " +
|
|
225
|
+
"execute_subflow, or execute_action in background mode.\n\n" +
|
|
226
|
+
"Possible states: QUEUED, IN_PROGRESS, WAITING, COMPLETE, CANCELLED, ERROR.\n\n" +
|
|
227
|
+
"Typical pattern: execute in background -> poll this tool every few seconds -> " +
|
|
228
|
+
"once COMPLETE, call get_flow_outputs. If ERROR, call get_flow_error.",
|
|
229
|
+
inputSchema: {
|
|
230
|
+
instance: z.string().optional().describe(INSTANCE_DESC),
|
|
231
|
+
context_id: z
|
|
232
|
+
.string()
|
|
233
|
+
.describe("The flow context sys_id returned from an execute_flow, " +
|
|
234
|
+
"execute_subflow, or execute_action call (the contextId field)."),
|
|
235
|
+
},
|
|
236
|
+
}, async ({ instance, context_id }) => {
|
|
237
|
+
try {
|
|
238
|
+
const result = await withConnectionRetry(instance, async (snInstance) => {
|
|
239
|
+
const mgr = new FlowManager(snInstance);
|
|
240
|
+
return await mgr.getFlowContextStatus(context_id);
|
|
241
|
+
});
|
|
242
|
+
const lines = [];
|
|
243
|
+
lines.push("=== Flow Context Status ===");
|
|
244
|
+
lines.push(`Context ID: ${result.contextId}`);
|
|
245
|
+
lines.push(`Found: ${result.found}`);
|
|
246
|
+
if (result.found) {
|
|
247
|
+
lines.push(`State: ${result.state}`);
|
|
248
|
+
if (result.name)
|
|
249
|
+
lines.push(`Name: ${result.name}`);
|
|
250
|
+
if (result.started)
|
|
251
|
+
lines.push(`Started: ${result.started}`);
|
|
252
|
+
if (result.ended)
|
|
253
|
+
lines.push(`Ended: ${result.ended}`);
|
|
254
|
+
}
|
|
255
|
+
if (result.errorMessage) {
|
|
256
|
+
lines.push(`Error: ${result.errorMessage}`);
|
|
257
|
+
}
|
|
258
|
+
return {
|
|
259
|
+
content: [{ type: "text", text: lines.join("\n") }],
|
|
260
|
+
};
|
|
261
|
+
}
|
|
262
|
+
catch (error) {
|
|
263
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
264
|
+
return {
|
|
265
|
+
content: [
|
|
266
|
+
{
|
|
267
|
+
type: "text",
|
|
268
|
+
text: `Error getting flow context status: ${message}`,
|
|
269
|
+
},
|
|
270
|
+
],
|
|
271
|
+
isError: true,
|
|
272
|
+
};
|
|
273
|
+
}
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
// ============================================================
|
|
277
|
+
// 5. get_flow_outputs
|
|
278
|
+
// ============================================================
|
|
279
|
+
export function registerGetFlowOutputsTool(server) {
|
|
280
|
+
server.registerTool("get_flow_outputs", {
|
|
281
|
+
title: "Get Flow Outputs",
|
|
282
|
+
description: "Retrieve outputs from a completed flow/subflow/action execution by its " +
|
|
283
|
+
"context ID. Only call this after get_flow_context_status shows COMPLETE.\n\n" +
|
|
284
|
+
"Returns the output name-value pairs defined by the flow/subflow/action.",
|
|
285
|
+
inputSchema: {
|
|
286
|
+
instance: z.string().optional().describe(INSTANCE_DESC),
|
|
287
|
+
context_id: z
|
|
288
|
+
.string()
|
|
289
|
+
.describe("The flow context sys_id from the execution result's contextId field."),
|
|
290
|
+
},
|
|
291
|
+
}, async ({ instance, context_id }) => {
|
|
292
|
+
try {
|
|
293
|
+
const result = await withConnectionRetry(instance, async (snInstance) => {
|
|
294
|
+
const mgr = new FlowManager(snInstance);
|
|
295
|
+
return await mgr.getFlowOutputs(context_id);
|
|
296
|
+
});
|
|
297
|
+
const lines = [];
|
|
298
|
+
lines.push("=== Flow Outputs ===");
|
|
299
|
+
lines.push(`Context ID: ${result.contextId}`);
|
|
300
|
+
lines.push(`Success: ${result.success}`);
|
|
301
|
+
if (result.outputs && Object.keys(result.outputs).length > 0) {
|
|
302
|
+
lines.push("");
|
|
303
|
+
lines.push("Outputs:");
|
|
304
|
+
lines.push(JSON.stringify(result.outputs, null, 2));
|
|
305
|
+
}
|
|
306
|
+
else {
|
|
307
|
+
lines.push("\nNo outputs returned.");
|
|
308
|
+
}
|
|
309
|
+
if (result.errorMessage) {
|
|
310
|
+
lines.push(`\nError: ${result.errorMessage}`);
|
|
311
|
+
}
|
|
312
|
+
return {
|
|
313
|
+
content: [{ type: "text", text: lines.join("\n") }],
|
|
314
|
+
};
|
|
315
|
+
}
|
|
316
|
+
catch (error) {
|
|
317
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
318
|
+
return {
|
|
319
|
+
content: [
|
|
320
|
+
{
|
|
321
|
+
type: "text",
|
|
322
|
+
text: `Error getting flow outputs: ${message}`,
|
|
323
|
+
},
|
|
324
|
+
],
|
|
325
|
+
isError: true,
|
|
326
|
+
};
|
|
327
|
+
}
|
|
328
|
+
});
|
|
329
|
+
}
|
|
330
|
+
// ============================================================
|
|
331
|
+
// 6. get_flow_error
|
|
332
|
+
// ============================================================
|
|
333
|
+
export function registerGetFlowErrorTool(server) {
|
|
334
|
+
server.registerTool("get_flow_error", {
|
|
335
|
+
title: "Get Flow Error",
|
|
336
|
+
description: "Retrieve the error message from a failed flow execution by its context ID. " +
|
|
337
|
+
"Call this after get_flow_context_status shows ERROR to understand why the " +
|
|
338
|
+
"flow failed.\n\n" +
|
|
339
|
+
"Returns the flow's error message which can be used to diagnose and fix " +
|
|
340
|
+
"issues in the flow definition.",
|
|
341
|
+
inputSchema: {
|
|
342
|
+
instance: z.string().optional().describe(INSTANCE_DESC),
|
|
343
|
+
context_id: z
|
|
344
|
+
.string()
|
|
345
|
+
.describe("The flow context sys_id from the execution result's contextId field."),
|
|
346
|
+
},
|
|
347
|
+
}, async ({ instance, context_id }) => {
|
|
348
|
+
try {
|
|
349
|
+
const result = await withConnectionRetry(instance, async (snInstance) => {
|
|
350
|
+
const mgr = new FlowManager(snInstance);
|
|
351
|
+
return await mgr.getFlowError(context_id);
|
|
352
|
+
});
|
|
353
|
+
const lines = [];
|
|
354
|
+
lines.push("=== Flow Error ===");
|
|
355
|
+
lines.push(`Context ID: ${result.contextId}`);
|
|
356
|
+
lines.push(`Success: ${result.success}`);
|
|
357
|
+
if (result.flowErrorMessage) {
|
|
358
|
+
lines.push(`\nFlow Error Message:\n${result.flowErrorMessage}`);
|
|
359
|
+
}
|
|
360
|
+
else {
|
|
361
|
+
lines.push("\nNo error message found for this context.");
|
|
362
|
+
}
|
|
363
|
+
if (result.errorMessage) {
|
|
364
|
+
lines.push(`\nExecution Error: ${result.errorMessage}`);
|
|
365
|
+
}
|
|
366
|
+
return {
|
|
367
|
+
content: [{ type: "text", text: lines.join("\n") }],
|
|
368
|
+
};
|
|
369
|
+
}
|
|
370
|
+
catch (error) {
|
|
371
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
372
|
+
return {
|
|
373
|
+
content: [
|
|
374
|
+
{
|
|
375
|
+
type: "text",
|
|
376
|
+
text: `Error getting flow error: ${message}`,
|
|
377
|
+
},
|
|
378
|
+
],
|
|
379
|
+
isError: true,
|
|
380
|
+
};
|
|
381
|
+
}
|
|
382
|
+
});
|
|
383
|
+
}
|
|
384
|
+
// ============================================================
|
|
385
|
+
// 7. cancel_flow
|
|
386
|
+
// ============================================================
|
|
387
|
+
export function registerCancelFlowTool(server) {
|
|
388
|
+
server.registerTool("cancel_flow", {
|
|
389
|
+
title: "Cancel Flow",
|
|
390
|
+
description: "Cancel a running or paused flow execution by its context ID. " +
|
|
391
|
+
"Use this to stop a background flow that is no longer needed, " +
|
|
392
|
+
"is stuck in a waiting state, or was started by mistake.\n\n" +
|
|
393
|
+
"IMPORTANT: This is a destructive operation — the flow will be " +
|
|
394
|
+
"permanently cancelled and cannot be resumed.",
|
|
395
|
+
inputSchema: {
|
|
396
|
+
instance: z.string().optional().describe(INSTANCE_DESC),
|
|
397
|
+
context_id: z
|
|
398
|
+
.string()
|
|
399
|
+
.describe("The flow context sys_id from the execution result's contextId field."),
|
|
400
|
+
reason: z
|
|
401
|
+
.string()
|
|
402
|
+
.optional()
|
|
403
|
+
.describe('Reason for cancellation. Default: "Cancelled via FlowManager".'),
|
|
404
|
+
},
|
|
405
|
+
}, async ({ instance, context_id, reason }) => {
|
|
406
|
+
try {
|
|
407
|
+
const result = await withConnectionRetry(instance, async (snInstance) => {
|
|
408
|
+
const mgr = new FlowManager(snInstance);
|
|
409
|
+
return await mgr.cancelFlow(context_id, reason);
|
|
410
|
+
});
|
|
411
|
+
const lines = [];
|
|
412
|
+
lines.push("=== Flow Cancellation ===");
|
|
413
|
+
lines.push(`Context ID: ${result.contextId}`);
|
|
414
|
+
lines.push(`Success: ${result.success}`);
|
|
415
|
+
if (result.errorMessage) {
|
|
416
|
+
lines.push(`Error: ${result.errorMessage}`);
|
|
417
|
+
}
|
|
418
|
+
return {
|
|
419
|
+
content: [{ type: "text", text: lines.join("\n") }],
|
|
420
|
+
};
|
|
421
|
+
}
|
|
422
|
+
catch (error) {
|
|
423
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
424
|
+
return {
|
|
425
|
+
content: [
|
|
426
|
+
{
|
|
427
|
+
type: "text",
|
|
428
|
+
text: `Error cancelling flow: ${message}`,
|
|
429
|
+
},
|
|
430
|
+
],
|
|
431
|
+
isError: true,
|
|
432
|
+
};
|
|
433
|
+
}
|
|
434
|
+
});
|
|
435
|
+
}
|
|
436
|
+
//# sourceMappingURL=flow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flow.js","sourceRoot":"","sources":["../../src/tools/flow.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAE9D;;GAEG;AACH,MAAM,aAAa,GACjB,6CAA6C;IAC7C,6FAA6F;IAC7F,oGAAoG;IACpG,wEAAwE,CAAC;AAE3E;;;GAGG;AACH,MAAM,oBAAoB,GAAG;IAC3B,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,aAAa,CAAC;IACvD,WAAW,EAAE,CAAC;SACX,MAAM,EAAE;SACR,QAAQ,CACP,6EAA6E;QAC3E,4CAA4C,CAC/C;IACH,MAAM,EAAE,CAAC;SACN,MAAM,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;SACnB,QAAQ,EAAE;SACV,QAAQ,CACP,6DAA6D;QAC3D,6DAA6D,CAChE;IACH,IAAI,EAAE,CAAC;SACJ,IAAI,CAAC,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC;SAClC,QAAQ,EAAE;SACV,QAAQ,CACP,gFAAgF;QAC9E,iBAAiB;QACjB,mFAAmF;QACnF,wEAAwE;QACxE,oDAAoD,CACvD;IACH,OAAO,EAAE,CAAC;SACP,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CACP,6CAA6C;QAC3C,mFAAmF,CACtF;IACH,KAAK,EAAE,CAAC;SACL,OAAO,EAAE;SACT,QAAQ,EAAE;SACV,QAAQ,CACP,oEAAoE;QAClE,4EAA4E,CAC/E;I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AAC,YAAY,EAAE,CAAC,CAAC;YAC9C,CAAC;YAED,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;aAC7D,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,OAAO,GACX,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YACzD,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAe;wBACrB,IAAI,EAAE,0BAA0B,OAAO,EAAE;qBAC1C;iBACF;gBACD,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
|
+
export declare function registerListKnowledgeBasesTool(server: McpServer): void;
|
|
3
|
+
export declare function registerGetKnowledgeBaseTool(server: McpServer): void;
|
|
4
|
+
export declare function registerListKbCategoriesTool(server: McpServer): void;
|
|
5
|
+
export declare function registerCreateKbCategoryTool(server: McpServer): void;
|
|
6
|
+
export declare function registerListKbArticlesTool(server: McpServer): void;
|
|
7
|
+
export declare function registerGetKbArticleTool(server: McpServer): void;
|
|
8
|
+
export declare function registerCreateKbArticleTool(server: McpServer): void;
|
|
9
|
+
export declare function registerUpdateKbArticleTool(server: McpServer): void;
|
|
10
|
+
export declare function registerPublishKbArticleTool(server: McpServer): void;
|
|
11
|
+
//# sourceMappingURL=knowledge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"knowledge.d.ts","sourceRoot":"","sources":["../../src/tools/knowledge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAkBpE,wBAAgB,8BAA8B,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAsEtE;AAMD,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAyCpE;AAMD,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAiEpE;AAMD,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAsDpE;AAMD,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CA2ElE;AAMD,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CA2ChE;AAMD,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CA6FnE;AAMD,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAoFnE;AAMD,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CA0CpE"}
|