@utaba/ucm-mcp-server 6.5.0 → 6.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.
Files changed (198) hide show
  1. package/dist/clients/UcmLocalApiClient.d.ts +175 -2
  2. package/dist/clients/UcmLocalApiClient.js +203 -3
  3. package/dist/index.js +1 -1
  4. package/dist/mcp-server/clients/UcmLocalApiClient.d.ts +399 -0
  5. package/dist/mcp-server/clients/UcmLocalApiClient.js +719 -0
  6. package/dist/mcp-server/index.d.ts +3 -0
  7. package/dist/mcp-server/index.js +68 -0
  8. package/dist/mcp-server/interfaces/ILogger.d.ts +8 -0
  9. package/dist/mcp-server/interfaces/ILogger.js +4 -0
  10. package/dist/mcp-server/interfaces/IMcpTool.d.ts +7 -0
  11. package/dist/mcp-server/interfaces/IMcpTool.js +3 -0
  12. package/dist/mcp-server/logging/ConsoleLogger.d.ts +16 -0
  13. package/dist/mcp-server/logging/ConsoleLogger.js +45 -0
  14. package/dist/mcp-server/logging/LoggerFactory.d.ts +9 -0
  15. package/dist/mcp-server/logging/LoggerFactory.js +12 -0
  16. package/dist/mcp-server/server/McpConfig.d.ts +26 -0
  17. package/dist/mcp-server/server/McpConfig.js +90 -0
  18. package/dist/mcp-server/server/McpHandler.d.ts +12 -0
  19. package/dist/mcp-server/server/McpHandler.js +84 -0
  20. package/dist/mcp-server/server/McpServer.d.ts +15 -0
  21. package/dist/mcp-server/server/McpServer.js +49 -0
  22. package/dist/mcp-server/server/ToolRegistry.d.ts +23 -0
  23. package/dist/mcp-server/server/ToolRegistry.js +169 -0
  24. package/dist/mcp-server/tools/authorization/ListAuthorizationsTool.d.ts +21 -0
  25. package/dist/mcp-server/tools/authorization/ListAuthorizationsTool.js +146 -0
  26. package/dist/mcp-server/tools/authorization/SignOutTool.d.ts +23 -0
  27. package/dist/mcp-server/tools/authorization/SignOutTool.js +128 -0
  28. package/dist/mcp-server/tools/base/BaseToolController.d.ts +19 -0
  29. package/dist/mcp-server/tools/base/BaseToolController.js +58 -0
  30. package/dist/mcp-server/tools/connections/AccessConnectionTool.d.ts +21 -0
  31. package/dist/mcp-server/tools/connections/AccessConnectionTool.js +107 -0
  32. package/dist/mcp-server/tools/connections/CallRemoteToolTool.d.ts +22 -0
  33. package/dist/mcp-server/tools/connections/CallRemoteToolTool.js +124 -0
  34. package/dist/mcp-server/tools/core/DeleteArtifactTool.d.ts +11 -0
  35. package/dist/mcp-server/tools/core/DeleteArtifactTool.js +83 -0
  36. package/dist/mcp-server/tools/core/EditArtifactMetadataTool.d.ts +12 -0
  37. package/dist/mcp-server/tools/core/EditArtifactMetadataTool.js +173 -0
  38. package/dist/mcp-server/tools/core/GetArtifactTool.d.ts +13 -0
  39. package/dist/mcp-server/tools/core/GetArtifactTool.js +124 -0
  40. package/dist/mcp-server/tools/core/GetArtifactVersionsTool.d.ts +11 -0
  41. package/dist/mcp-server/tools/core/GetArtifactVersionsTool.js +63 -0
  42. package/dist/mcp-server/tools/core/GetChunkTool.d.ts +11 -0
  43. package/dist/mcp-server/tools/core/GetChunkTool.js +56 -0
  44. package/dist/mcp-server/tools/core/ListArtifactsTool.d.ts +11 -0
  45. package/dist/mcp-server/tools/core/ListArtifactsTool.js +84 -0
  46. package/dist/mcp-server/tools/core/MoveArtifactTool.d.ts +12 -0
  47. package/dist/mcp-server/tools/core/MoveArtifactTool.js +104 -0
  48. package/dist/mcp-server/tools/core/PublishArtifactFromFileTool.d.ts +15 -0
  49. package/dist/mcp-server/tools/core/PublishArtifactFromFileTool.js +277 -0
  50. package/dist/mcp-server/tools/core/PublishArtifactTool.d.ts +13 -0
  51. package/dist/mcp-server/tools/core/PublishArtifactTool.js +218 -0
  52. package/dist/mcp-server/tools/core/SearchArtifactsTool.d.ts +11 -0
  53. package/dist/mcp-server/tools/core/SearchArtifactsTool.js +137 -0
  54. package/dist/mcp-server/tools/list/ListNamespaceController.d.ts +1 -0
  55. package/dist/mcp-server/tools/list/ListNamespaceController.js +8 -0
  56. package/dist/mcp-server/tools/memory-graph/GraphCreateEntitiesTool.d.ts +14 -0
  57. package/dist/mcp-server/tools/memory-graph/GraphCreateEntitiesTool.js +58 -0
  58. package/dist/mcp-server/tools/memory-graph/GraphCreateRelationshipsTool.d.ts +14 -0
  59. package/dist/mcp-server/tools/memory-graph/GraphCreateRelationshipsTool.js +57 -0
  60. package/dist/mcp-server/tools/memory-graph/GraphCreateTool.d.ts +14 -0
  61. package/dist/mcp-server/tools/memory-graph/GraphCreateTool.js +64 -0
  62. package/dist/mcp-server/tools/memory-graph/GraphDeleteEntitiesTool.d.ts +14 -0
  63. package/dist/mcp-server/tools/memory-graph/GraphDeleteEntitiesTool.js +45 -0
  64. package/dist/mcp-server/tools/memory-graph/GraphDeleteRelationshipsTool.d.ts +14 -0
  65. package/dist/mcp-server/tools/memory-graph/GraphDeleteRelationshipsTool.js +45 -0
  66. package/dist/mcp-server/tools/memory-graph/GraphExploreTool.d.ts +14 -0
  67. package/dist/mcp-server/tools/memory-graph/GraphExploreTool.js +73 -0
  68. package/dist/mcp-server/tools/memory-graph/GraphFindEntitiesTool.d.ts +14 -0
  69. package/dist/mcp-server/tools/memory-graph/GraphFindEntitiesTool.js +68 -0
  70. package/dist/mcp-server/tools/memory-graph/GraphFindPathsTool.d.ts +14 -0
  71. package/dist/mcp-server/tools/memory-graph/GraphFindPathsTool.js +62 -0
  72. package/dist/mcp-server/tools/memory-graph/GraphGetEntityTool.d.ts +14 -0
  73. package/dist/mcp-server/tools/memory-graph/GraphGetEntityTool.js +49 -0
  74. package/dist/mcp-server/tools/memory-graph/GraphGetRelationshipsTool.d.ts +14 -0
  75. package/dist/mcp-server/tools/memory-graph/GraphGetRelationshipsTool.js +62 -0
  76. package/dist/mcp-server/tools/memory-graph/GraphListTemplatesTool.d.ts +14 -0
  77. package/dist/mcp-server/tools/memory-graph/GraphListTemplatesTool.js +34 -0
  78. package/dist/mcp-server/tools/memory-graph/GraphListTool.d.ts +14 -0
  79. package/dist/mcp-server/tools/memory-graph/GraphListTool.js +45 -0
  80. package/dist/mcp-server/tools/memory-graph/GraphOpenTool.d.ts +15 -0
  81. package/dist/mcp-server/tools/memory-graph/GraphOpenTool.js +50 -0
  82. package/dist/mcp-server/tools/memory-graph/GraphProposeVocabularyTool.d.ts +14 -0
  83. package/dist/mcp-server/tools/memory-graph/GraphProposeVocabularyTool.js +108 -0
  84. package/dist/mcp-server/tools/memory-graph/GraphSearchTool.d.ts +14 -0
  85. package/dist/mcp-server/tools/memory-graph/GraphSearchTool.js +94 -0
  86. package/dist/mcp-server/tools/memory-graph/GraphTraverseTool.d.ts +14 -0
  87. package/dist/mcp-server/tools/memory-graph/GraphTraverseTool.js +114 -0
  88. package/dist/mcp-server/tools/memory-graph/GraphUpdateEntitiesTool.d.ts +14 -0
  89. package/dist/mcp-server/tools/memory-graph/GraphUpdateEntitiesTool.js +58 -0
  90. package/dist/mcp-server/tools/memory-graph/KnowledgeSetListTool.d.ts +14 -0
  91. package/dist/mcp-server/tools/memory-graph/KnowledgeSetListTool.js +25 -0
  92. package/dist/mcp-server/tools/memory-graph/KnowledgeSetOpenTool.d.ts +14 -0
  93. package/dist/mcp-server/tools/memory-graph/KnowledgeSetOpenTool.js +31 -0
  94. package/dist/mcp-server/tools/repository/CreateRepositoryTool.d.ts +12 -0
  95. package/dist/mcp-server/tools/repository/CreateRepositoryTool.js +116 -0
  96. package/dist/mcp-server/tools/repository/GetRepositoryTool.d.ts +12 -0
  97. package/dist/mcp-server/tools/repository/GetRepositoryTool.js +85 -0
  98. package/dist/mcp-server/tools/repository/UpdateRepositoryTool.d.ts +12 -0
  99. package/dist/mcp-server/tools/repository/UpdateRepositoryTool.js +115 -0
  100. package/dist/mcp-server/tools/sharepoint/SharePointListConnectionsTool.d.ts +19 -0
  101. package/dist/mcp-server/tools/sharepoint/SharePointListConnectionsTool.js +90 -0
  102. package/dist/mcp-server/tools/sharepoint/SharePointListFoldersTool.d.ts +21 -0
  103. package/dist/mcp-server/tools/sharepoint/SharePointListFoldersTool.js +133 -0
  104. package/dist/mcp-server/tools/sharepoint/SharePointReadFileTool.d.ts +22 -0
  105. package/dist/mcp-server/tools/sharepoint/SharePointReadFileTool.js +146 -0
  106. package/dist/mcp-server/tools/sharepoint/SharePointReadRelatedFileTool.d.ts +18 -0
  107. package/dist/mcp-server/tools/sharepoint/SharePointReadRelatedFileTool.js +108 -0
  108. package/dist/mcp-server/tools/sharepoint/SharePointSearchTool.d.ts +22 -0
  109. package/dist/mcp-server/tools/sharepoint/SharePointSearchTool.js +125 -0
  110. package/dist/mcp-server/tools/utility/AuthorIndexTool.d.ts +11 -0
  111. package/dist/mcp-server/tools/utility/AuthorIndexTool.js +49 -0
  112. package/dist/mcp-server/tools/utility/AuthorRecentsTool.d.ts +11 -0
  113. package/dist/mcp-server/tools/utility/AuthorRecentsTool.js +49 -0
  114. package/dist/mcp-server/tools/utility/ListRepositoriesTool.d.ts +11 -0
  115. package/dist/mcp-server/tools/utility/ListRepositoriesTool.js +68 -0
  116. package/dist/mcp-server/tools/utility/QuickstartTool.d.ts +11 -0
  117. package/dist/mcp-server/tools/utility/QuickstartTool.js +36 -0
  118. package/dist/mcp-server/types/UcmApiTypes.d.ts +40 -0
  119. package/dist/mcp-server/types/UcmApiTypes.js +4 -0
  120. package/dist/mcp-server/utils/McpErrorHandler.d.ts +25 -0
  121. package/dist/mcp-server/utils/McpErrorHandler.js +67 -0
  122. package/dist/mcp-server/utils/PathUtils.d.ts +61 -0
  123. package/dist/mcp-server/utils/PathUtils.js +178 -0
  124. package/dist/mcp-server/utils/ResponseChunker.d.ts +25 -0
  125. package/dist/mcp-server/utils/ResponseChunker.js +79 -0
  126. package/dist/mcp-server/utils/SharePointErrorHandler.d.ts +34 -0
  127. package/dist/mcp-server/utils/SharePointErrorHandler.js +55 -0
  128. package/dist/schemas/memory-graph-tool-schemas.d.ts +789 -0
  129. package/dist/schemas/memory-graph-tool-schemas.js +181 -0
  130. package/dist/server/ToolRegistry.js +42 -8
  131. package/dist/tools/authorization/ListAuthorizationsTool.js +2 -2
  132. package/dist/tools/authorization/SignOutTool.js +2 -2
  133. package/dist/tools/connections/AccessConnectionTool.js +8 -6
  134. package/dist/tools/connections/CallRemoteToolTool.js +4 -4
  135. package/dist/tools/core/DeleteArtifactTool.js +5 -4
  136. package/dist/tools/core/EditArtifactMetadataTool.js +1 -1
  137. package/dist/tools/core/GetArtifactTool.js +1 -1
  138. package/dist/tools/core/GetArtifactVersionsTool.js +1 -1
  139. package/dist/tools/core/GetChunkTool.js +1 -1
  140. package/dist/tools/core/ListArtifactsTool.js +1 -1
  141. package/dist/tools/core/MoveArtifactTool.js +1 -1
  142. package/dist/tools/core/PublishArtifactFromFileTool.js +1 -1
  143. package/dist/tools/core/PublishArtifactTool.js +2 -2
  144. package/dist/tools/core/SearchArtifactsTool.js +7 -6
  145. package/dist/tools/memory-graph/GraphCreateEntitiesTool.d.ts +11 -0
  146. package/dist/tools/memory-graph/GraphCreateEntitiesTool.js +56 -0
  147. package/dist/tools/memory-graph/GraphCreateRelationshipsTool.d.ts +11 -0
  148. package/dist/tools/memory-graph/GraphCreateRelationshipsTool.js +55 -0
  149. package/dist/tools/memory-graph/GraphCreateTool.d.ts +11 -0
  150. package/dist/tools/memory-graph/GraphCreateTool.js +62 -0
  151. package/dist/tools/memory-graph/GraphDeleteEntitiesTool.d.ts +11 -0
  152. package/dist/tools/memory-graph/GraphDeleteEntitiesTool.js +43 -0
  153. package/dist/tools/memory-graph/GraphDeleteRelationshipsTool.d.ts +11 -0
  154. package/dist/tools/memory-graph/GraphDeleteRelationshipsTool.js +43 -0
  155. package/dist/tools/memory-graph/GraphExploreTool.d.ts +11 -0
  156. package/dist/tools/memory-graph/GraphExploreTool.js +71 -0
  157. package/dist/tools/memory-graph/GraphFindEntitiesTool.d.ts +11 -0
  158. package/dist/tools/memory-graph/GraphFindEntitiesTool.js +66 -0
  159. package/dist/tools/memory-graph/GraphFindPathsTool.d.ts +11 -0
  160. package/dist/tools/memory-graph/GraphFindPathsTool.js +60 -0
  161. package/dist/tools/memory-graph/GraphGetEntityTool.d.ts +11 -0
  162. package/dist/tools/memory-graph/GraphGetEntityTool.js +47 -0
  163. package/dist/tools/memory-graph/GraphGetRelationshipsTool.d.ts +11 -0
  164. package/dist/tools/memory-graph/GraphGetRelationshipsTool.js +60 -0
  165. package/dist/tools/memory-graph/GraphGetStatsTool.d.ts +11 -0
  166. package/dist/tools/memory-graph/GraphGetStatsTool.js +42 -0
  167. package/dist/tools/memory-graph/GraphListTemplatesTool.d.ts +11 -0
  168. package/dist/tools/memory-graph/GraphListTemplatesTool.js +32 -0
  169. package/dist/tools/memory-graph/GraphListTool.d.ts +11 -0
  170. package/dist/tools/memory-graph/GraphListTool.js +43 -0
  171. package/dist/tools/memory-graph/GraphOpenTool.d.ts +12 -0
  172. package/dist/tools/memory-graph/GraphOpenTool.js +48 -0
  173. package/dist/tools/memory-graph/GraphProposeVocabularyTool.d.ts +11 -0
  174. package/dist/tools/memory-graph/GraphProposeVocabularyTool.js +104 -0
  175. package/dist/tools/memory-graph/GraphRemoveRelationshipsTool.d.ts +11 -0
  176. package/dist/tools/memory-graph/GraphRemoveRelationshipsTool.js +47 -0
  177. package/dist/tools/memory-graph/GraphSearchTool.d.ts +11 -0
  178. package/dist/tools/memory-graph/GraphSearchTool.js +92 -0
  179. package/dist/tools/memory-graph/GraphTraverseTool.d.ts +11 -0
  180. package/dist/tools/memory-graph/GraphTraverseTool.js +112 -0
  181. package/dist/tools/memory-graph/GraphUpdateEntitiesTool.d.ts +11 -0
  182. package/dist/tools/memory-graph/GraphUpdateEntitiesTool.js +56 -0
  183. package/dist/tools/memory-graph/KnowledgeSetListTool.d.ts +11 -0
  184. package/dist/tools/memory-graph/KnowledgeSetListTool.js +23 -0
  185. package/dist/tools/memory-graph/KnowledgeSetOpenTool.d.ts +11 -0
  186. package/dist/tools/memory-graph/KnowledgeSetOpenTool.js +29 -0
  187. package/dist/tools/repository/CreateRepositoryTool.js +10 -9
  188. package/dist/tools/repository/GetRepositoryTool.js +15 -15
  189. package/dist/tools/repository/UpdateRepositoryTool.js +10 -9
  190. package/dist/tools/sharepoint/SharePointListConnectionsTool.js +1 -1
  191. package/dist/tools/sharepoint/SharePointListFoldersTool.js +1 -1
  192. package/dist/tools/utility/AuthorIndexTool.js +6 -5
  193. package/dist/tools/utility/AuthorRecentsTool.js +6 -5
  194. package/dist/tools/utility/HealthCheckController.js +1 -1
  195. package/dist/tools/utility/ListRepositoriesTool.js +5 -4
  196. package/dist/utils/McpErrorHandler.js +1 -1
  197. package/package.json +1 -1
  198. package/package.json.backup +1 -1
@@ -0,0 +1,55 @@
1
+ import { BaseToolController } from '../base/BaseToolController.js';
2
+ import { McpError, McpErrorCode } from '../../utils/McpErrorHandler.js';
3
+ export class GraphCreateRelationshipsTool extends BaseToolController {
4
+ constructor(ucmClient, logger, publishingAuthorId) {
5
+ super(ucmClient, logger, publishingAuthorId);
6
+ }
7
+ get name() { return 'ucm_graph_create_relationships'; }
8
+ get description() {
9
+ return 'Create one or more relationships between entities in a Memory Graph. Each relationship requires a type (from vocabulary), source entity ID, and target entity ID. Pass a single item in the array for single operations.';
10
+ }
11
+ get inputSchema() {
12
+ return {
13
+ type: 'object',
14
+ properties: {
15
+ memoryGraphId: {
16
+ type: 'string',
17
+ description: 'The Memory Graph ID'
18
+ },
19
+ relationships: {
20
+ type: 'array',
21
+ description: 'Array of relationships to create',
22
+ items: {
23
+ type: 'object',
24
+ properties: {
25
+ relationshipType: { type: 'string', description: 'Relationship type (must exist in vocabulary)' },
26
+ sourceEntityId: { type: 'string', description: 'Source entity ID' },
27
+ targetEntityId: { type: 'string', description: 'Target entity ID' },
28
+ properties: { type: 'object', description: 'Optional relationship properties' }
29
+ },
30
+ required: ['relationshipType', 'sourceEntityId', 'targetEntityId']
31
+ }
32
+ }
33
+ },
34
+ required: ['memoryGraphId', 'relationships']
35
+ };
36
+ }
37
+ async handleExecute(params) {
38
+ const { memoryGraphId, relationships } = params;
39
+ this.logger.info('GraphCreateRelationshipsTool', `Creating ${relationships.length} relationships in graph: ${memoryGraphId}`);
40
+ try {
41
+ const result = await this.ucmClient.graphCreateRelationships(memoryGraphId, relationships);
42
+ return JSON.stringify(result);
43
+ }
44
+ catch (error) {
45
+ if (error.response?.status === 400) {
46
+ throw new McpError(McpErrorCode.InvalidParams, error.response.data?.message || 'Validation error');
47
+ }
48
+ if (error.response?.status === 404) {
49
+ throw new McpError(McpErrorCode.InvalidParams, `Entity or Memory Graph not found`);
50
+ }
51
+ throw new McpError(McpErrorCode.InternalError, `Failed to create relationships: ${error.message}`);
52
+ }
53
+ }
54
+ }
55
+ //# sourceMappingURL=GraphCreateRelationshipsTool.js.map
@@ -0,0 +1,11 @@
1
+ import { BaseToolController } from '../base/BaseToolController.js';
2
+ import { UcmLocalApiClient } from '../../clients/UcmLocalApiClient.js';
3
+ import { ILogger } from '../../interfaces/ILogger.js';
4
+ export declare class GraphCreateTool extends BaseToolController {
5
+ constructor(ucmClient: UcmLocalApiClient, logger: ILogger, publishingAuthorId?: string);
6
+ get name(): string;
7
+ get description(): string;
8
+ get inputSchema(): any;
9
+ protected handleExecute(params: any): Promise<any>;
10
+ }
11
+ //# sourceMappingURL=GraphCreateTool.d.ts.map
@@ -0,0 +1,62 @@
1
+ import { BaseToolController } from '../base/BaseToolController.js';
2
+ import { McpError, McpErrorCode } from '../../utils/McpErrorHandler.js';
3
+ export class GraphCreateTool extends BaseToolController {
4
+ constructor(ucmClient, logger, publishingAuthorId) {
5
+ super(ucmClient, logger, publishingAuthorId);
6
+ }
7
+ get name() { return 'ucm_graph_create'; }
8
+ get description() {
9
+ return 'Create a new Memory Graph with a vocabulary template. Defaults to a personal graph. Set scope to \'organization\' to create an org-wide graph (requires Owner role). Call ucm_graph_list_templates first to see available templates.';
10
+ }
11
+ get inputSchema() {
12
+ return {
13
+ type: 'object',
14
+ properties: {
15
+ label: {
16
+ type: 'string',
17
+ description: 'Display name for the new Memory Graph'
18
+ },
19
+ templateId: {
20
+ type: 'string',
21
+ description: 'Vocabulary template ID to use for the graph. Use ucm_graph_list_templates to see available templates.'
22
+ },
23
+ description: {
24
+ type: 'string',
25
+ description: 'Optional description of the Memory Graph purpose'
26
+ },
27
+ scope: {
28
+ type: 'string',
29
+ enum: ['personal', 'organization'],
30
+ description: 'Graph ownership scope. "personal" (default) creates a graph owned by you. "organization" creates an org-wide graph (requires Owner role).'
31
+ }
32
+ },
33
+ required: ['label', 'templateId']
34
+ };
35
+ }
36
+ async handleExecute(params) {
37
+ const { label, templateId, description, scope } = params;
38
+ const resolvedScope = scope || 'personal';
39
+ this.logger.info('GraphCreateTool', `Creating ${resolvedScope} memory graph: ${label}`);
40
+ try {
41
+ const result = await this.ucmClient.createMemoryGraph({ label, templateId, description, scope: resolvedScope });
42
+ return JSON.stringify(result);
43
+ }
44
+ catch (error) {
45
+ if (error.response?.status === 400) {
46
+ const detail = error.response?.data?.message || 'Invalid parameters for graph creation';
47
+ throw new McpError(McpErrorCode.InvalidParams, detail);
48
+ }
49
+ if (error.response?.status === 403) {
50
+ throw new McpError(McpErrorCode.InvalidParams, 'Creating an organisation graph requires Owner role on the organisation.');
51
+ }
52
+ if (error.response?.status === 404) {
53
+ throw new McpError(McpErrorCode.InvalidParams, `Template not found: ${templateId}`);
54
+ }
55
+ if (error.response?.status === 503) {
56
+ throw new McpError(McpErrorCode.InternalError, `Deep Memory service is not configured`);
57
+ }
58
+ throw new McpError(McpErrorCode.InternalError, `Failed to create memory graph: ${error.message}`);
59
+ }
60
+ }
61
+ }
62
+ //# sourceMappingURL=GraphCreateTool.js.map
@@ -0,0 +1,11 @@
1
+ import { BaseToolController } from '../base/BaseToolController.js';
2
+ import { UcmLocalApiClient } from '../../clients/UcmLocalApiClient.js';
3
+ import { ILogger } from '../../interfaces/ILogger.js';
4
+ export declare class GraphDeleteEntitiesTool extends BaseToolController {
5
+ constructor(ucmClient: UcmLocalApiClient, logger: ILogger, publishingAuthorId?: string);
6
+ get name(): string;
7
+ get description(): string;
8
+ get inputSchema(): any;
9
+ protected handleExecute(params: any): Promise<any>;
10
+ }
11
+ //# sourceMappingURL=GraphDeleteEntitiesTool.d.ts.map
@@ -0,0 +1,43 @@
1
+ import { BaseToolController } from '../base/BaseToolController.js';
2
+ import { McpError, McpErrorCode } from '../../utils/McpErrorHandler.js';
3
+ export class GraphDeleteEntitiesTool extends BaseToolController {
4
+ constructor(ucmClient, logger, publishingAuthorId) {
5
+ super(ucmClient, logger, publishingAuthorId);
6
+ }
7
+ get name() { return 'ucm_graph_delete_entities'; }
8
+ get description() {
9
+ return 'Delete one or more entities from a Memory Graph. Each deleted entity also has its relationships removed. Pass entity IDs as an array.';
10
+ }
11
+ get inputSchema() {
12
+ return {
13
+ type: 'object',
14
+ properties: {
15
+ memoryGraphId: {
16
+ type: 'string',
17
+ description: 'The Memory Graph ID'
18
+ },
19
+ entityIds: {
20
+ type: 'array',
21
+ items: { type: 'string' },
22
+ description: 'Array of entity IDs to delete'
23
+ }
24
+ },
25
+ required: ['memoryGraphId', 'entityIds']
26
+ };
27
+ }
28
+ async handleExecute(params) {
29
+ const { memoryGraphId, entityIds } = params;
30
+ this.logger.info('GraphDeleteEntitiesTool', `Deleting ${entityIds.length} entities from graph: ${memoryGraphId}`);
31
+ try {
32
+ const result = await this.ucmClient.graphDeleteEntities(memoryGraphId, entityIds);
33
+ return JSON.stringify(result);
34
+ }
35
+ catch (error) {
36
+ if (error.response?.status === 404) {
37
+ throw new McpError(McpErrorCode.InvalidParams, `Memory Graph not found`);
38
+ }
39
+ throw new McpError(McpErrorCode.InternalError, `Failed to delete entities: ${error.message}`);
40
+ }
41
+ }
42
+ }
43
+ //# sourceMappingURL=GraphDeleteEntitiesTool.js.map
@@ -0,0 +1,11 @@
1
+ import { BaseToolController } from '../base/BaseToolController.js';
2
+ import { UcmLocalApiClient } from '../../clients/UcmLocalApiClient.js';
3
+ import { ILogger } from '../../interfaces/ILogger.js';
4
+ export declare class GraphDeleteRelationshipsTool extends BaseToolController {
5
+ constructor(ucmClient: UcmLocalApiClient, logger: ILogger, publishingAuthorId?: string);
6
+ get name(): string;
7
+ get description(): string;
8
+ get inputSchema(): any;
9
+ protected handleExecute(params: any): Promise<any>;
10
+ }
11
+ //# sourceMappingURL=GraphDeleteRelationshipsTool.d.ts.map
@@ -0,0 +1,43 @@
1
+ import { BaseToolController } from '../base/BaseToolController.js';
2
+ import { McpError, McpErrorCode } from '../../utils/McpErrorHandler.js';
3
+ export class GraphDeleteRelationshipsTool extends BaseToolController {
4
+ constructor(ucmClient, logger, publishingAuthorId) {
5
+ super(ucmClient, logger, publishingAuthorId);
6
+ }
7
+ get name() { return 'ucm_graph_delete_relationships'; }
8
+ get description() {
9
+ return 'Delete one or more relationships from a Memory Graph by their IDs. Pass relationship IDs as an array.';
10
+ }
11
+ get inputSchema() {
12
+ return {
13
+ type: 'object',
14
+ properties: {
15
+ memoryGraphId: {
16
+ type: 'string',
17
+ description: 'The Memory Graph ID'
18
+ },
19
+ relationshipIds: {
20
+ type: 'array',
21
+ items: { type: 'string' },
22
+ description: 'Array of relationship IDs to delete'
23
+ }
24
+ },
25
+ required: ['memoryGraphId', 'relationshipIds']
26
+ };
27
+ }
28
+ async handleExecute(params) {
29
+ const { memoryGraphId, relationshipIds } = params;
30
+ this.logger.info('GraphDeleteRelationshipsTool', `Deleting ${relationshipIds.length} relationships from graph: ${memoryGraphId}`);
31
+ try {
32
+ const result = await this.ucmClient.graphDeleteRelationships(memoryGraphId, relationshipIds);
33
+ return JSON.stringify(result);
34
+ }
35
+ catch (error) {
36
+ if (error.response?.status === 404) {
37
+ throw new McpError(McpErrorCode.InvalidParams, `Memory Graph not found`);
38
+ }
39
+ throw new McpError(McpErrorCode.InternalError, `Failed to delete relationships: ${error.message}`);
40
+ }
41
+ }
42
+ }
43
+ //# sourceMappingURL=GraphDeleteRelationshipsTool.js.map
@@ -0,0 +1,11 @@
1
+ import { BaseToolController } from '../base/BaseToolController.js';
2
+ import { UcmLocalApiClient } from '../../clients/UcmLocalApiClient.js';
3
+ import { ILogger } from '../../interfaces/ILogger.js';
4
+ export declare class GraphExploreTool extends BaseToolController {
5
+ constructor(ucmClient: UcmLocalApiClient, logger: ILogger, publishingAuthorId?: string);
6
+ get name(): string;
7
+ get description(): string;
8
+ get inputSchema(): any;
9
+ protected handleExecute(params: any): Promise<any>;
10
+ }
11
+ //# sourceMappingURL=GraphExploreTool.d.ts.map
@@ -0,0 +1,71 @@
1
+ import { BaseToolController } from '../base/BaseToolController.js';
2
+ import { McpError, McpErrorCode } from '../../utils/McpErrorHandler.js';
3
+ export class GraphExploreTool extends BaseToolController {
4
+ constructor(ucmClient, logger, publishingAuthorId) {
5
+ super(ucmClient, logger, publishingAuthorId);
6
+ }
7
+ get name() { return 'ucm_graph_explore'; }
8
+ get description() {
9
+ return 'Explore the neighbourhood around an entity using BFS traversal (1-3 hops). Returns connected entities grouped by distance, with optional relationship/entity type filters.';
10
+ }
11
+ get inputSchema() {
12
+ return {
13
+ type: 'object',
14
+ properties: {
15
+ memoryGraphId: {
16
+ type: 'string',
17
+ description: 'The Memory Graph ID'
18
+ },
19
+ entityId: {
20
+ type: 'string',
21
+ description: 'Starting entity ID for exploration'
22
+ },
23
+ depth: {
24
+ type: 'number',
25
+ description: 'Exploration depth: 1, 2, or 3 hops (default: 1)'
26
+ },
27
+ relationshipTypes: {
28
+ type: 'array',
29
+ items: { type: 'string' },
30
+ description: 'Filter by relationship types'
31
+ },
32
+ entityTypes: {
33
+ type: 'array',
34
+ items: { type: 'string' },
35
+ description: 'Filter by entity types'
36
+ },
37
+ direction: {
38
+ type: 'string',
39
+ enum: ['outbound', 'inbound', 'both'],
40
+ description: 'Traversal direction (default: both)'
41
+ },
42
+ limitPerType: {
43
+ type: 'number',
44
+ description: 'Maximum results per relationship type (default: 10)'
45
+ }
46
+ },
47
+ required: ['memoryGraphId', 'entityId']
48
+ };
49
+ }
50
+ async handleExecute(params) {
51
+ const { memoryGraphId, entityId, depth, relationshipTypes, entityTypes, direction, limitPerType } = params;
52
+ this.logger.info('GraphExploreTool', `Exploring from entity ${entityId} in graph: ${memoryGraphId}`);
53
+ try {
54
+ const result = await this.ucmClient.graphExplore(memoryGraphId, {
55
+ entityId,
56
+ maxDepth: depth,
57
+ relationshipTypes,
58
+ entityTypes,
59
+ limit: limitPerType
60
+ });
61
+ return JSON.stringify(result);
62
+ }
63
+ catch (error) {
64
+ if (error.response?.status === 404) {
65
+ throw new McpError(McpErrorCode.InvalidParams, `Entity or Memory Graph not found`);
66
+ }
67
+ throw new McpError(McpErrorCode.InternalError, `Failed to explore neighbourhood: ${error.message}`);
68
+ }
69
+ }
70
+ }
71
+ //# sourceMappingURL=GraphExploreTool.js.map
@@ -0,0 +1,11 @@
1
+ import { BaseToolController } from '../base/BaseToolController.js';
2
+ import { UcmLocalApiClient } from '../../clients/UcmLocalApiClient.js';
3
+ import { ILogger } from '../../interfaces/ILogger.js';
4
+ export declare class GraphFindEntitiesTool extends BaseToolController {
5
+ constructor(ucmClient: UcmLocalApiClient, logger: ILogger, publishingAuthorId?: string);
6
+ get name(): string;
7
+ get description(): string;
8
+ get inputSchema(): any;
9
+ protected handleExecute(params: any): Promise<any>;
10
+ }
11
+ //# sourceMappingURL=GraphFindEntitiesTool.d.ts.map
@@ -0,0 +1,66 @@
1
+ import { BaseToolController } from '../base/BaseToolController.js';
2
+ import { McpError, McpErrorCode } from '../../utils/McpErrorHandler.js';
3
+ export class GraphFindEntitiesTool extends BaseToolController {
4
+ constructor(ucmClient, logger, publishingAuthorId) {
5
+ super(ucmClient, logger, publishingAuthorId);
6
+ }
7
+ get name() { return 'ucm_graph_find_entities'; }
8
+ get description() {
9
+ return 'Find entities in a Memory Graph by label, type, or property filters. Supports pagination and detail levels (brief/summary/full).';
10
+ }
11
+ get inputSchema() {
12
+ return {
13
+ type: 'object',
14
+ properties: {
15
+ memoryGraphId: {
16
+ type: 'string',
17
+ description: 'The Memory Graph ID'
18
+ },
19
+ searchTerm: {
20
+ type: 'string',
21
+ description: 'Search term to match against entity labels (partial match)'
22
+ },
23
+ entityTypes: {
24
+ type: 'array',
25
+ items: { type: 'string' },
26
+ description: 'Filter by entity types (from vocabulary)'
27
+ },
28
+ detailLevel: {
29
+ type: 'string',
30
+ enum: ['brief', 'summary', 'full'],
31
+ description: 'Detail level for returned entities (default: summary)'
32
+ },
33
+ limit: {
34
+ type: 'number',
35
+ description: 'Maximum results to return (default: 20, max: 100)'
36
+ },
37
+ offset: {
38
+ type: 'number',
39
+ description: 'Pagination offset (default: 0)'
40
+ }
41
+ },
42
+ required: ['memoryGraphId']
43
+ };
44
+ }
45
+ async handleExecute(params) {
46
+ const { memoryGraphId, searchTerm, entityTypes, detailLevel, limit, offset } = params;
47
+ this.logger.info('GraphFindEntitiesTool', `Finding entities in graph: ${memoryGraphId}`);
48
+ try {
49
+ const result = await this.ucmClient.graphFindEntities(memoryGraphId, {
50
+ entityTypes,
51
+ searchTerm,
52
+ detailLevel,
53
+ offset,
54
+ limit
55
+ });
56
+ return JSON.stringify(result);
57
+ }
58
+ catch (error) {
59
+ if (error.response?.status === 404) {
60
+ throw new McpError(McpErrorCode.InvalidParams, `Memory Graph not found`);
61
+ }
62
+ throw new McpError(McpErrorCode.InternalError, `Failed to find entities: ${error.message}`);
63
+ }
64
+ }
65
+ }
66
+ //# sourceMappingURL=GraphFindEntitiesTool.js.map
@@ -0,0 +1,11 @@
1
+ import { BaseToolController } from '../base/BaseToolController.js';
2
+ import { UcmLocalApiClient } from '../../clients/UcmLocalApiClient.js';
3
+ import { ILogger } from '../../interfaces/ILogger.js';
4
+ export declare class GraphFindPathsTool extends BaseToolController {
5
+ constructor(ucmClient: UcmLocalApiClient, logger: ILogger, publishingAuthorId?: string);
6
+ get name(): string;
7
+ get description(): string;
8
+ get inputSchema(): any;
9
+ protected handleExecute(params: any): Promise<any>;
10
+ }
11
+ //# sourceMappingURL=GraphFindPathsTool.d.ts.map
@@ -0,0 +1,60 @@
1
+ import { BaseToolController } from '../base/BaseToolController.js';
2
+ import { McpError, McpErrorCode } from '../../utils/McpErrorHandler.js';
3
+ export class GraphFindPathsTool extends BaseToolController {
4
+ constructor(ucmClient, logger, publishingAuthorId) {
5
+ super(ucmClient, logger, publishingAuthorId);
6
+ }
7
+ get name() { return 'ucm_graph_find_paths'; }
8
+ get description() {
9
+ return 'Find paths between two entities in a Memory Graph. Returns all paths up to the specified max depth with optional relationship/entity type filtering.';
10
+ }
11
+ get inputSchema() {
12
+ return {
13
+ type: 'object',
14
+ properties: {
15
+ memoryGraphId: {
16
+ type: 'string',
17
+ description: 'The Memory Graph ID'
18
+ },
19
+ sourceEntityId: {
20
+ type: 'string',
21
+ description: 'Starting entity ID'
22
+ },
23
+ targetEntityId: {
24
+ type: 'string',
25
+ description: 'Target entity ID'
26
+ },
27
+ maxDepth: {
28
+ type: 'number',
29
+ description: 'Maximum path depth (3-5, default: 3)'
30
+ },
31
+ relationshipTypes: {
32
+ type: 'array',
33
+ items: { type: 'string' },
34
+ description: 'Filter by relationship types'
35
+ }
36
+ },
37
+ required: ['memoryGraphId', 'sourceEntityId', 'targetEntityId']
38
+ };
39
+ }
40
+ async handleExecute(params) {
41
+ const { memoryGraphId, sourceEntityId, targetEntityId, maxDepth, relationshipTypes } = params;
42
+ this.logger.info('GraphFindPathsTool', `Finding paths in graph: ${memoryGraphId}`);
43
+ try {
44
+ const result = await this.ucmClient.graphFindPaths(memoryGraphId, {
45
+ sourceEntityId,
46
+ targetEntityId,
47
+ maxDepth,
48
+ relationshipTypes
49
+ });
50
+ return JSON.stringify(result);
51
+ }
52
+ catch (error) {
53
+ if (error.response?.status === 404) {
54
+ throw new McpError(McpErrorCode.InvalidParams, `Entity or Memory Graph not found`);
55
+ }
56
+ throw new McpError(McpErrorCode.InternalError, `Failed to find paths: ${error.message}`);
57
+ }
58
+ }
59
+ }
60
+ //# sourceMappingURL=GraphFindPathsTool.js.map
@@ -0,0 +1,11 @@
1
+ import { BaseToolController } from '../base/BaseToolController.js';
2
+ import { UcmLocalApiClient } from '../../clients/UcmLocalApiClient.js';
3
+ import { ILogger } from '../../interfaces/ILogger.js';
4
+ export declare class GraphGetEntityTool extends BaseToolController {
5
+ constructor(ucmClient: UcmLocalApiClient, logger: ILogger, publishingAuthorId?: string);
6
+ get name(): string;
7
+ get description(): string;
8
+ get inputSchema(): any;
9
+ protected handleExecute(params: any): Promise<any>;
10
+ }
11
+ //# sourceMappingURL=GraphGetEntityTool.d.ts.map
@@ -0,0 +1,47 @@
1
+ import { BaseToolController } from '../base/BaseToolController.js';
2
+ import { McpError, McpErrorCode } from '../../utils/McpErrorHandler.js';
3
+ export class GraphGetEntityTool extends BaseToolController {
4
+ constructor(ucmClient, logger, publishingAuthorId) {
5
+ super(ucmClient, logger, publishingAuthorId);
6
+ }
7
+ get name() { return 'ucm_graph_get_entity'; }
8
+ get description() {
9
+ return 'Get full details of an entity including all properties, data, and provenance. Use the entityId from find_entities or explore results.';
10
+ }
11
+ get inputSchema() {
12
+ return {
13
+ type: 'object',
14
+ properties: {
15
+ memoryGraphId: {
16
+ type: 'string',
17
+ description: 'The Memory Graph ID'
18
+ },
19
+ entityId: {
20
+ type: 'string',
21
+ description: 'The entity ID or slug to retrieve'
22
+ },
23
+ detailLevel: {
24
+ type: 'string',
25
+ enum: ['brief', 'summary', 'full'],
26
+ description: 'Detail level (default: full)'
27
+ }
28
+ },
29
+ required: ['memoryGraphId', 'entityId']
30
+ };
31
+ }
32
+ async handleExecute(params) {
33
+ const { memoryGraphId, entityId, detailLevel } = params;
34
+ this.logger.info('GraphGetEntityTool', `Getting entity ${entityId} from graph: ${memoryGraphId}`);
35
+ try {
36
+ const result = await this.ucmClient.graphGetEntity(memoryGraphId, entityId, detailLevel);
37
+ return JSON.stringify(result);
38
+ }
39
+ catch (error) {
40
+ if (error.response?.status === 404) {
41
+ throw new McpError(McpErrorCode.InvalidParams, `Entity or Memory Graph not found`);
42
+ }
43
+ throw new McpError(McpErrorCode.InternalError, `Failed to get entity: ${error.message}`);
44
+ }
45
+ }
46
+ }
47
+ //# sourceMappingURL=GraphGetEntityTool.js.map
@@ -0,0 +1,11 @@
1
+ import { BaseToolController } from '../base/BaseToolController.js';
2
+ import { UcmLocalApiClient } from '../../clients/UcmLocalApiClient.js';
3
+ import { ILogger } from '../../interfaces/ILogger.js';
4
+ export declare class GraphGetRelationshipsTool extends BaseToolController {
5
+ constructor(ucmClient: UcmLocalApiClient, logger: ILogger, publishingAuthorId?: string);
6
+ get name(): string;
7
+ get description(): string;
8
+ get inputSchema(): any;
9
+ protected handleExecute(params: any): Promise<any>;
10
+ }
11
+ //# sourceMappingURL=GraphGetRelationshipsTool.d.ts.map
@@ -0,0 +1,60 @@
1
+ import { BaseToolController } from '../base/BaseToolController.js';
2
+ import { McpError, McpErrorCode } from '../../utils/McpErrorHandler.js';
3
+ export class GraphGetRelationshipsTool extends BaseToolController {
4
+ constructor(ucmClient, logger, publishingAuthorId) {
5
+ super(ucmClient, logger, publishingAuthorId);
6
+ }
7
+ get name() { return 'ucm_graph_get_relationships'; }
8
+ get description() {
9
+ return 'Get relationships for an entity with optional type filtering and direction control (outbound, inbound, or both).';
10
+ }
11
+ get inputSchema() {
12
+ return {
13
+ type: 'object',
14
+ properties: {
15
+ memoryGraphId: {
16
+ type: 'string',
17
+ description: 'The Memory Graph ID'
18
+ },
19
+ entityId: {
20
+ type: 'string',
21
+ description: 'The entity ID to get relationships for'
22
+ },
23
+ relationshipTypes: {
24
+ type: 'array',
25
+ items: { type: 'string' },
26
+ description: 'Filter by relationship types (from vocabulary)'
27
+ },
28
+ direction: {
29
+ type: 'string',
30
+ enum: ['outbound', 'inbound', 'both'],
31
+ description: 'Relationship direction (default: both)'
32
+ },
33
+ limit: {
34
+ type: 'number',
35
+ description: 'Maximum results (default: 50)'
36
+ }
37
+ },
38
+ required: ['memoryGraphId', 'entityId']
39
+ };
40
+ }
41
+ async handleExecute(params) {
42
+ const { memoryGraphId, entityId, relationshipTypes, direction, limit } = params;
43
+ this.logger.info('GraphGetRelationshipsTool', `Getting relationships for entity ${entityId}`);
44
+ try {
45
+ const result = await this.ucmClient.graphGetRelationships(memoryGraphId, entityId, {
46
+ direction,
47
+ relationshipTypes,
48
+ limit
49
+ });
50
+ return JSON.stringify(result);
51
+ }
52
+ catch (error) {
53
+ if (error.response?.status === 404) {
54
+ throw new McpError(McpErrorCode.InvalidParams, `Entity or Memory Graph not found`);
55
+ }
56
+ throw new McpError(McpErrorCode.InternalError, `Failed to get relationships: ${error.message}`);
57
+ }
58
+ }
59
+ }
60
+ //# sourceMappingURL=GraphGetRelationshipsTool.js.map
@@ -0,0 +1,11 @@
1
+ import { BaseToolController } from '../base/BaseToolController.js';
2
+ import { UcmLocalApiClient } from '../../clients/UcmLocalApiClient.js';
3
+ import { ILogger } from '../../interfaces/ILogger.js';
4
+ export declare class GraphGetStatsTool extends BaseToolController {
5
+ constructor(ucmClient: UcmLocalApiClient, logger: ILogger, publishingAuthorId?: string);
6
+ get name(): string;
7
+ get description(): string;
8
+ get inputSchema(): any;
9
+ protected handleExecute(params: any): Promise<any>;
10
+ }
11
+ //# sourceMappingURL=GraphGetStatsTool.d.ts.map