@iris-mcp/admin 0.0.0-stage → 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.
Files changed (44) hide show
  1. package/CHANGELOG.md +242 -0
  2. package/LICENSE +21 -0
  3. package/README.md +1030 -2
  4. package/dist/index.d.ts +11 -0
  5. package/dist/index.js +33 -0
  6. package/dist/prompts/auditSecurityPosture.d.ts +12 -0
  7. package/dist/prompts/auditSecurityPosture.js +52 -0
  8. package/dist/prompts/index.d.ts +12 -0
  9. package/dist/prompts/index.js +16 -0
  10. package/dist/prompts/provisionProjectEnvironment.d.ts +11 -0
  11. package/dist/prompts/provisionProjectEnvironment.js +48 -0
  12. package/dist/tools/audit.d.ts +42 -0
  13. package/dist/tools/audit.js +394 -0
  14. package/dist/tools/database.d.ts +14 -0
  15. package/dist/tools/database.js +179 -0
  16. package/dist/tools/index.d.ts +12 -0
  17. package/dist/tools/index.js +52 -0
  18. package/dist/tools/ldap.d.ts +33 -0
  19. package/dist/tools/ldap.js +252 -0
  20. package/dist/tools/mapping.d.ts +15 -0
  21. package/dist/tools/mapping.js +175 -0
  22. package/dist/tools/namespace.d.ts +14 -0
  23. package/dist/tools/namespace.js +145 -0
  24. package/dist/tools/oauth.d.ts +17 -0
  25. package/dist/tools/oauth.js +269 -0
  26. package/dist/tools/permission.d.ts +13 -0
  27. package/dist/tools/permission.js +70 -0
  28. package/dist/tools/presets.d.ts +20 -0
  29. package/dist/tools/presets.js +84 -0
  30. package/dist/tools/resource.d.ts +81 -0
  31. package/dist/tools/resource.js +402 -0
  32. package/dist/tools/role.d.ts +14 -0
  33. package/dist/tools/role.js +139 -0
  34. package/dist/tools/service.d.ts +19 -0
  35. package/dist/tools/service.js +199 -0
  36. package/dist/tools/ssl.d.ts +14 -0
  37. package/dist/tools/ssl.js +201 -0
  38. package/dist/tools/user.d.ts +20 -0
  39. package/dist/tools/user.js +326 -0
  40. package/dist/tools/webapp.d.ts +20 -0
  41. package/dist/tools/webapp.js +268 -0
  42. package/dist/tools/x509.d.ts +42 -0
  43. package/dist/tools/x509.js +224 -0
  44. package/package.json +58 -3
@@ -0,0 +1,179 @@
1
+ /**
2
+ * Database management tools for the IRIS Administration MCP server.
3
+ *
4
+ * Provides two tools for managing IRIS databases via the custom REST endpoint:
5
+ * - {@link databaseManageTool} — Create, modify, or delete a database
6
+ * - {@link databaseListTool} — List all databases with size, free space, and mount status
7
+ *
8
+ * All tools call the custom REST service at `/api/executemcp/v2/config/database`.
9
+ * Operations execute in %SYS namespace on the IRIS server.
10
+ */
11
+ import { IrisApiError } from "@iris-mcp/shared";
12
+ import { z } from "zod";
13
+ /** Base URL for the custom ExecuteMCPv2 REST service. */
14
+ const BASE_URL = "/api/executemcp/v2";
15
+ // ── iris_database_manage ────────────────────────────────────────
16
+ export const databaseManageTool = {
17
+ name: "iris_database_manage",
18
+ title: "Manage Database",
19
+ description: "Create, modify, or delete an IRIS database. For 'create', directory is required. " +
20
+ "For 'modify', only provided fields are updated. For 'delete', only the name is needed. " +
21
+ "Note: Deletion removes the database from the IRIS configuration but does NOT cancel " +
22
+ "pending background work (e.g., extent-index rebuilds) that may have been scheduled " +
23
+ "against the deleted directory. The IRIS console may log alerts for such operations " +
24
+ "post-delete; these are informational and do not indicate tool failure.",
25
+ inputSchema: z.object({
26
+ action: z
27
+ .enum(["create", "modify", "delete"])
28
+ .describe("Action to perform on the database"),
29
+ name: z
30
+ .string()
31
+ .describe("Database name (e.g., 'MYAPPDATA', 'USER')"),
32
+ directory: z
33
+ .string()
34
+ .optional()
35
+ .describe("Database directory path (required for create)"),
36
+ size: z
37
+ .number()
38
+ .optional()
39
+ .describe("Initial size in MB"),
40
+ maxSize: z
41
+ .number()
42
+ .optional()
43
+ .describe("Maximum size in MB (0 = unlimited)"),
44
+ expansionSize: z
45
+ .number()
46
+ .optional()
47
+ .describe("Growth increment in MB"),
48
+ globalJournalState: z
49
+ .number()
50
+ .optional()
51
+ .describe("Journal state for globals"),
52
+ mountRequired: z
53
+ .boolean()
54
+ .optional()
55
+ .describe("Whether mounting is required at startup"),
56
+ mountAtStartup: z
57
+ .boolean()
58
+ .optional()
59
+ .describe("Whether to auto-mount at startup"),
60
+ readOnly: z
61
+ .boolean()
62
+ .optional()
63
+ .describe("Whether database is read-only"),
64
+ resource: z
65
+ .string()
66
+ .optional()
67
+ .describe("Security resource for access control"),
68
+ }),
69
+ annotations: {
70
+ destructiveHint: true,
71
+ readOnlyHint: false,
72
+ idempotentHint: false,
73
+ openWorldHint: false,
74
+ },
75
+ scope: "SYS",
76
+ handler: async (args, ctx) => {
77
+ const { action, name, directory, size, maxSize, expansionSize, globalJournalState, mountRequired, mountAtStartup, readOnly, resource, } = args;
78
+ const body = { action, name };
79
+ if (directory !== undefined)
80
+ body.directory = directory;
81
+ if (size !== undefined)
82
+ body.size = size;
83
+ if (maxSize !== undefined)
84
+ body.maxSize = maxSize;
85
+ if (expansionSize !== undefined)
86
+ body.expansionSize = expansionSize;
87
+ if (globalJournalState !== undefined)
88
+ body.globalJournalState = globalJournalState;
89
+ if (mountRequired !== undefined)
90
+ body.mountRequired = mountRequired;
91
+ if (mountAtStartup !== undefined)
92
+ body.mountAtStartup = mountAtStartup;
93
+ if (readOnly !== undefined)
94
+ body.readOnly = readOnly;
95
+ if (resource !== undefined)
96
+ body.resource = resource;
97
+ const path = `${BASE_URL}/config/database`;
98
+ try {
99
+ const response = await ctx.http.post(path, body);
100
+ const result = response.result;
101
+ return {
102
+ content: [
103
+ { type: "text", text: JSON.stringify(result, null, 2) },
104
+ ],
105
+ structuredContent: result,
106
+ };
107
+ }
108
+ catch (error) {
109
+ if (error instanceof IrisApiError) {
110
+ return {
111
+ content: [
112
+ {
113
+ type: "text",
114
+ text: `Error managing database '${name}': ${error.message}`,
115
+ },
116
+ ],
117
+ isError: true,
118
+ };
119
+ }
120
+ throw error;
121
+ }
122
+ },
123
+ };
124
+ // ── iris_database_list ──────────────────────────────────────────
125
+ export const databaseListTool = {
126
+ name: "iris_database_list",
127
+ title: "List Databases",
128
+ description: "List all IRIS databases with size, free space, and mount status. " +
129
+ "Returns database name, directory, size, max size, expansion size, mount status, and other configuration.",
130
+ inputSchema: z.object({
131
+ cursor: z
132
+ .string()
133
+ .optional()
134
+ .describe("Pagination cursor from a previous response's nextCursor field"),
135
+ }),
136
+ annotations: {
137
+ readOnlyHint: true,
138
+ destructiveHint: false,
139
+ idempotentHint: true,
140
+ openWorldHint: false,
141
+ },
142
+ scope: "SYS",
143
+ handler: async (args, ctx) => {
144
+ const { cursor } = args;
145
+ const path = `${BASE_URL}/config/database`;
146
+ try {
147
+ const response = await ctx.http.get(path);
148
+ const rawResult = response.result;
149
+ const allDatabases = Array.isArray(rawResult) ? rawResult : [];
150
+ const { page, nextCursor } = ctx.paginate(allDatabases, cursor);
151
+ const result = {
152
+ databases: page,
153
+ count: page.length,
154
+ ...(nextCursor ? { nextCursor } : {}),
155
+ };
156
+ return {
157
+ content: [
158
+ { type: "text", text: JSON.stringify(result, null, 2) },
159
+ ],
160
+ structuredContent: result,
161
+ };
162
+ }
163
+ catch (error) {
164
+ if (error instanceof IrisApiError) {
165
+ return {
166
+ content: [
167
+ {
168
+ type: "text",
169
+ text: `Error listing databases: ${error.message}`,
170
+ },
171
+ ],
172
+ isError: true,
173
+ };
174
+ }
175
+ throw error;
176
+ }
177
+ },
178
+ };
179
+ //# sourceMappingURL=database.js.map
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Tool definitions for the IRIS Administration MCP server.
3
+ *
4
+ * Exports all tool definitions to be registered with
5
+ * {@link McpServerBase}. Includes namespace, database, mapping,
6
+ * user, role, resource, permission, and web application management
7
+ * tools from Stories 4.2+.
8
+ */
9
+ import type { ToolDefinition } from "@iris-mcp/shared";
10
+ /** All tool definitions registered by the iris-admin-mcp server. */
11
+ export declare const tools: ToolDefinition[];
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,52 @@
1
+ /**
2
+ * Tool definitions for the IRIS Administration MCP server.
3
+ *
4
+ * Exports all tool definitions to be registered with
5
+ * {@link McpServerBase}. Includes namespace, database, mapping,
6
+ * user, role, resource, permission, and web application management
7
+ * tools from Stories 4.2+.
8
+ */
9
+ import { namespaceManageTool, namespaceListTool } from "./namespace.js";
10
+ import { databaseManageTool, databaseListTool } from "./database.js";
11
+ import { mappingManageTool, mappingListTool } from "./mapping.js";
12
+ import { userManageTool, userGetTool, userRolesTool, userPasswordTool, } from "./user.js";
13
+ import { roleManageTool, roleListTool } from "./role.js";
14
+ import { resourceManageTool, resourceListTool } from "./resource.js";
15
+ import { permissionCheckTool } from "./permission.js";
16
+ import { webappManageTool, webappGetTool, webappListTool, } from "./webapp.js";
17
+ import { sslManageTool, sslListTool } from "./ssl.js";
18
+ import { oauthManageTool, oauthListTool } from "./oauth.js";
19
+ import { serviceManageTool } from "./service.js";
20
+ import { ldapManageTool } from "./ldap.js";
21
+ import { x509ManageTool } from "./x509.js";
22
+ import { auditManageTool } from "./audit.js";
23
+ /** All tool definitions registered by the iris-admin-mcp server. */
24
+ export const tools = [
25
+ namespaceManageTool,
26
+ namespaceListTool,
27
+ databaseManageTool,
28
+ databaseListTool,
29
+ mappingManageTool,
30
+ mappingListTool,
31
+ userManageTool,
32
+ userGetTool,
33
+ userRolesTool,
34
+ userPasswordTool,
35
+ roleManageTool,
36
+ roleListTool,
37
+ resourceManageTool,
38
+ resourceListTool,
39
+ permissionCheckTool,
40
+ webappManageTool,
41
+ webappGetTool,
42
+ webappListTool,
43
+ sslManageTool,
44
+ sslListTool,
45
+ oauthManageTool,
46
+ oauthListTool,
47
+ serviceManageTool,
48
+ ldapManageTool,
49
+ x509ManageTool,
50
+ auditManageTool,
51
+ ];
52
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,33 @@
1
+ /**
2
+ * IRIS LDAP configuration tool for the IRIS Administration MCP server.
3
+ *
4
+ * Provides {@link ldapManageTool} — a single multi-action tool to list,
5
+ * inspect, create, modify, delete, and validity-test LDAP configurations for
6
+ * delegated authentication via the custom REST endpoint
7
+ * `/api/executemcp/v2/security/ldap`. Operations execute in the `%SYS`
8
+ * namespace on the IRIS server (backed by `Security.LDAPConfigs`).
9
+ *
10
+ * **Governed write tool (Epic 15, Story 15.2).** The `mutates` classification
11
+ * map below classifies all six actions: `list`/`get`/`test` are reads (enabled
12
+ * by default), while `create`/`modify`/`delete` are writes that the governance
13
+ * layer default-DISABLES until an operator opts in via `IRIS_GOVERNANCE`. The
14
+ * tool does NOT declare a `server` field — the framework injects it
15
+ * (architecture decision D2).
16
+ *
17
+ * **`test` scope (AC 15.2.5, Rule #16):** a live probe confirmed neither
18
+ * `Security.LDAPConfigs` nor `%SYS.LDAP` exposes a single high-level
19
+ * connection-test class method — only low-level primitives (`Init`, `Connect`,
20
+ * `Binds`/`SimpleBinds`, `SearchExts`). Rather than fabricate a connection,
21
+ * `test` is scoped DOWN to a non-mutating **config-validity check**: the config
22
+ * exists, its required fields are populated, and its host names are
23
+ * syntactically valid. Classified `read` (available by default for
24
+ * diagnostics).
25
+ *
26
+ * **Bind-password redaction (AC 15.2.4, Rule #9):** `LDAPSearchPassword` is the
27
+ * one secret field on the config. The live probe confirmed
28
+ * `Security.LDAPConfigs.Get()` DOES populate it, so it is redacted server-side
29
+ * (defense in depth) AND never surfaced by this tool's output mapping.
30
+ */
31
+ import { type ToolDefinition } from "@iris-mcp/shared";
32
+ export declare const ldapManageTool: ToolDefinition;
33
+ //# sourceMappingURL=ldap.d.ts.map
@@ -0,0 +1,252 @@
1
+ /**
2
+ * IRIS LDAP configuration tool for the IRIS Administration MCP server.
3
+ *
4
+ * Provides {@link ldapManageTool} — a single multi-action tool to list,
5
+ * inspect, create, modify, delete, and validity-test LDAP configurations for
6
+ * delegated authentication via the custom REST endpoint
7
+ * `/api/executemcp/v2/security/ldap`. Operations execute in the `%SYS`
8
+ * namespace on the IRIS server (backed by `Security.LDAPConfigs`).
9
+ *
10
+ * **Governed write tool (Epic 15, Story 15.2).** The `mutates` classification
11
+ * map below classifies all six actions: `list`/`get`/`test` are reads (enabled
12
+ * by default), while `create`/`modify`/`delete` are writes that the governance
13
+ * layer default-DISABLES until an operator opts in via `IRIS_GOVERNANCE`. The
14
+ * tool does NOT declare a `server` field — the framework injects it
15
+ * (architecture decision D2).
16
+ *
17
+ * **`test` scope (AC 15.2.5, Rule #16):** a live probe confirmed neither
18
+ * `Security.LDAPConfigs` nor `%SYS.LDAP` exposes a single high-level
19
+ * connection-test class method — only low-level primitives (`Init`, `Connect`,
20
+ * `Binds`/`SimpleBinds`, `SearchExts`). Rather than fabricate a connection,
21
+ * `test` is scoped DOWN to a non-mutating **config-validity check**: the config
22
+ * exists, its required fields are populated, and its host names are
23
+ * syntactically valid. Classified `read` (available by default for
24
+ * diagnostics).
25
+ *
26
+ * **Bind-password redaction (AC 15.2.4, Rule #9):** `LDAPSearchPassword` is the
27
+ * one secret field on the config. The live probe confirmed
28
+ * `Security.LDAPConfigs.Get()` DOES populate it, so it is redacted server-side
29
+ * (defense in depth) AND never surfaced by this tool's output mapping.
30
+ */
31
+ import { IrisApiError } from "@iris-mcp/shared";
32
+ import { z } from "zod";
33
+ /** Base URL for the custom ExecuteMCPv2 REST service. */
34
+ const BASE_URL = "/api/executemcp/v2";
35
+ // ── iris_ldap_manage ────────────────────────────────────────────
36
+ export const ldapManageTool = {
37
+ name: "iris_ldap_manage",
38
+ title: "Manage IRIS LDAP Configuration",
39
+ description: "List, inspect, create, modify, delete, and validity-test IRIS LDAP " +
40
+ "configurations for delegated authentication (backed by " +
41
+ "Security.LDAPConfigs in %SYS). Actions: 'list' (all configs), 'get' (one " +
42
+ "config's properties — requires name), 'test' (non-mutating validity check: " +
43
+ "config exists, required fields present, host syntactically valid — requires " +
44
+ "name), 'create'/'modify' (requires name + settings), 'delete' (requires " +
45
+ "name). The mutating actions (create/modify/delete) are opt-in under tool " +
46
+ "governance and are disabled by default until enabled via IRIS_GOVERNANCE. " +
47
+ "NOTE: IRIS exposes no high-level LDAP connection-test API, so 'test' is a " +
48
+ "config-validity check, NOT a live bind to the LDAP server. The bind search " +
49
+ "password (LDAPSearchPassword) is NEVER returned in any response — it is " +
50
+ "redacted. Settings fields (for create/modify): 'description', 'ldapBaseDN' " +
51
+ "(required for create), 'ldapBaseDNForGroups' (required for create), " +
52
+ "'ldapHostNames' (space-separated host[:port] list), 'ldapSearchUsername', " +
53
+ "'ldapSearchPassword' (write-only), 'ldapClientTimeout', 'ldapServerTimeout', " +
54
+ "'ldapUniqueDNIdentifier', 'ldapFlags' (bitmask: bit0 ActiveDirectory, bit1 " +
55
+ "SSL/TLS, bit3 UseGroups, bit6 enabled, bit7 KerberosOnly), 'ldapCACertFile'.",
56
+ inputSchema: z.object({
57
+ action: z
58
+ .enum(["list", "get", "create", "modify", "delete", "test"])
59
+ .describe("Action to perform on the LDAP configuration(s)"),
60
+ name: z
61
+ .string()
62
+ .optional()
63
+ .describe("LDAP configuration name (required for get/create/modify/delete/test)"),
64
+ settings: z
65
+ .object({
66
+ description: z
67
+ .string()
68
+ .optional()
69
+ .describe("LDAP configuration description"),
70
+ ldapBaseDN: z
71
+ .string()
72
+ .optional()
73
+ .describe("Search base DN (e.g. 'DC=example,DC=com') — required for create"),
74
+ ldapBaseDNForGroups: z
75
+ .string()
76
+ .optional()
77
+ .describe("Search base DN for groups — required for create"),
78
+ ldapHostNames: z
79
+ .string()
80
+ .optional()
81
+ .describe("LDAP server host name(s), space-separated, optional :port suffix"),
82
+ ldapSearchUsername: z
83
+ .string()
84
+ .optional()
85
+ .describe("Username of the LDAP search user"),
86
+ ldapSearchPassword: z
87
+ .string()
88
+ .optional()
89
+ .describe("Password of the LDAP search user (write-only; never returned)"),
90
+ ldapClientTimeout: z
91
+ .number()
92
+ .optional()
93
+ .describe("Client timeout (ms) before a Server Down is returned"),
94
+ ldapServerTimeout: z
95
+ .number()
96
+ .optional()
97
+ .describe("Server timeout (ms) before the connection is terminated"),
98
+ ldapUniqueDNIdentifier: z
99
+ .string()
100
+ .optional()
101
+ .describe("Unique per-user identifying attribute (e.g. 'sAMAccountName')"),
102
+ ldapFlags: z
103
+ .number()
104
+ .optional()
105
+ .describe("LDAP connection flags bitmask (bit0 ActiveDirectory, bit1 SSL/TLS, " +
106
+ "bit3 UseGroups, bit6 enabled, bit7 KerberosOnly)"),
107
+ ldapCACertFile: z
108
+ .string()
109
+ .optional()
110
+ .describe("Path to the CA certificate file (PEM) for TLS (Unix only)"),
111
+ })
112
+ .optional()
113
+ .describe("Settings to apply for the 'create'/'modify' actions"),
114
+ namespace: z
115
+ .string()
116
+ .optional()
117
+ .describe("Namespace override (LDAP configs are %SYS-scoped; usually omit)"),
118
+ cursor: z
119
+ .string()
120
+ .optional()
121
+ .describe("Pagination cursor from a previous 'list' response's nextCursor field"),
122
+ }),
123
+ annotations: {
124
+ // The tool can mutate (create/modify/delete). MCP annotations are
125
+ // tool-scoped; the per-action read/write distinction is realized through
126
+ // `mutates` below.
127
+ readOnlyHint: false,
128
+ destructiveHint: true,
129
+ idempotentHint: false,
130
+ openWorldHint: false,
131
+ },
132
+ scope: "SYS",
133
+ // Governance classification (Story 15.0 strict contract): EVERY action key is
134
+ // classified because none are in the frozen Epic-14 baseline. Reads default
135
+ // enabled; writes default DISABLED (opt-in via IRIS_GOVERNANCE). `test` is a
136
+ // non-mutating config-validity check → read (AC 15.2.5).
137
+ mutates: {
138
+ list: "read",
139
+ get: "read",
140
+ test: "read",
141
+ create: "write",
142
+ modify: "write",
143
+ delete: "write",
144
+ },
145
+ handler: async (args, ctx) => {
146
+ const { action, name, settings, cursor } = args;
147
+ const path = `${BASE_URL}/security/ldap`;
148
+ try {
149
+ if (action === "list") {
150
+ const response = await ctx.http.get(path);
151
+ const rawResult = response.result;
152
+ const allConfigs = Array.isArray(rawResult) ? rawResult : [];
153
+ const { page, nextCursor } = ctx.paginate(allConfigs, cursor);
154
+ const result = {
155
+ configs: page,
156
+ count: page.length,
157
+ ...(nextCursor ? { nextCursor } : {}),
158
+ };
159
+ return {
160
+ content: [
161
+ { type: "text", text: JSON.stringify(result, null, 2) },
162
+ ],
163
+ structuredContent: result,
164
+ };
165
+ }
166
+ if (action === "get" || action === "test") {
167
+ // `name` is required for get/test. For get, an absent ?name= would make
168
+ // the server return the whole inventory (wrong shape under a `get`
169
+ // action); for test there is nothing to validate without a name. Reject
170
+ // up front so the caller gets a clear error.
171
+ if (name === undefined || name === "") {
172
+ return {
173
+ content: [
174
+ {
175
+ type: "text",
176
+ text: `Error: 'name' is required for the '${action}' action.`,
177
+ },
178
+ ],
179
+ isError: true,
180
+ };
181
+ }
182
+ const qsAction = action === "test" ? "&test=1" : "";
183
+ const getPath = `${path}?name=${encodeURIComponent(name)}${qsAction}`;
184
+ const response = await ctx.http.get(getPath);
185
+ const result = response.result;
186
+ return {
187
+ content: [
188
+ { type: "text", text: JSON.stringify(result, null, 2) },
189
+ ],
190
+ structuredContent: result,
191
+ };
192
+ }
193
+ // create / modify / delete — POST a mutating request body.
194
+ // `name` is required for every write action.
195
+ if (name === undefined || name === "") {
196
+ return {
197
+ content: [
198
+ {
199
+ type: "text",
200
+ text: `Error: 'name' is required for the '${action}' action.`,
201
+ },
202
+ ],
203
+ isError: true,
204
+ };
205
+ }
206
+ // create/modify must apply at least one field; an empty settings object
207
+ // would issue a no-op the server may report as success — reject it up
208
+ // front so the caller is not told a do-nothing call succeeded.
209
+ if ((action === "create" || action === "modify") &&
210
+ (settings === undefined || Object.keys(settings).length === 0)) {
211
+ return {
212
+ content: [
213
+ {
214
+ type: "text",
215
+ text: `Error: the '${action}' action requires a non-empty 'settings' object.`,
216
+ },
217
+ ],
218
+ isError: true,
219
+ };
220
+ }
221
+ const body = { action, name };
222
+ if ((action === "create" || action === "modify") &&
223
+ settings !== undefined) {
224
+ body.settings = settings;
225
+ }
226
+ const response = await ctx.http.post(path, body);
227
+ const result = response.result;
228
+ return {
229
+ content: [
230
+ { type: "text", text: JSON.stringify(result, null, 2) },
231
+ ],
232
+ structuredContent: result,
233
+ };
234
+ }
235
+ catch (error) {
236
+ if (error instanceof IrisApiError) {
237
+ const label = name ? `LDAP config '${name}'` : "LDAP configs";
238
+ return {
239
+ content: [
240
+ {
241
+ type: "text",
242
+ text: `Error performing '${action}' on ${label}: ${error.message}`,
243
+ },
244
+ ],
245
+ isError: true,
246
+ };
247
+ }
248
+ throw error;
249
+ }
250
+ },
251
+ };
252
+ //# sourceMappingURL=ldap.js.map
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Namespace mapping tools for the IRIS Administration MCP server.
3
+ *
4
+ * Provides two tools for managing global, routine, and package mappings
5
+ * between IRIS namespaces via the custom REST endpoint:
6
+ * - {@link mappingManageTool} — Create or delete a mapping
7
+ * - {@link mappingListTool} — List all mappings of a given type for a namespace
8
+ *
9
+ * All tools call the custom REST service at `/api/executemcp/v2/config/mapping/:type`.
10
+ * Operations execute in %SYS namespace on the IRIS server.
11
+ */
12
+ import { type ToolDefinition } from "@iris-mcp/shared";
13
+ export declare const mappingManageTool: ToolDefinition;
14
+ export declare const mappingListTool: ToolDefinition;
15
+ //# sourceMappingURL=mapping.d.ts.map