@onlyflows/servicenow-mcp 1.0.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/LICENSE +21 -0
- package/README.md +267 -0
- package/dist/client.d.ts +40 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +145 -0
- package/dist/client.js.map +1 -0
- package/dist/config.d.ts +18 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +46 -0
- package/dist/config.js.map +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +52 -0
- package/dist/index.js.map +1 -0
- package/dist/tools/aggregate.d.ts +67 -0
- package/dist/tools/aggregate.d.ts.map +1 -0
- package/dist/tools/aggregate.js +77 -0
- package/dist/tools/aggregate.js.map +1 -0
- package/dist/tools/atf.d.ts +95 -0
- package/dist/tools/atf.d.ts.map +1 -0
- package/dist/tools/atf.js +357 -0
- package/dist/tools/atf.js.map +1 -0
- package/dist/tools/attach.d.ts +74 -0
- package/dist/tools/attach.d.ts.map +1 -0
- package/dist/tools/attach.js +156 -0
- package/dist/tools/attach.js.map +1 -0
- package/dist/tools/batch.d.ts +68 -0
- package/dist/tools/batch.d.ts.map +1 -0
- package/dist/tools/batch.js +120 -0
- package/dist/tools/batch.js.map +1 -0
- package/dist/tools/codesearch.d.ts +52 -0
- package/dist/tools/codesearch.d.ts.map +1 -0
- package/dist/tools/codesearch.js +87 -0
- package/dist/tools/codesearch.js.map +1 -0
- package/dist/tools/create.d.ts +39 -0
- package/dist/tools/create.d.ts.map +1 -0
- package/dist/tools/create.js +44 -0
- package/dist/tools/create.js.map +1 -0
- package/dist/tools/delete.d.ts +45 -0
- package/dist/tools/delete.d.ts.map +1 -0
- package/dist/tools/delete.js +53 -0
- package/dist/tools/delete.js.map +1 -0
- package/dist/tools/discover.d.ts +53 -0
- package/dist/tools/discover.d.ts.map +1 -0
- package/dist/tools/discover.js +137 -0
- package/dist/tools/discover.js.map +1 -0
- package/dist/tools/get.d.ts +52 -0
- package/dist/tools/get.d.ts.map +1 -0
- package/dist/tools/get.js +52 -0
- package/dist/tools/get.js.map +1 -0
- package/dist/tools/health.d.ts +32 -0
- package/dist/tools/health.d.ts.map +1 -0
- package/dist/tools/health.js +172 -0
- package/dist/tools/health.js.map +1 -0
- package/dist/tools/index.d.ts +43 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +110 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/nl.d.ts +52 -0
- package/dist/tools/nl.d.ts.map +1 -0
- package/dist/tools/nl.js +433 -0
- package/dist/tools/nl.js.map +1 -0
- package/dist/tools/query.d.ts +73 -0
- package/dist/tools/query.d.ts.map +1 -0
- package/dist/tools/query.js +75 -0
- package/dist/tools/query.js.map +1 -0
- package/dist/tools/relationships.d.ts +74 -0
- package/dist/tools/relationships.d.ts.map +1 -0
- package/dist/tools/relationships.js +228 -0
- package/dist/tools/relationships.js.map +1 -0
- package/dist/tools/schema.d.ts +38 -0
- package/dist/tools/schema.d.ts.map +1 -0
- package/dist/tools/schema.js +60 -0
- package/dist/tools/schema.js.map +1 -0
- package/dist/tools/script.d.ts +52 -0
- package/dist/tools/script.d.ts.map +1 -0
- package/dist/tools/script.js +51 -0
- package/dist/tools/script.js.map +1 -0
- package/dist/tools/syslog.d.ts +74 -0
- package/dist/tools/syslog.d.ts.map +1 -0
- package/dist/tools/syslog.js +93 -0
- package/dist/tools/syslog.js.map +1 -0
- package/dist/tools/update.d.ts +46 -0
- package/dist/tools/update.d.ts.map +1 -0
- package/dist/tools/update.js +44 -0
- package/dist/tools/update.js.map +1 -0
- package/dist/utils.d.ts +44 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +72 -0
- package/dist/utils.js.map +1 -0
- package/package.json +54 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.schema = exports.definition = void 0;
|
|
4
|
+
exports.handler = handler;
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
const utils_js_1 = require("../utils.js");
|
|
7
|
+
exports.definition = {
|
|
8
|
+
name: "sn_create",
|
|
9
|
+
description: "Create a new record on any ServiceNow table. Pass field values as a JSON object.",
|
|
10
|
+
inputSchema: {
|
|
11
|
+
type: "object",
|
|
12
|
+
properties: {
|
|
13
|
+
table: {
|
|
14
|
+
type: "string",
|
|
15
|
+
description: "ServiceNow table name (e.g. incident)",
|
|
16
|
+
},
|
|
17
|
+
fields: {
|
|
18
|
+
type: "object",
|
|
19
|
+
description: 'JSON object of field name/value pairs (e.g. {"short_description":"Server down","urgency":"1"})',
|
|
20
|
+
additionalProperties: true,
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
required: ["table", "fields"],
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
exports.schema = zod_1.z.object({
|
|
27
|
+
table: zod_1.z.string(),
|
|
28
|
+
fields: zod_1.z.record(zod_1.z.unknown()),
|
|
29
|
+
});
|
|
30
|
+
async function handler(args, client, _config) {
|
|
31
|
+
try {
|
|
32
|
+
const resp = await client.post(`/api/now/table/${args.table}`, args.fields);
|
|
33
|
+
const result = resp.result || {};
|
|
34
|
+
return (0, utils_js_1.ok)({
|
|
35
|
+
sys_id: result.sys_id,
|
|
36
|
+
number: result.number,
|
|
37
|
+
result,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
catch (error) {
|
|
41
|
+
return (0, utils_js_1.err)((0, utils_js_1.formatError)(error));
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=create.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../src/tools/create.ts"],"names":[],"mappings":";;;AAgCA,0BAgBC;AAhDD,6BAAwB;AAGxB,0CAAmD;AAEtC,QAAA,UAAU,GAAG;IACxB,IAAI,EAAE,WAAW;IACjB,WAAW,EACT,kFAAkF;IACpF,WAAW,EAAE;QACX,IAAI,EAAE,QAAiB;QACvB,UAAU,EAAE;YACV,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,uCAAuC;aACrD;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,WAAW,EACT,gGAAgG;gBAClG,oBAAoB,EAAE,IAAI;aAC3B;SACF;QACD,QAAQ,EAAE,CAAC,OAAO,EAAE,QAAQ,CAAC;KAC9B;CACF,CAAC;AAEW,QAAA,MAAM,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7B,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;IACjB,MAAM,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,OAAO,EAAE,CAAC;CAC9B,CAAC,CAAC;AAEI,KAAK,UAAU,OAAO,CAC3B,IAA4B,EAC5B,MAAwB,EACxB,OAAyB;IAEzB,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,kBAAkB,IAAI,CAAC,KAAK,EAAE,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QAC5E,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,IAAI,EAAE,CAAC;QACjC,OAAO,IAAA,aAAE,EAAC;YACR,MAAM,EAAE,MAAM,CAAC,MAAM;YACrB,MAAM,EAAE,MAAM,CAAC,MAAM;YACrB,MAAM;SACP,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,IAAA,cAAG,EAAC,IAAA,sBAAW,EAAC,KAAK,CAAC,CAAC,CAAC;IACjC,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { ServiceNowClient } from "../client.js";
|
|
3
|
+
import { ServiceNowConfig } from "../config.js";
|
|
4
|
+
export declare const definition: {
|
|
5
|
+
name: string;
|
|
6
|
+
description: string;
|
|
7
|
+
inputSchema: {
|
|
8
|
+
type: "object";
|
|
9
|
+
properties: {
|
|
10
|
+
table: {
|
|
11
|
+
type: string;
|
|
12
|
+
description: string;
|
|
13
|
+
};
|
|
14
|
+
sys_id: {
|
|
15
|
+
type: string;
|
|
16
|
+
description: string;
|
|
17
|
+
};
|
|
18
|
+
confirm: {
|
|
19
|
+
type: string;
|
|
20
|
+
description: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
required: string[];
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
export declare const schema: z.ZodObject<{
|
|
27
|
+
table: z.ZodString;
|
|
28
|
+
sys_id: z.ZodString;
|
|
29
|
+
confirm: z.ZodBoolean;
|
|
30
|
+
}, "strip", z.ZodTypeAny, {
|
|
31
|
+
table: string;
|
|
32
|
+
sys_id: string;
|
|
33
|
+
confirm: boolean;
|
|
34
|
+
}, {
|
|
35
|
+
table: string;
|
|
36
|
+
sys_id: string;
|
|
37
|
+
confirm: boolean;
|
|
38
|
+
}>;
|
|
39
|
+
export declare function handler(args: z.infer<typeof schema>, client: ServiceNowClient, _config: ServiceNowConfig): Promise<{
|
|
40
|
+
content: Array<{
|
|
41
|
+
type: "text";
|
|
42
|
+
text: string;
|
|
43
|
+
}>;
|
|
44
|
+
}>;
|
|
45
|
+
//# sourceMappingURL=delete.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete.d.ts","sourceRoot":"","sources":["../../src/tools/delete.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAGhD,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;CAsBtB,CAAC;AAEF,eAAO,MAAM,MAAM;;;;;;;;;;;;EAIjB,CAAC;AAEH,wBAAsB,OAAO,CAC3B,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,MAAM,CAAC,EAC5B,MAAM,EAAE,gBAAgB,EACxB,OAAO,EAAE,gBAAgB;;;;;GAyB1B"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.schema = exports.definition = void 0;
|
|
4
|
+
exports.handler = handler;
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
const utils_js_1 = require("../utils.js");
|
|
7
|
+
exports.definition = {
|
|
8
|
+
name: "sn_delete",
|
|
9
|
+
description: "Delete a ServiceNow record by sys_id. Requires the confirm flag set to true as a safety measure.",
|
|
10
|
+
inputSchema: {
|
|
11
|
+
type: "object",
|
|
12
|
+
properties: {
|
|
13
|
+
table: {
|
|
14
|
+
type: "string",
|
|
15
|
+
description: "ServiceNow table name (e.g. incident)",
|
|
16
|
+
},
|
|
17
|
+
sys_id: {
|
|
18
|
+
type: "string",
|
|
19
|
+
description: "The sys_id of the record to delete",
|
|
20
|
+
},
|
|
21
|
+
confirm: {
|
|
22
|
+
type: "boolean",
|
|
23
|
+
description: "Must be true to execute the deletion. Safety measure to prevent accidental deletes.",
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
required: ["table", "sys_id", "confirm"],
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
exports.schema = zod_1.z.object({
|
|
30
|
+
table: zod_1.z.string(),
|
|
31
|
+
sys_id: zod_1.z.string(),
|
|
32
|
+
confirm: zod_1.z.boolean(),
|
|
33
|
+
});
|
|
34
|
+
async function handler(args, client, _config) {
|
|
35
|
+
try {
|
|
36
|
+
if (!args.confirm) {
|
|
37
|
+
return (0, utils_js_1.err)("Must set confirm to true to delete records. This is a safety measure.");
|
|
38
|
+
}
|
|
39
|
+
const resp = await client.delete(`/api/now/table/${args.table}/${args.sys_id}`);
|
|
40
|
+
if (resp.status === 204 || resp.status === 200) {
|
|
41
|
+
return (0, utils_js_1.ok)({
|
|
42
|
+
status: "deleted",
|
|
43
|
+
sys_id: args.sys_id,
|
|
44
|
+
table: args.table,
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
return (0, utils_js_1.err)(`Delete failed with HTTP ${resp.status}`);
|
|
48
|
+
}
|
|
49
|
+
catch (error) {
|
|
50
|
+
return (0, utils_js_1.err)((0, utils_js_1.formatError)(error));
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=delete.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete.js","sourceRoot":"","sources":["../../src/tools/delete.ts"],"names":[],"mappings":";;;AAmCA,0BA4BC;AA/DD,6BAAwB;AAGxB,0CAAmD;AAEtC,QAAA,UAAU,GAAG;IACxB,IAAI,EAAE,WAAW;IACjB,WAAW,EACT,kGAAkG;IACpG,WAAW,EAAE;QACX,IAAI,EAAE,QAAiB;QACvB,UAAU,EAAE;YACV,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,uCAAuC;aACrD;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,oCAAoC;aAClD;YACD,OAAO,EAAE;gBACP,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,qFAAqF;aACnG;SACF;QACD,QAAQ,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,SAAS,CAAC;KACzC;CACF,CAAC;AAEW,QAAA,MAAM,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7B,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;IACjB,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE;IAClB,OAAO,EAAE,OAAC,CAAC,OAAO,EAAE;CACrB,CAAC,CAAC;AAEI,KAAK,UAAU,OAAO,CAC3B,IAA4B,EAC5B,MAAwB,EACxB,OAAyB;IAEzB,IAAI,CAAC;QACH,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;YAClB,OAAO,IAAA,cAAG,EACR,uEAAuE,CACxE,CAAC;QACJ,CAAC;QAED,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,MAAM,CAC9B,kBAAkB,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,MAAM,EAAE,CAC9C,CAAC;QAEF,IAAI,IAAI,CAAC,MAAM,KAAK,GAAG,IAAI,IAAI,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;YAC/C,OAAO,IAAA,aAAE,EAAC;gBACR,MAAM,EAAE,SAAS;gBACjB,MAAM,EAAE,IAAI,CAAC,MAAM;gBACnB,KAAK,EAAE,IAAI,CAAC,KAAK;aAClB,CAAC,CAAC;QACL,CAAC;QAED,OAAO,IAAA,cAAG,EAAC,2BAA2B,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;IACvD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,IAAA,cAAG,EAAC,IAAA,sBAAW,EAAC,KAAK,CAAC,CAAC,CAAC;IACjC,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { ServiceNowClient } from "../client.js";
|
|
3
|
+
import { ServiceNowConfig } from "../config.js";
|
|
4
|
+
export declare const definition: {
|
|
5
|
+
name: string;
|
|
6
|
+
description: string;
|
|
7
|
+
inputSchema: {
|
|
8
|
+
type: "object";
|
|
9
|
+
properties: {
|
|
10
|
+
type: {
|
|
11
|
+
type: string;
|
|
12
|
+
enum: string[];
|
|
13
|
+
description: string;
|
|
14
|
+
};
|
|
15
|
+
query: {
|
|
16
|
+
type: string;
|
|
17
|
+
description: string;
|
|
18
|
+
};
|
|
19
|
+
limit: {
|
|
20
|
+
type: string;
|
|
21
|
+
description: string;
|
|
22
|
+
};
|
|
23
|
+
active: {
|
|
24
|
+
type: string;
|
|
25
|
+
description: string;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
required: string[];
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
export declare const schema: z.ZodObject<{
|
|
32
|
+
type: z.ZodEnum<["tables", "apps", "plugins"]>;
|
|
33
|
+
query: z.ZodOptional<z.ZodString>;
|
|
34
|
+
limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
35
|
+
active: z.ZodOptional<z.ZodString>;
|
|
36
|
+
}, "strip", z.ZodTypeAny, {
|
|
37
|
+
limit: number;
|
|
38
|
+
type: "tables" | "apps" | "plugins";
|
|
39
|
+
query?: string | undefined;
|
|
40
|
+
active?: string | undefined;
|
|
41
|
+
}, {
|
|
42
|
+
type: "tables" | "apps" | "plugins";
|
|
43
|
+
query?: string | undefined;
|
|
44
|
+
limit?: number | undefined;
|
|
45
|
+
active?: string | undefined;
|
|
46
|
+
}>;
|
|
47
|
+
export declare function handler(args: z.infer<typeof schema>, client: ServiceNowClient, _config: ServiceNowConfig): Promise<{
|
|
48
|
+
content: Array<{
|
|
49
|
+
type: "text";
|
|
50
|
+
text: string;
|
|
51
|
+
}>;
|
|
52
|
+
}>;
|
|
53
|
+
//# sourceMappingURL=discover.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"discover.d.ts","sourceRoot":"","sources":["../../src/tools/discover.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAGhD,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;CA2BtB,CAAC;AAEF,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;EAKjB,CAAC;AAEH,wBAAsB,OAAO,CAC3B,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,MAAM,CAAC,EAC5B,MAAM,EAAE,gBAAgB,EACxB,OAAO,EAAE,gBAAgB;;;;;GAwG1B"}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.schema = exports.definition = void 0;
|
|
4
|
+
exports.handler = handler;
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
const utils_js_1 = require("../utils.js");
|
|
7
|
+
exports.definition = {
|
|
8
|
+
name: "sn_discover",
|
|
9
|
+
description: "Discover tables, applications, and plugins installed on the ServiceNow instance.",
|
|
10
|
+
inputSchema: {
|
|
11
|
+
type: "object",
|
|
12
|
+
properties: {
|
|
13
|
+
type: {
|
|
14
|
+
type: "string",
|
|
15
|
+
enum: ["tables", "apps", "plugins"],
|
|
16
|
+
description: "What to discover: tables, apps, or plugins",
|
|
17
|
+
},
|
|
18
|
+
query: {
|
|
19
|
+
type: "string",
|
|
20
|
+
description: "Search by name (LIKE match)",
|
|
21
|
+
},
|
|
22
|
+
limit: {
|
|
23
|
+
type: "number",
|
|
24
|
+
description: "Max results (default 20)",
|
|
25
|
+
},
|
|
26
|
+
active: {
|
|
27
|
+
type: "string",
|
|
28
|
+
description: "Filter by active status: true or false (apps and plugins only)",
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
required: ["type"],
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
exports.schema = zod_1.z.object({
|
|
35
|
+
type: zod_1.z.enum(["tables", "apps", "plugins"]),
|
|
36
|
+
query: zod_1.z.string().optional(),
|
|
37
|
+
limit: zod_1.z.number().optional().default(20),
|
|
38
|
+
active: zod_1.z.string().optional(),
|
|
39
|
+
});
|
|
40
|
+
async function handler(args, client, _config) {
|
|
41
|
+
try {
|
|
42
|
+
switch (args.type) {
|
|
43
|
+
case "tables": {
|
|
44
|
+
let sysparmQuery = "";
|
|
45
|
+
if (args.query) {
|
|
46
|
+
sysparmQuery = `nameLIKE${args.query}^ORlabelLIKE${args.query}`;
|
|
47
|
+
}
|
|
48
|
+
const resp = await client.get("/api/now/table/sys_db_object", {
|
|
49
|
+
sysparm_fields: "sys_id,name,label,super_class,sys_scope,is_extendable",
|
|
50
|
+
sysparm_limit: String(args.limit),
|
|
51
|
+
sysparm_display_value: "true",
|
|
52
|
+
...(sysparmQuery ? { sysparm_query: sysparmQuery } : {}),
|
|
53
|
+
});
|
|
54
|
+
const results = (resp.result || []).map((r) => ({
|
|
55
|
+
sys_id: r.sys_id,
|
|
56
|
+
name: r.name,
|
|
57
|
+
label: r.label,
|
|
58
|
+
super_class: r.super_class,
|
|
59
|
+
scope: r.sys_scope,
|
|
60
|
+
is_extendable: r.is_extendable,
|
|
61
|
+
}));
|
|
62
|
+
return (0, utils_js_1.ok)(results);
|
|
63
|
+
}
|
|
64
|
+
case "apps": {
|
|
65
|
+
let allApps = [];
|
|
66
|
+
// Scoped apps (sys_app)
|
|
67
|
+
const appQuery = [];
|
|
68
|
+
if (args.query)
|
|
69
|
+
appQuery.push(`nameLIKE${args.query}`);
|
|
70
|
+
if (args.active === "true")
|
|
71
|
+
appQuery.push("active=true");
|
|
72
|
+
try {
|
|
73
|
+
const appResp = await client.get("/api/now/table/sys_app", {
|
|
74
|
+
sysparm_fields: "sys_id,name,version,scope,active",
|
|
75
|
+
sysparm_limit: String(args.limit),
|
|
76
|
+
...(appQuery.length ? { sysparm_query: appQuery.join("^") } : {}),
|
|
77
|
+
});
|
|
78
|
+
for (const r of appResp.result || []) {
|
|
79
|
+
allApps.push({ ...r, source: "scoped" });
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
catch {
|
|
83
|
+
// sys_app may require elevated role
|
|
84
|
+
}
|
|
85
|
+
// Store apps (sys_store_app)
|
|
86
|
+
const storeQuery = [];
|
|
87
|
+
if (args.query)
|
|
88
|
+
storeQuery.push(`nameLIKE${args.query}`);
|
|
89
|
+
if (args.active === "true")
|
|
90
|
+
storeQuery.push("active=true");
|
|
91
|
+
try {
|
|
92
|
+
const storeResp = await client.get("/api/now/table/sys_store_app", {
|
|
93
|
+
sysparm_fields: "sys_id,name,version,scope,active",
|
|
94
|
+
sysparm_limit: String(args.limit),
|
|
95
|
+
...(storeQuery.length
|
|
96
|
+
? { sysparm_query: storeQuery.join("^") }
|
|
97
|
+
: {}),
|
|
98
|
+
});
|
|
99
|
+
for (const r of storeResp.result || []) {
|
|
100
|
+
allApps.push({ ...r, source: "store" });
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
catch {
|
|
104
|
+
// May not be accessible
|
|
105
|
+
}
|
|
106
|
+
allApps = allApps.slice(0, args.limit);
|
|
107
|
+
return (0, utils_js_1.ok)(allApps);
|
|
108
|
+
}
|
|
109
|
+
case "plugins": {
|
|
110
|
+
const pluginQuery = [];
|
|
111
|
+
if (args.query)
|
|
112
|
+
pluginQuery.push(`nameLIKE${args.query}`);
|
|
113
|
+
if (args.active)
|
|
114
|
+
pluginQuery.push(`active=${args.active}`);
|
|
115
|
+
const resp = await client.get("/api/now/table/v_plugin", {
|
|
116
|
+
sysparm_fields: "sys_id,name,active",
|
|
117
|
+
sysparm_limit: String(args.limit),
|
|
118
|
+
...(pluginQuery.length
|
|
119
|
+
? { sysparm_query: pluginQuery.join("^") }
|
|
120
|
+
: {}),
|
|
121
|
+
});
|
|
122
|
+
const results = (resp.result || []).map((r) => ({
|
|
123
|
+
sys_id: r.sys_id,
|
|
124
|
+
name: r.name,
|
|
125
|
+
active: r.active,
|
|
126
|
+
}));
|
|
127
|
+
return (0, utils_js_1.ok)(results);
|
|
128
|
+
}
|
|
129
|
+
default:
|
|
130
|
+
return (0, utils_js_1.err)(`Unknown discover type: ${args.type}`);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
catch (error) {
|
|
134
|
+
return (0, utils_js_1.err)((0, utils_js_1.formatError)(error));
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
//# sourceMappingURL=discover.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"discover.js","sourceRoot":"","sources":["../../src/tools/discover.ts"],"names":[],"mappings":";;;A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CAAC;QACtD,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,IAAA,cAAG,EAAC,IAAA,sBAAW,EAAC,KAAK,CAAC,CAAC,CAAC;IACjC,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { ServiceNowClient } from "../client.js";
|
|
3
|
+
import { ServiceNowConfig } from "../config.js";
|
|
4
|
+
export declare const definition: {
|
|
5
|
+
name: string;
|
|
6
|
+
description: string;
|
|
7
|
+
inputSchema: {
|
|
8
|
+
type: "object";
|
|
9
|
+
properties: {
|
|
10
|
+
table: {
|
|
11
|
+
type: string;
|
|
12
|
+
description: string;
|
|
13
|
+
};
|
|
14
|
+
sys_id: {
|
|
15
|
+
type: string;
|
|
16
|
+
description: string;
|
|
17
|
+
};
|
|
18
|
+
fields: {
|
|
19
|
+
type: string;
|
|
20
|
+
description: string;
|
|
21
|
+
};
|
|
22
|
+
display_value: {
|
|
23
|
+
type: string;
|
|
24
|
+
description: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
required: string[];
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
export declare const schema: z.ZodObject<{
|
|
31
|
+
table: z.ZodString;
|
|
32
|
+
sys_id: z.ZodString;
|
|
33
|
+
fields: z.ZodOptional<z.ZodString>;
|
|
34
|
+
display_value: z.ZodOptional<z.ZodString>;
|
|
35
|
+
}, "strip", z.ZodTypeAny, {
|
|
36
|
+
table: string;
|
|
37
|
+
sys_id: string;
|
|
38
|
+
fields?: string | undefined;
|
|
39
|
+
display_value?: string | undefined;
|
|
40
|
+
}, {
|
|
41
|
+
table: string;
|
|
42
|
+
sys_id: string;
|
|
43
|
+
fields?: string | undefined;
|
|
44
|
+
display_value?: string | undefined;
|
|
45
|
+
}>;
|
|
46
|
+
export declare function handler(args: z.infer<typeof schema>, client: ServiceNowClient, config: ServiceNowConfig): Promise<{
|
|
47
|
+
content: Array<{
|
|
48
|
+
type: "text";
|
|
49
|
+
text: string;
|
|
50
|
+
}>;
|
|
51
|
+
}>;
|
|
52
|
+
//# sourceMappingURL=get.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get.d.ts","sourceRoot":"","sources":["../../src/tools/get.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAGhD,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;CA0BtB,CAAC;AAEF,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;EAKjB,CAAC;AAEH,wBAAsB,OAAO,CAC3B,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,MAAM,CAAC,EAC5B,MAAM,EAAE,gBAAgB,EACxB,MAAM,EAAE,gBAAgB;;;;;GAezB"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.schema = exports.definition = void 0;
|
|
4
|
+
exports.handler = handler;
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
const utils_js_1 = require("../utils.js");
|
|
7
|
+
exports.definition = {
|
|
8
|
+
name: "sn_get",
|
|
9
|
+
description: "Get a single ServiceNow record by sys_id. Returns all fields or a specified subset.",
|
|
10
|
+
inputSchema: {
|
|
11
|
+
type: "object",
|
|
12
|
+
properties: {
|
|
13
|
+
table: {
|
|
14
|
+
type: "string",
|
|
15
|
+
description: "ServiceNow table name (e.g. incident)",
|
|
16
|
+
},
|
|
17
|
+
sys_id: {
|
|
18
|
+
type: "string",
|
|
19
|
+
description: "The sys_id of the record to retrieve",
|
|
20
|
+
},
|
|
21
|
+
fields: {
|
|
22
|
+
type: "string",
|
|
23
|
+
description: "Comma-separated list of fields to return",
|
|
24
|
+
},
|
|
25
|
+
display_value: {
|
|
26
|
+
type: "string",
|
|
27
|
+
description: "Display values mode: true, false, or all",
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
required: ["table", "sys_id"],
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
exports.schema = zod_1.z.object({
|
|
34
|
+
table: zod_1.z.string(),
|
|
35
|
+
sys_id: zod_1.z.string(),
|
|
36
|
+
fields: zod_1.z.string().optional(),
|
|
37
|
+
display_value: zod_1.z.string().optional(),
|
|
38
|
+
});
|
|
39
|
+
async function handler(args, client, config) {
|
|
40
|
+
try {
|
|
41
|
+
const params = {};
|
|
42
|
+
if (args.fields)
|
|
43
|
+
params.sysparm_fields = args.fields;
|
|
44
|
+
params.sysparm_display_value = args.display_value ?? config.displayValue;
|
|
45
|
+
const resp = await client.get(`/api/now/table/${args.table}/${args.sys_id}`, params);
|
|
46
|
+
return (0, utils_js_1.ok)(resp.result);
|
|
47
|
+
}
|
|
48
|
+
catch (error) {
|
|
49
|
+
return (0, utils_js_1.err)((0, utils_js_1.formatError)(error));
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=get.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get.js","sourceRoot":"","sources":["../../src/tools/get.ts"],"names":[],"mappings":";;;AAwCA,0BAkBC;AA1DD,6BAAwB;AAGxB,0CAAmD;AAEtC,QAAA,UAAU,GAAG;IACxB,IAAI,EAAE,QAAQ;IACd,WAAW,EACT,qFAAqF;IACvF,WAAW,EAAE;QACX,IAAI,EAAE,QAAiB;QACvB,UAAU,EAAE;YACV,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,uCAAuC;aACrD;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,sCAAsC;aACpD;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,0CAA0C;aACxD;YACD,aAAa,EAAE;gBACb,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,0CAA0C;aACxD;SACF;QACD,QAAQ,EAAE,CAAC,OAAO,EAAE,QAAQ,CAAC;KAC9B;CACF,CAAC;AAEW,QAAA,MAAM,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7B,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;IACjB,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE;IAClB,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,aAAa,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACrC,CAAC,CAAC;AAEI,KAAK,UAAU,OAAO,CAC3B,IAA4B,EAC5B,MAAwB,EACxB,MAAwB;IAExB,IAAI,CAAC;QACH,MAAM,MAAM,GAA2B,EAAE,CAAC;QAC1C,IAAI,IAAI,CAAC,MAAM;YAAE,MAAM,CAAC,cAAc,GAAG,IAAI,CAAC,MAAM,CAAC;QACrD,MAAM,CAAC,qBAAqB,GAAG,IAAI,CAAC,aAAa,IAAI,MAAM,CAAC,YAAY,CAAC;QAEzE,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,GAAG,CAC3B,kBAAkB,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,MAAM,EAAE,EAC7C,MAAM,CACP,CAAC;QACF,OAAO,IAAA,aAAE,EAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACzB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,IAAA,cAAG,EAAC,IAAA,sBAAW,EAAC,KAAK,CAAC,CAAC,CAAC;IACjC,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { ServiceNowClient } from "../client.js";
|
|
3
|
+
import { ServiceNowConfig } from "../config.js";
|
|
4
|
+
export declare const definition: {
|
|
5
|
+
name: string;
|
|
6
|
+
description: string;
|
|
7
|
+
inputSchema: {
|
|
8
|
+
type: "object";
|
|
9
|
+
properties: {
|
|
10
|
+
check: {
|
|
11
|
+
type: string;
|
|
12
|
+
enum: string[];
|
|
13
|
+
description: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
required: never[];
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export declare const schema: z.ZodObject<{
|
|
20
|
+
check: z.ZodDefault<z.ZodOptional<z.ZodEnum<["all", "version", "nodes", "jobs", "semaphores", "stats"]>>>;
|
|
21
|
+
}, "strip", z.ZodTypeAny, {
|
|
22
|
+
check: "all" | "version" | "nodes" | "jobs" | "semaphores" | "stats";
|
|
23
|
+
}, {
|
|
24
|
+
check?: "all" | "version" | "nodes" | "jobs" | "semaphores" | "stats" | undefined;
|
|
25
|
+
}>;
|
|
26
|
+
export declare function handler(args: z.infer<typeof schema>, client: ServiceNowClient, config: ServiceNowConfig): Promise<{
|
|
27
|
+
content: Array<{
|
|
28
|
+
type: "text";
|
|
29
|
+
text: string;
|
|
30
|
+
}>;
|
|
31
|
+
}>;
|
|
32
|
+
//# sourceMappingURL=health.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"health.d.ts","sourceRoot":"","sources":["../../src/tools/health.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAGhD,eAAO,MAAM,UAAU;;;;;;;;;;;;;;CAetB,CAAC;AAEF,eAAO,MAAM,MAAM;;;;;;EAKjB,CAAC;AAcH,wBAAsB,OAAO,CAC3B,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,MAAM,CAAC,EAC5B,MAAM,EAAE,gBAAgB,EACxB,MAAM,EAAE,gBAAgB;;;;;GAyJzB"}
|