@sonisoft/now-sdk-ext-mcp 4.4.0 → 4.6.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.
@@ -0,0 +1,164 @@
1
+ /**
2
+ * Tool name -> registration function.
3
+ *
4
+ * index.ts used to call all 86 registration functions directly, which meant the
5
+ * only way to know which tools exist was to read 86 lines of imports. Nothing
6
+ * could ask "which tools are there?" without registering them.
7
+ *
8
+ * This table makes the set addressable, so a package can name a subset and
9
+ * something can register exactly that. It is the same shape as TOOL_ANNOTATIONS
10
+ * in common/annotations.ts — deliberately, since they are keyed identically and
11
+ * a test asserts they cover the same set. Two tables that must agree are worth
12
+ * having only if something checks that they do.
13
+ *
14
+ * GENERATED-ISH: derived from src/tools/*.ts, but checked in and maintained by
15
+ * hand. A new tool has to be added here or it cannot be registered at all —
16
+ * which is the point, and is asserted by a test rather than left to memory.
17
+ */
18
+ import { registerAggregateGroupedTool, registerAggregateQueryTool, registerCountRecordsTool, } from "../tools/aggregate.js";
19
+ import { registerGetAppDetailsTool, registerInstallFromAppRepoTool, registerInstallStoreAppTool, registerListCompanyAppsTool, registerPublishToAppRepoTool, registerSearchStoreAppsTool, registerUpdateStoreAppTool, registerValidateAppInstallTool, } from "../tools/app-manager.js";
20
+ import { registerRunAtfTestSuiteTool, registerRunAtfTestTool, } from "../tools/atf.js";
21
+ import { registerGetAttachmentInfoTool, registerListAttachmentsTool, registerUploadAttachmentTool, } from "../tools/attachment.js";
22
+ import { registerBatchCreateRecordsTool, registerBatchUpdateRecordsTool, } from "../tools/batch.js";
23
+ import { registerGetCatalogCategoryTool, registerGetCatalogItemTool, registerListCatalogCategoriesTool, registerListCatalogItemVariablesTool, registerListCatalogItemsTool, registerSubmitCatalogRequestTool, } from "../tools/catalog.js";
24
+ import { registerGetCmdbRelationshipsTool, registerTraverseCmdbGraphTool, } from "../tools/cmdb.js";
25
+ import { registerAddCodeSearchTableTool, registerCodeSearchTool, registerListCodeSearchGroupsTool, registerListCodeSearchTablesTool, } from "../tools/codesearch.js";
26
+ import { registerListInstanceTablesTool, registerListPluginsTool, } from "../tools/discovery.js";
27
+ import { registerExecuteScriptTool, } from "../tools/execute-script.js";
28
+ import { registerFindAtfTestsTool, } from "../tools/find-atf-tests.js";
29
+ import { registerCancelFlowTool, registerCopyFlowTool, registerExecuteActionTool, registerExecuteFlowTool, registerExecuteSubflowTool, registerGetFlowContextStatusTool, registerGetFlowErrorTool, registerGetFlowExecutionDetailsTool, registerGetFlowLogsTool, registerGetFlowOutputsTool, registerTestFlowTool, } from "../tools/flow.js";
30
+ import { registerCheckInstanceHealthTool, } from "../tools/health.js";
31
+ import { registerCreateKbArticleTool, registerCreateKbCategoryTool, registerGetKbArticleTool, registerGetKnowledgeBaseTool, registerListKbArticlesTool, registerListKbCategoriesTool, registerListKnowledgeBasesTool, registerPublishKbArticleTool, registerUpdateKbArticleTool, } from "../tools/knowledge.js";
32
+ import { registerLookupAppTool, } from "../tools/lookup-app.js";
33
+ import { registerLookupColumnsTool, } from "../tools/lookup-columns.js";
34
+ import { registerLookupTableTool, } from "../tools/lookup-table.js";
35
+ import { registerQueryDeleteRecordsTool, registerQueryUpdateRecordsTool, } from "../tools/query-batch.js";
36
+ import { registerQuerySyslogTool, } from "../tools/query-syslog.js";
37
+ import { registerQueryTableTool, } from "../tools/query-table.js";
38
+ import { registerDiscoverTableSchemaTool, registerExplainFieldTool, registerValidateCatalogTool, } from "../tools/schema.js";
39
+ import { registerGetCurrentScopeTool, registerListScopedAppsTool, registerSetCurrentScopeTool, } from "../tools/scope.js";
40
+ import { registerPullScriptTool, registerPushScriptTool, } from "../tools/scriptsync.js";
41
+ import { registerAddTaskCommentTool, registerApproveChangeTool, registerAssignTaskTool, registerCloseIncidentTool, registerFindTaskTool, registerResolveIncidentTool, } from "../tools/task.js";
42
+ import { registerCloneUpdateSetTool, registerCreateUpdateSetTool, registerGetCurrentUpdateSetTool, registerInspectUpdateSetTool, registerListUpdateSetsTool, registerMoveUpdateSetRecordsTool, registerSetCurrentUpdateSetTool, } from "../tools/updateset.js";
43
+ import { registerCreateWorkflowTool, } from "../tools/workflow.js";
44
+ import { registerExportRecordXmlTool, registerImportRecordsXmlTool, } from "../tools/xml-record.js";
45
+ export const TOOL_REGISTRY = {
46
+ // ---- aggregate
47
+ aggregate_grouped: registerAggregateGroupedTool,
48
+ aggregate_query: registerAggregateQueryTool,
49
+ count_records: registerCountRecordsTool,
50
+ // ---- app-manager
51
+ get_app_details: registerGetAppDetailsTool,
52
+ install_from_app_repo: registerInstallFromAppRepoTool,
53
+ install_store_app: registerInstallStoreAppTool,
54
+ list_company_apps: registerListCompanyAppsTool,
55
+ publish_to_app_repo: registerPublishToAppRepoTool,
56
+ search_store_apps: registerSearchStoreAppsTool,
57
+ update_store_app: registerUpdateStoreAppTool,
58
+ validate_app_install: registerValidateAppInstallTool,
59
+ // ---- atf
60
+ run_atf_test: registerRunAtfTestTool,
61
+ run_atf_test_suite: registerRunAtfTestSuiteTool,
62
+ // ---- attachment
63
+ get_attachment_info: registerGetAttachmentInfoTool,
64
+ list_attachments: registerListAttachmentsTool,
65
+ upload_attachment: registerUploadAttachmentTool,
66
+ // ---- batch
67
+ batch_create_records: registerBatchCreateRecordsTool,
68
+ batch_update_records: registerBatchUpdateRecordsTool,
69
+ // ---- catalog
70
+ get_catalog_category: registerGetCatalogCategoryTool,
71
+ get_catalog_item: registerGetCatalogItemTool,
72
+ list_catalog_categories: registerListCatalogCategoriesTool,
73
+ list_catalog_item_variables: registerListCatalogItemVariablesTool,
74
+ list_catalog_items: registerListCatalogItemsTool,
75
+ submit_catalog_request: registerSubmitCatalogRequestTool,
76
+ // ---- cmdb
77
+ get_cmdb_relationships: registerGetCmdbRelationshipsTool,
78
+ traverse_cmdb_graph: registerTraverseCmdbGraphTool,
79
+ // ---- codesearch
80
+ add_code_search_table: registerAddCodeSearchTableTool,
81
+ code_search: registerCodeSearchTool,
82
+ list_code_search_groups: registerListCodeSearchGroupsTool,
83
+ list_code_search_tables: registerListCodeSearchTablesTool,
84
+ // ---- discovery
85
+ list_instance_tables: registerListInstanceTablesTool,
86
+ list_plugins: registerListPluginsTool,
87
+ // ---- execute-script
88
+ execute_script: registerExecuteScriptTool,
89
+ // ---- find-atf-tests
90
+ find_atf_tests: registerFindAtfTestsTool,
91
+ // ---- flow
92
+ cancel_flow: registerCancelFlowTool,
93
+ copy_flow: registerCopyFlowTool,
94
+ execute_action: registerExecuteActionTool,
95
+ execute_flow: registerExecuteFlowTool,
96
+ execute_subflow: registerExecuteSubflowTool,
97
+ get_flow_context_status: registerGetFlowContextStatusTool,
98
+ get_flow_error: registerGetFlowErrorTool,
99
+ get_flow_execution_details: registerGetFlowExecutionDetailsTool,
100
+ get_flow_logs: registerGetFlowLogsTool,
101
+ get_flow_outputs: registerGetFlowOutputsTool,
102
+ test_flow: registerTestFlowTool,
103
+ // ---- health
104
+ check_instance_health: registerCheckInstanceHealthTool,
105
+ // ---- knowledge
106
+ create_kb_article: registerCreateKbArticleTool,
107
+ create_kb_category: registerCreateKbCategoryTool,
108
+ get_kb_article: registerGetKbArticleTool,
109
+ get_knowledge_base: registerGetKnowledgeBaseTool,
110
+ list_kb_articles: registerListKbArticlesTool,
111
+ list_kb_categories: registerListKbCategoriesTool,
112
+ list_knowledge_bases: registerListKnowledgeBasesTool,
113
+ publish_kb_article: registerPublishKbArticleTool,
114
+ update_kb_article: registerUpdateKbArticleTool,
115
+ // ---- lookup-app
116
+ lookup_app: registerLookupAppTool,
117
+ // ---- lookup-columns
118
+ lookup_columns: registerLookupColumnsTool,
119
+ // ---- lookup-table
120
+ lookup_table: registerLookupTableTool,
121
+ // ---- query-batch
122
+ query_delete_records: registerQueryDeleteRecordsTool,
123
+ query_update_records: registerQueryUpdateRecordsTool,
124
+ // ---- query-syslog
125
+ query_syslog: registerQuerySyslogTool,
126
+ // ---- query-table
127
+ query_table: registerQueryTableTool,
128
+ // ---- schema
129
+ discover_table_schema: registerDiscoverTableSchemaTool,
130
+ explain_field: registerExplainFieldTool,
131
+ validate_catalog: registerValidateCatalogTool,
132
+ // ---- scope
133
+ get_current_scope: registerGetCurrentScopeTool,
134
+ list_scoped_apps: registerListScopedAppsTool,
135
+ set_current_scope: registerSetCurrentScopeTool,
136
+ // ---- scriptsync
137
+ pull_script: registerPullScriptTool,
138
+ push_script: registerPushScriptTool,
139
+ // ---- task
140
+ add_task_comment: registerAddTaskCommentTool,
141
+ approve_change: registerApproveChangeTool,
142
+ assign_task: registerAssignTaskTool,
143
+ close_incident: registerCloseIncidentTool,
144
+ find_task: registerFindTaskTool,
145
+ resolve_incident: registerResolveIncidentTool,
146
+ // ---- updateset
147
+ clone_update_set: registerCloneUpdateSetTool,
148
+ create_update_set: registerCreateUpdateSetTool,
149
+ get_current_update_set: registerGetCurrentUpdateSetTool,
150
+ inspect_update_set: registerInspectUpdateSetTool,
151
+ list_update_sets: registerListUpdateSetsTool,
152
+ move_update_set_records: registerMoveUpdateSetRecordsTool,
153
+ set_current_update_set: registerSetCurrentUpdateSetTool,
154
+ // ---- workflow
155
+ create_workflow: registerCreateWorkflowTool,
156
+ // ---- xml-record
157
+ export_record_xml: registerExportRecordXmlTool,
158
+ import_records_xml: registerImportRecordsXmlTool,
159
+ };
160
+ /** Every tool name this server knows how to register. */
161
+ export function allToolNames() {
162
+ return Object.keys(TOOL_REGISTRY);
163
+ }
164
+ //# sourceMappingURL=registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/tools/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,OAAO,EACL,4BAA4B,EAC5B,0BAA0B,EAC1B,wBAAwB,GACzB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,yBAAyB,EACzB,8BAA8B,EAC9B,2BAA2B,EAC3B,2BAA2B,EAC3B,4BAA4B,EAC5B,2BAA2B,EAC3B,0BAA0B,EAC1B,8BAA8B,GAC/B,MAAM,yBA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AE,4BAA4B;CACjD,CAAC;AAEF,yDAAyD;AACzD,MAAM,UAAU,YAAY;IACxB,OAAO,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;AACtC,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ import { ResolvedPackage } from "../common/tool-packages.js";
3
+ /**
4
+ * `list_tool_packages` — what is loaded, and what else could be.
5
+ *
6
+ * Registered regardless of the active package, deliberately. If a filtered
7
+ * session could not see this, a model working with a reduced surface would have
8
+ * no way to tell whether a tool is genuinely absent from the server or merely
9
+ * filtered out of this session — and would report "that capability does not
10
+ * exist" when the truth is "ask your administrator for a different package".
11
+ */
12
+ export declare function registerListToolPackagesTool(server: McpServer, active: ResolvedPackage): void;
13
+ //# sourceMappingURL=tool-packages.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool-packages.d.ts","sourceRoot":"","sources":["../../src/tools/tool-packages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,OAAO,EAAsB,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAIjF;;;;;;;;GAQG;AACH,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,eAAe,GAAG,IAAI,CA8C7F"}
@@ -0,0 +1,50 @@
1
+ import { TOOL_PACKAGES } from "../config/tool-packages.js";
2
+ import { resolveToolPackage } from "../common/tool-packages.js";
3
+ import { allToolNames } from "./registry.js";
4
+ import { annotationsFor } from "../common/annotations.js";
5
+ /**
6
+ * `list_tool_packages` — what is loaded, and what else could be.
7
+ *
8
+ * Registered regardless of the active package, deliberately. If a filtered
9
+ * session could not see this, a model working with a reduced surface would have
10
+ * no way to tell whether a tool is genuinely absent from the server or merely
11
+ * filtered out of this session — and would report "that capability does not
12
+ * exist" when the truth is "ask your administrator for a different package".
13
+ */
14
+ export function registerListToolPackagesTool(server, active) {
15
+ server.registerTool("list_tool_packages", {
16
+ annotations: annotationsFor("list_tool_packages"),
17
+ title: "List Tool Packages",
18
+ description: "Show which tool package this session is running and what other packages exist. " +
19
+ "Use this when a capability you expected is missing: the tool may exist on the " +
20
+ "server but be filtered out of this session, in which case the answer is a " +
21
+ "different MCP_TOOL_PACKAGE rather than a missing feature.",
22
+ inputSchema: {},
23
+ }, () => {
24
+ const total = allToolNames().length;
25
+ const lines = [];
26
+ lines.push("=== Active ===");
27
+ lines.push(`Package(s): ${active.names.join(", ")}`);
28
+ lines.push(`Tools: ${active.tools.length} of ${total}`);
29
+ if (active.fellBack) {
30
+ lines.push(`NOTE: the requested package was not recognised, so "full" was substituted.`);
31
+ }
32
+ if (active.unknownPackages.length > 0) {
33
+ lines.push(`Unrecognised request(s): ${active.unknownPackages.join(", ")}`);
34
+ }
35
+ lines.push("");
36
+ lines.push("=== Available ===");
37
+ for (const [name, pkg] of Object.entries(TOOL_PACKAGES).sort(([a], [b]) => a.localeCompare(b))) {
38
+ // Resolve each so the count reflects what would actually register,
39
+ // not how many names the config happens to list.
40
+ const resolved = resolveToolPackage(name);
41
+ const marker = active.names.includes(name) ? " (active)" : "";
42
+ lines.push(`${name}${marker} — ${resolved.tools.length} tools`);
43
+ lines.push(` ${pkg.description}`);
44
+ }
45
+ lines.push("");
46
+ lines.push("Set MCP_TOOL_PACKAGE to change this. Comma-separated names are unioned.");
47
+ return { content: [{ type: "text", text: lines.join("\n") }] };
48
+ });
49
+ }
50
+ //# sourceMappingURL=tool-packages.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool-packages.js","sourceRoot":"","sources":["../../src/tools/tool-packages.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAmB,MAAM,4BAA4B,CAAC;AACjF,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,0BA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,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YAC7F,mEAAmE;YACnE,iDAAiD;YACjD,MAAM,QAAQ,GAAG,kBAAkB,CAAC,IAAI,CAAC,CAAC;YAC1C,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC;YAC9D,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,GAAG,MAAM,MAAM,QAAQ,CAAC,KAAK,CAAC,MAAM,QAAQ,CAAC,CAAC;YAChE,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,WAAW,EAAE,CAAC,CAAC;QACxC,CAAC;QAED,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACf,KAAK,CAAC,IAAI,CAAC,yEAAyE,CAAC,CAAC;QAEtF,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC;IAC5E,CAAC,CACJ,CAAC;AACN,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sonisoft/now-sdk-ext-mcp",
3
- "version": "4.4.0",
3
+ "version": "4.6.0",
4
4
  "description": "MCP server for interacting with ServiceNow instances via @sonisoft/now-sdk-ext-core",
5
5
  "keywords": [
6
6
  "servicenow",
@@ -47,7 +47,7 @@
47
47
  "@servicenow/sdk-cli": "4.9.2",
48
48
  "@servicenow/sdk-cli-core": "3.0.3",
49
49
  "@servicenow/sdk-core": "4.9.2",
50
- "@sonisoft/now-sdk-ext-core": "^5.0.1",
50
+ "@sonisoft/now-sdk-ext-core": "^6.0.0",
51
51
  "@sonisoft/sn-credstore": "^1.0.0",
52
52
  "zod": "^3.23.8"
53
53
  },