ucm-mcp-server 6.6.0 → 6.7.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 (214) hide show
  1. package/dist/clients/UcmLocalApiClient.d.ts +48 -1
  2. package/dist/clients/UcmLocalApiClient.js +8 -0
  3. package/dist/index.js +1 -1
  4. package/dist/interfaces/IMcpTool.d.ts +2 -2
  5. package/dist/server/ToolRegistry.js +2 -0
  6. package/dist/tools/base/BaseToolController.d.ts +7 -4
  7. package/dist/tools/base/BaseToolController.js +28 -11
  8. package/dist/tools/core/MoveArtifactTool.d.ts +1 -1
  9. package/dist/tools/core/MoveArtifactTool.js +1 -1
  10. package/dist/tools/memory-graph/GraphCreateEntitiesTool.d.ts +5 -2
  11. package/dist/tools/memory-graph/GraphCreateEntitiesTool.js +2 -0
  12. package/dist/tools/memory-graph/GraphCreateRelationshipsTool.d.ts +5 -2
  13. package/dist/tools/memory-graph/GraphCreateRelationshipsTool.js +2 -0
  14. package/dist/tools/memory-graph/GraphCreateTool.d.ts +5 -2
  15. package/dist/tools/memory-graph/GraphCreateTool.js +2 -0
  16. package/dist/tools/memory-graph/GraphDeleteEntitiesTool.d.ts +5 -2
  17. package/dist/tools/memory-graph/GraphDeleteEntitiesTool.js +2 -0
  18. package/dist/tools/memory-graph/GraphDeleteRelationshipsTool.d.ts +5 -2
  19. package/dist/tools/memory-graph/GraphDeleteRelationshipsTool.js +2 -0
  20. package/dist/tools/memory-graph/GraphExploreTool.d.ts +5 -2
  21. package/dist/tools/memory-graph/GraphExploreTool.js +2 -0
  22. package/dist/tools/memory-graph/GraphFindEntitiesTool.d.ts +5 -2
  23. package/dist/tools/memory-graph/GraphFindEntitiesTool.js +2 -0
  24. package/dist/tools/memory-graph/GraphFindPathsTool.d.ts +5 -2
  25. package/dist/tools/memory-graph/GraphFindPathsTool.js +2 -0
  26. package/dist/tools/memory-graph/GraphGetEntityTool.d.ts +5 -2
  27. package/dist/tools/memory-graph/GraphGetEntityTool.js +2 -0
  28. package/dist/tools/memory-graph/GraphGetRelationshipsTool.d.ts +5 -2
  29. package/dist/tools/memory-graph/GraphGetRelationshipsTool.js +2 -0
  30. package/dist/tools/memory-graph/GraphListTemplatesTool.d.ts +5 -2
  31. package/dist/tools/memory-graph/GraphListTemplatesTool.js +2 -0
  32. package/dist/tools/memory-graph/GraphListTool.d.ts +5 -2
  33. package/dist/tools/memory-graph/GraphListTool.js +2 -0
  34. package/dist/tools/memory-graph/GraphOpenTool.d.ts +5 -2
  35. package/dist/tools/memory-graph/GraphOpenTool.js +3 -1
  36. package/dist/tools/memory-graph/GraphProposeVocabularyTool.d.ts +5 -2
  37. package/dist/tools/memory-graph/GraphProposeVocabularyTool.js +51 -6
  38. package/dist/tools/memory-graph/GraphSearchTool.d.ts +5 -2
  39. package/dist/tools/memory-graph/GraphSearchTool.js +2 -0
  40. package/dist/tools/memory-graph/GraphTraverseTool.d.ts +5 -2
  41. package/dist/tools/memory-graph/GraphTraverseTool.js +2 -0
  42. package/dist/tools/memory-graph/GraphUpdateEntitiesTool.d.ts +5 -2
  43. package/dist/tools/memory-graph/GraphUpdateEntitiesTool.js +2 -0
  44. package/dist/{mcp-server/tools/memory-graph/GraphSearchTool.d.ts → tools/memory-graph/GraphUpdateTool.d.ts} +4 -4
  45. package/dist/tools/memory-graph/GraphUpdateTool.js +59 -0
  46. package/dist/tools/memory-graph/KnowledgeSetListTool.d.ts +5 -2
  47. package/dist/tools/memory-graph/KnowledgeSetListTool.js +2 -0
  48. package/dist/tools/memory-graph/KnowledgeSetOpenTool.d.ts +5 -2
  49. package/dist/tools/memory-graph/KnowledgeSetOpenTool.js +2 -0
  50. package/package.json +1 -1
  51. package/dist/clients/UcmApiClient.d.ts +0 -157
  52. package/dist/clients/UcmApiClient.js +0 -443
  53. package/dist/mcp-server/clients/UcmLocalApiClient.d.ts +0 -399
  54. package/dist/mcp-server/clients/UcmLocalApiClient.js +0 -719
  55. package/dist/mcp-server/index.d.ts +0 -3
  56. package/dist/mcp-server/index.js +0 -68
  57. package/dist/mcp-server/interfaces/ILogger.d.ts +0 -8
  58. package/dist/mcp-server/interfaces/ILogger.js +0 -4
  59. package/dist/mcp-server/interfaces/IMcpTool.d.ts +0 -7
  60. package/dist/mcp-server/interfaces/IMcpTool.js +0 -3
  61. package/dist/mcp-server/logging/ConsoleLogger.d.ts +0 -16
  62. package/dist/mcp-server/logging/ConsoleLogger.js +0 -45
  63. package/dist/mcp-server/logging/LoggerFactory.d.ts +0 -9
  64. package/dist/mcp-server/logging/LoggerFactory.js +0 -12
  65. package/dist/mcp-server/server/McpConfig.d.ts +0 -26
  66. package/dist/mcp-server/server/McpConfig.js +0 -90
  67. package/dist/mcp-server/server/McpHandler.d.ts +0 -12
  68. package/dist/mcp-server/server/McpHandler.js +0 -84
  69. package/dist/mcp-server/server/McpServer.d.ts +0 -15
  70. package/dist/mcp-server/server/McpServer.js +0 -49
  71. package/dist/mcp-server/server/ToolRegistry.d.ts +0 -23
  72. package/dist/mcp-server/server/ToolRegistry.js +0 -169
  73. package/dist/mcp-server/tools/authorization/ListAuthorizationsTool.d.ts +0 -21
  74. package/dist/mcp-server/tools/authorization/ListAuthorizationsTool.js +0 -146
  75. package/dist/mcp-server/tools/authorization/SignOutTool.d.ts +0 -23
  76. package/dist/mcp-server/tools/authorization/SignOutTool.js +0 -128
  77. package/dist/mcp-server/tools/base/BaseToolController.d.ts +0 -19
  78. package/dist/mcp-server/tools/base/BaseToolController.js +0 -58
  79. package/dist/mcp-server/tools/connections/AccessConnectionTool.d.ts +0 -21
  80. package/dist/mcp-server/tools/connections/AccessConnectionTool.js +0 -107
  81. package/dist/mcp-server/tools/connections/CallRemoteToolTool.d.ts +0 -22
  82. package/dist/mcp-server/tools/connections/CallRemoteToolTool.js +0 -124
  83. package/dist/mcp-server/tools/core/DeleteArtifactTool.d.ts +0 -11
  84. package/dist/mcp-server/tools/core/DeleteArtifactTool.js +0 -83
  85. package/dist/mcp-server/tools/core/EditArtifactMetadataTool.d.ts +0 -12
  86. package/dist/mcp-server/tools/core/EditArtifactMetadataTool.js +0 -173
  87. package/dist/mcp-server/tools/core/GetArtifactTool.d.ts +0 -13
  88. package/dist/mcp-server/tools/core/GetArtifactTool.js +0 -124
  89. package/dist/mcp-server/tools/core/GetArtifactVersionsTool.d.ts +0 -11
  90. package/dist/mcp-server/tools/core/GetArtifactVersionsTool.js +0 -63
  91. package/dist/mcp-server/tools/core/GetChunkTool.d.ts +0 -11
  92. package/dist/mcp-server/tools/core/GetChunkTool.js +0 -56
  93. package/dist/mcp-server/tools/core/ListArtifactsTool.d.ts +0 -11
  94. package/dist/mcp-server/tools/core/ListArtifactsTool.js +0 -84
  95. package/dist/mcp-server/tools/core/MoveArtifactTool.d.ts +0 -12
  96. package/dist/mcp-server/tools/core/MoveArtifactTool.js +0 -104
  97. package/dist/mcp-server/tools/core/PublishArtifactFromFileTool.d.ts +0 -15
  98. package/dist/mcp-server/tools/core/PublishArtifactFromFileTool.js +0 -277
  99. package/dist/mcp-server/tools/core/PublishArtifactTool.d.ts +0 -13
  100. package/dist/mcp-server/tools/core/PublishArtifactTool.js +0 -218
  101. package/dist/mcp-server/tools/core/SearchArtifactsTool.d.ts +0 -11
  102. package/dist/mcp-server/tools/core/SearchArtifactsTool.js +0 -137
  103. package/dist/mcp-server/tools/list/ListNamespaceController.d.ts +0 -1
  104. package/dist/mcp-server/tools/list/ListNamespaceController.js +0 -8
  105. package/dist/mcp-server/tools/memory-graph/GraphCreateEntitiesTool.d.ts +0 -14
  106. package/dist/mcp-server/tools/memory-graph/GraphCreateEntitiesTool.js +0 -58
  107. package/dist/mcp-server/tools/memory-graph/GraphCreateRelationshipsTool.d.ts +0 -14
  108. package/dist/mcp-server/tools/memory-graph/GraphCreateRelationshipsTool.js +0 -57
  109. package/dist/mcp-server/tools/memory-graph/GraphCreateTool.d.ts +0 -14
  110. package/dist/mcp-server/tools/memory-graph/GraphCreateTool.js +0 -64
  111. package/dist/mcp-server/tools/memory-graph/GraphDeleteEntitiesTool.d.ts +0 -14
  112. package/dist/mcp-server/tools/memory-graph/GraphDeleteEntitiesTool.js +0 -45
  113. package/dist/mcp-server/tools/memory-graph/GraphDeleteRelationshipsTool.d.ts +0 -14
  114. package/dist/mcp-server/tools/memory-graph/GraphDeleteRelationshipsTool.js +0 -45
  115. package/dist/mcp-server/tools/memory-graph/GraphExploreTool.d.ts +0 -14
  116. package/dist/mcp-server/tools/memory-graph/GraphExploreTool.js +0 -73
  117. package/dist/mcp-server/tools/memory-graph/GraphFindEntitiesTool.d.ts +0 -14
  118. package/dist/mcp-server/tools/memory-graph/GraphFindEntitiesTool.js +0 -68
  119. package/dist/mcp-server/tools/memory-graph/GraphFindPathsTool.d.ts +0 -14
  120. package/dist/mcp-server/tools/memory-graph/GraphFindPathsTool.js +0 -62
  121. package/dist/mcp-server/tools/memory-graph/GraphGetEntityTool.d.ts +0 -14
  122. package/dist/mcp-server/tools/memory-graph/GraphGetEntityTool.js +0 -49
  123. package/dist/mcp-server/tools/memory-graph/GraphGetRelationshipsTool.d.ts +0 -14
  124. package/dist/mcp-server/tools/memory-graph/GraphGetRelationshipsTool.js +0 -62
  125. package/dist/mcp-server/tools/memory-graph/GraphListTemplatesTool.d.ts +0 -14
  126. package/dist/mcp-server/tools/memory-graph/GraphListTemplatesTool.js +0 -34
  127. package/dist/mcp-server/tools/memory-graph/GraphListTool.d.ts +0 -14
  128. package/dist/mcp-server/tools/memory-graph/GraphListTool.js +0 -45
  129. package/dist/mcp-server/tools/memory-graph/GraphOpenTool.d.ts +0 -15
  130. package/dist/mcp-server/tools/memory-graph/GraphOpenTool.js +0 -50
  131. package/dist/mcp-server/tools/memory-graph/GraphProposeVocabularyTool.d.ts +0 -14
  132. package/dist/mcp-server/tools/memory-graph/GraphProposeVocabularyTool.js +0 -108
  133. package/dist/mcp-server/tools/memory-graph/GraphSearchTool.js +0 -94
  134. package/dist/mcp-server/tools/memory-graph/GraphTraverseTool.d.ts +0 -14
  135. package/dist/mcp-server/tools/memory-graph/GraphTraverseTool.js +0 -114
  136. package/dist/mcp-server/tools/memory-graph/GraphUpdateEntitiesTool.d.ts +0 -14
  137. package/dist/mcp-server/tools/memory-graph/GraphUpdateEntitiesTool.js +0 -58
  138. package/dist/mcp-server/tools/memory-graph/KnowledgeSetListTool.d.ts +0 -14
  139. package/dist/mcp-server/tools/memory-graph/KnowledgeSetListTool.js +0 -25
  140. package/dist/mcp-server/tools/memory-graph/KnowledgeSetOpenTool.d.ts +0 -14
  141. package/dist/mcp-server/tools/memory-graph/KnowledgeSetOpenTool.js +0 -31
  142. package/dist/mcp-server/tools/repository/CreateRepositoryTool.d.ts +0 -12
  143. package/dist/mcp-server/tools/repository/CreateRepositoryTool.js +0 -116
  144. package/dist/mcp-server/tools/repository/GetRepositoryTool.d.ts +0 -12
  145. package/dist/mcp-server/tools/repository/GetRepositoryTool.js +0 -85
  146. package/dist/mcp-server/tools/repository/UpdateRepositoryTool.d.ts +0 -12
  147. package/dist/mcp-server/tools/repository/UpdateRepositoryTool.js +0 -115
  148. package/dist/mcp-server/tools/sharepoint/SharePointListConnectionsTool.d.ts +0 -19
  149. package/dist/mcp-server/tools/sharepoint/SharePointListConnectionsTool.js +0 -90
  150. package/dist/mcp-server/tools/sharepoint/SharePointListFoldersTool.d.ts +0 -21
  151. package/dist/mcp-server/tools/sharepoint/SharePointListFoldersTool.js +0 -133
  152. package/dist/mcp-server/tools/sharepoint/SharePointReadFileTool.d.ts +0 -22
  153. package/dist/mcp-server/tools/sharepoint/SharePointReadFileTool.js +0 -146
  154. package/dist/mcp-server/tools/sharepoint/SharePointReadRelatedFileTool.d.ts +0 -18
  155. package/dist/mcp-server/tools/sharepoint/SharePointReadRelatedFileTool.js +0 -108
  156. package/dist/mcp-server/tools/sharepoint/SharePointSearchTool.d.ts +0 -22
  157. package/dist/mcp-server/tools/sharepoint/SharePointSearchTool.js +0 -125
  158. package/dist/mcp-server/tools/utility/AuthorIndexTool.d.ts +0 -11
  159. package/dist/mcp-server/tools/utility/AuthorIndexTool.js +0 -49
  160. package/dist/mcp-server/tools/utility/AuthorRecentsTool.d.ts +0 -11
  161. package/dist/mcp-server/tools/utility/AuthorRecentsTool.js +0 -49
  162. package/dist/mcp-server/tools/utility/ListRepositoriesTool.d.ts +0 -11
  163. package/dist/mcp-server/tools/utility/ListRepositoriesTool.js +0 -68
  164. package/dist/mcp-server/tools/utility/QuickstartTool.d.ts +0 -11
  165. package/dist/mcp-server/tools/utility/QuickstartTool.js +0 -36
  166. package/dist/mcp-server/types/UcmApiTypes.d.ts +0 -40
  167. package/dist/mcp-server/types/UcmApiTypes.js +0 -4
  168. package/dist/mcp-server/utils/McpErrorHandler.d.ts +0 -25
  169. package/dist/mcp-server/utils/McpErrorHandler.js +0 -67
  170. package/dist/mcp-server/utils/PathUtils.d.ts +0 -61
  171. package/dist/mcp-server/utils/PathUtils.js +0 -178
  172. package/dist/mcp-server/utils/ResponseChunker.d.ts +0 -25
  173. package/dist/mcp-server/utils/ResponseChunker.js +0 -79
  174. package/dist/mcp-server/utils/SharePointErrorHandler.d.ts +0 -34
  175. package/dist/mcp-server/utils/SharePointErrorHandler.js +0 -55
  176. package/dist/publish/package.json +0 -37
  177. package/dist/schemas/memory-graph-tool-schemas.d.ts +0 -789
  178. package/dist/schemas/memory-graph-tool-schemas.js +0 -181
  179. package/dist/tools/artifacts/GetArtifactController.d.ts +0 -34
  180. package/dist/tools/artifacts/GetArtifactController.js +0 -397
  181. package/dist/tools/artifacts/GetLatestController.d.ts +0 -39
  182. package/dist/tools/artifacts/GetLatestController.js +0 -469
  183. package/dist/tools/artifacts/ListVersionsController.d.ts +0 -43
  184. package/dist/tools/artifacts/ListVersionsController.js +0 -530
  185. package/dist/tools/artifacts/PublishArtifactController.d.ts +0 -37
  186. package/dist/tools/artifacts/PublishArtifactController.js +0 -605
  187. package/dist/tools/discovery/BrowseCategoriesController.d.ts +0 -25
  188. package/dist/tools/discovery/BrowseCategoriesController.js +0 -400
  189. package/dist/tools/discovery/FindByPurposeController.d.ts +0 -12
  190. package/dist/tools/discovery/FindByPurposeController.js +0 -131
  191. package/dist/tools/discovery/ListAuthorsController.d.ts +0 -20
  192. package/dist/tools/discovery/ListAuthorsController.js +0 -274
  193. package/dist/tools/discovery/SearchArtifactsController.d.ts +0 -14
  194. package/dist/tools/discovery/SearchArtifactsController.js +0 -226
  195. package/dist/tools/memory-graph/GraphGetStatsTool.d.ts +0 -11
  196. package/dist/tools/memory-graph/GraphGetStatsTool.js +0 -42
  197. package/dist/tools/memory-graph/GraphRemoveRelationshipsTool.d.ts +0 -11
  198. package/dist/tools/memory-graph/GraphRemoveRelationshipsTool.js +0 -47
  199. package/dist/tools/navigation/ExploreNamespaceController.d.ts +0 -35
  200. package/dist/tools/navigation/ExploreNamespaceController.js +0 -548
  201. package/dist/tools/repository/DeleteRepositoryGuidanceTool.d.ts +0 -13
  202. package/dist/tools/repository/DeleteRepositoryGuidanceTool.js +0 -93
  203. package/dist/tools/sharepoint/SharePointSignOutTool.d.ts +0 -22
  204. package/dist/tools/sharepoint/SharePointSignOutTool.js +0 -114
  205. package/dist/tools/utility/HealthCheckController.d.ts +0 -11
  206. package/dist/tools/utility/HealthCheckController.js +0 -60
  207. package/dist/tools/utility/SubmitFeedbackTool.d.ts +0 -16
  208. package/dist/tools/utility/SubmitFeedbackTool.js +0 -68
  209. package/dist/tools/utility/ValidatePathController.d.ts +0 -30
  210. package/dist/tools/utility/ValidatePathController.js +0 -465
  211. package/dist/utils/HttpsAgentFactory.d.ts +0 -21
  212. package/dist/utils/HttpsAgentFactory.js +0 -50
  213. package/dist/utils/ValidationUtils.d.ts +0 -10
  214. package/dist/utils/ValidationUtils.js +0 -50
@@ -1,49 +0,0 @@
1
- import { BaseToolController } from '../base/BaseToolController.js';
2
- import { McpError, McpErrorCode } from '../../utils/McpErrorHandler.js';
3
- import { GraphGetEntitySchema } from '@/schemas/memory-graph-tool-schemas.js';
4
- export class GraphGetEntityTool extends BaseToolController {
5
- constructor(ucmClient, logger, publishingAuthorId) {
6
- super(ucmClient, logger, publishingAuthorId);
7
- }
8
- get name() { return 'ucm_graph_get_entity'; }
9
- get description() {
10
- return 'Get full details of an entity including all properties, data, and provenance. Use the entityId from find_entities or explore results.';
11
- }
12
- get schema() { return GraphGetEntitySchema; }
13
- get inputSchema() {
14
- return {
15
- type: 'object',
16
- properties: {
17
- memoryGraphId: {
18
- type: 'string',
19
- description: 'The Memory Graph ID'
20
- },
21
- entityId: {
22
- type: 'string',
23
- description: 'The entity ID or slug to retrieve'
24
- },
25
- detailLevel: {
26
- type: 'string',
27
- enum: ['brief', 'summary', 'full'],
28
- description: 'Detail level (default: full)'
29
- }
30
- },
31
- required: ['memoryGraphId', 'entityId']
32
- };
33
- }
34
- async handleExecute(params) {
35
- const { memoryGraphId, entityId, detailLevel } = params;
36
- this.logger.info('GraphGetEntityTool', `Getting entity ${entityId} from graph: ${memoryGraphId}`);
37
- try {
38
- const result = await this.ucmClient.graphGetEntity(memoryGraphId, entityId, detailLevel);
39
- return JSON.stringify(result);
40
- }
41
- catch (error) {
42
- if (error.response?.status === 404) {
43
- throw new McpError(McpErrorCode.InvalidParams, `Entity or Memory Graph not found`);
44
- }
45
- throw new McpError(McpErrorCode.InternalError, `Failed to get entity: ${error.message}`);
46
- }
47
- }
48
- }
49
- //# sourceMappingURL=GraphGetEntityTool.js.map
@@ -1,14 +0,0 @@
1
- import { BaseToolController } from '../base/BaseToolController.js';
2
- import { UcmLocalApiClient } from '../../clients/UcmLocalApiClient.js';
3
- import { ILogger } from '../../interfaces/ILogger.js';
4
- import { type GraphGetRelationshipsParams } from '@/schemas/memory-graph-tool-schemas.js';
5
- import { ZodSchema } from 'zod';
6
- export declare class GraphGetRelationshipsTool extends BaseToolController {
7
- constructor(ucmClient: UcmLocalApiClient, logger: ILogger, publishingAuthorId?: string);
8
- get name(): string;
9
- get description(): string;
10
- get schema(): ZodSchema;
11
- get inputSchema(): Record<string, unknown>;
12
- protected handleExecute(params: GraphGetRelationshipsParams): Promise<string>;
13
- }
14
- //# sourceMappingURL=GraphGetRelationshipsTool.d.ts.map
@@ -1,62 +0,0 @@
1
- import { BaseToolController } from '../base/BaseToolController.js';
2
- import { McpError, McpErrorCode } from '../../utils/McpErrorHandler.js';
3
- import { GraphGetRelationshipsSchema } from '@/schemas/memory-graph-tool-schemas.js';
4
- export class GraphGetRelationshipsTool extends BaseToolController {
5
- constructor(ucmClient, logger, publishingAuthorId) {
6
- super(ucmClient, logger, publishingAuthorId);
7
- }
8
- get name() { return 'ucm_graph_get_relationships'; }
9
- get description() {
10
- return 'Get relationships for an entity with optional type filtering and direction control (outbound, inbound, or both).';
11
- }
12
- get schema() { return GraphGetRelationshipsSchema; }
13
- get inputSchema() {
14
- return {
15
- type: 'object',
16
- properties: {
17
- memoryGraphId: {
18
- type: 'string',
19
- description: 'The Memory Graph ID'
20
- },
21
- entityId: {
22
- type: 'string',
23
- description: 'The entity ID to get relationships for'
24
- },
25
- relationshipTypes: {
26
- type: 'array',
27
- items: { type: 'string' },
28
- description: 'Filter by relationship types (from vocabulary)'
29
- },
30
- direction: {
31
- type: 'string',
32
- enum: ['outbound', 'inbound', 'both'],
33
- description: 'Relationship direction (default: both)'
34
- },
35
- limit: {
36
- type: 'number',
37
- description: 'Maximum results (default: 50)'
38
- }
39
- },
40
- required: ['memoryGraphId', 'entityId']
41
- };
42
- }
43
- async handleExecute(params) {
44
- const { memoryGraphId, entityId, relationshipTypes, direction, limit } = params;
45
- this.logger.info('GraphGetRelationshipsTool', `Getting relationships for entity ${entityId}`);
46
- try {
47
- const result = await this.ucmClient.graphGetRelationships(memoryGraphId, entityId, {
48
- direction,
49
- relationshipTypes,
50
- limit
51
- });
52
- return JSON.stringify(result);
53
- }
54
- catch (error) {
55
- if (error.response?.status === 404) {
56
- throw new McpError(McpErrorCode.InvalidParams, `Entity or Memory Graph not found`);
57
- }
58
- throw new McpError(McpErrorCode.InternalError, `Failed to get relationships: ${error.message}`);
59
- }
60
- }
61
- }
62
- //# sourceMappingURL=GraphGetRelationshipsTool.js.map
@@ -1,14 +0,0 @@
1
- import { BaseToolController } from '../base/BaseToolController.js';
2
- import { UcmLocalApiClient } from '../../clients/UcmLocalApiClient.js';
3
- import { ILogger } from '../../interfaces/ILogger.js';
4
- import { type GraphListTemplatesParams } from '@/schemas/memory-graph-tool-schemas.js';
5
- import { ZodSchema } from 'zod';
6
- export declare class GraphListTemplatesTool extends BaseToolController {
7
- constructor(ucmClient: UcmLocalApiClient, logger: ILogger, publishingAuthorId?: string);
8
- get name(): string;
9
- get description(): string;
10
- get schema(): ZodSchema;
11
- get inputSchema(): Record<string, unknown>;
12
- protected handleExecute(_params: GraphListTemplatesParams): Promise<string>;
13
- }
14
- //# sourceMappingURL=GraphListTemplatesTool.d.ts.map
@@ -1,34 +0,0 @@
1
- import { BaseToolController } from '../base/BaseToolController.js';
2
- import { McpError, McpErrorCode } from '../../utils/McpErrorHandler.js';
3
- import { GraphListTemplatesSchema } from '@/schemas/memory-graph-tool-schemas.js';
4
- export class GraphListTemplatesTool extends BaseToolController {
5
- constructor(ucmClient, logger, publishingAuthorId) {
6
- super(ucmClient, logger, publishingAuthorId);
7
- }
8
- get name() { return 'ucm_graph_list_templates'; }
9
- get description() {
10
- return 'List available vocabulary templates for creating Memory Graphs. Each template defines entity types, relationship types, and property definitions for a specific domain. Use the templateId when calling ucm_graph_create.';
11
- }
12
- get schema() { return GraphListTemplatesSchema; }
13
- get inputSchema() {
14
- return {
15
- type: 'object',
16
- properties: {},
17
- required: []
18
- };
19
- }
20
- async handleExecute(_params) {
21
- this.logger.info('GraphListTemplatesTool', 'Listing vocabulary templates');
22
- try {
23
- const result = await this.ucmClient.listMemoryGraphTemplates();
24
- return JSON.stringify(result);
25
- }
26
- catch (error) {
27
- if (error.response?.status === 503) {
28
- throw new McpError(McpErrorCode.InternalError, `Deep Memory service is not configured`);
29
- }
30
- throw new McpError(McpErrorCode.InternalError, `Failed to list templates: ${error.message}`);
31
- }
32
- }
33
- }
34
- //# sourceMappingURL=GraphListTemplatesTool.js.map
@@ -1,14 +0,0 @@
1
- import { BaseToolController } from '../base/BaseToolController.js';
2
- import { UcmLocalApiClient } from '../../clients/UcmLocalApiClient.js';
3
- import { ILogger } from '../../interfaces/ILogger.js';
4
- import { type GraphListParams } from '@/schemas/memory-graph-tool-schemas.js';
5
- import { ZodSchema } from 'zod';
6
- export declare class GraphListTool extends BaseToolController {
7
- constructor(ucmClient: UcmLocalApiClient, logger: ILogger, publishingAuthorId?: string);
8
- get name(): string;
9
- get description(): string;
10
- get schema(): ZodSchema;
11
- get inputSchema(): Record<string, unknown>;
12
- protected handleExecute(params: GraphListParams): Promise<string>;
13
- }
14
- //# sourceMappingURL=GraphListTool.d.ts.map
@@ -1,45 +0,0 @@
1
- import { BaseToolController } from '../base/BaseToolController.js';
2
- import { GraphListSchema } from '@/schemas/memory-graph-tool-schemas.js';
3
- export class GraphListTool extends BaseToolController {
4
- constructor(ucmClient, logger, publishingAuthorId) {
5
- super(ucmClient, logger, publishingAuthorId);
6
- }
7
- get name() { return 'ucm_graph_list'; }
8
- get description() {
9
- return 'List all Memory Graphs you have access to (including those not in a Knowledge Set). Returns graph metadata, embedding status, descriptions, and ownership scope (personal or organization).';
10
- }
11
- get schema() { return GraphListSchema; }
12
- get inputSchema() {
13
- return {
14
- type: 'object',
15
- properties: {
16
- scope: {
17
- type: 'string',
18
- enum: ['organization', 'personal', 'all'],
19
- description: 'Filter graphs by ownership scope. "organization" returns only org graphs, "personal" returns only your personal graphs, "all" (default) returns both.'
20
- }
21
- },
22
- required: []
23
- };
24
- }
25
- async handleExecute(params) {
26
- const { scope } = params;
27
- this.logger.info('GraphListTool', `Listing memory graphs (scope: ${scope ?? 'all'})`);
28
- const result = await this.ucmClient.listMemoryGraphs(scope ?? 'all');
29
- // Annotate each graph with a scope field based on which owner field is set
30
- if (result && Array.isArray(result.data)) {
31
- result.data = result.data.map((graph) => ({
32
- ...graph,
33
- scope: graph.userId ? 'personal' : 'organization'
34
- }));
35
- }
36
- else if (Array.isArray(result)) {
37
- return JSON.stringify(result.map((graph) => ({
38
- ...graph,
39
- scope: graph.userId ? 'personal' : 'organization'
40
- })));
41
- }
42
- return JSON.stringify(result);
43
- }
44
- }
45
- //# sourceMappingURL=GraphListTool.js.map
@@ -1,15 +0,0 @@
1
- import { BaseToolController } from '../base/BaseToolController.js';
2
- import { UcmLocalApiClient } from '../../clients/UcmLocalApiClient.js';
3
- import { ILogger } from '../../interfaces/ILogger.js';
4
- import { type GraphOpenParams } from '@/schemas/memory-graph-tool-schemas.js';
5
- import { ZodSchema } from 'zod';
6
- export declare class GraphOpenTool extends BaseToolController {
7
- constructor(ucmClient: UcmLocalApiClient, logger: ILogger, publishingAuthorId?: string);
8
- get name(): string;
9
- get description(): string;
10
- get schema(): ZodSchema;
11
- get inputSchema(): Record<string, unknown>;
12
- protected handleExecute(params: GraphOpenParams): Promise<string>;
13
- private handleApiError;
14
- }
15
- //# sourceMappingURL=GraphOpenTool.d.ts.map
@@ -1,50 +0,0 @@
1
- import { BaseToolController } from '../base/BaseToolController.js';
2
- import { McpError, McpErrorCode } from '../../utils/McpErrorHandler.js';
3
- import { GraphOpenSchema } from '@/schemas/memory-graph-tool-schemas.js';
4
- export class GraphOpenTool extends BaseToolController {
5
- constructor(ucmClient, logger, publishingAuthorId) {
6
- super(ucmClient, logger, publishingAuthorId);
7
- }
8
- get name() { return 'ucm_graph_open'; }
9
- get description() {
10
- return 'Open a Memory Graph and get its vocabulary, statistics, instructions, and policies. Call this FIRST before querying a graph — it returns the schema (entity types, relationship types, property definitions) needed to construct queries.';
11
- }
12
- get schema() { return GraphOpenSchema; }
13
- get inputSchema() {
14
- return {
15
- type: 'object',
16
- properties: {
17
- memoryGraphId: {
18
- type: 'string',
19
- description: 'The Memory Graph ID to open'
20
- }
21
- },
22
- required: ['memoryGraphId']
23
- };
24
- }
25
- async handleExecute(params) {
26
- const { memoryGraphId } = params;
27
- this.logger.info('GraphOpenTool', `Opening graph: ${memoryGraphId}`);
28
- try {
29
- const result = await this.ucmClient.graphOpen(memoryGraphId);
30
- // scope is now returned directly by the OpenGraphCommand — no annotation needed
31
- return JSON.stringify(result);
32
- }
33
- catch (error) {
34
- this.handleApiError(error, 'open memory graph');
35
- }
36
- }
37
- handleApiError(error, action) {
38
- if (error.response?.status === 403) {
39
- throw new McpError(McpErrorCode.InvalidParams, `Access denied: you do not have permission to open this Memory Graph`);
40
- }
41
- if (error.response?.status === 404) {
42
- throw new McpError(McpErrorCode.InvalidParams, `Memory Graph not found`);
43
- }
44
- if (error.response?.status === 503) {
45
- throw new McpError(McpErrorCode.InternalError, `Deep Memory service is not configured`);
46
- }
47
- throw new McpError(McpErrorCode.InternalError, `Failed to ${action}: ${error.message}`);
48
- }
49
- }
50
- //# sourceMappingURL=GraphOpenTool.js.map
@@ -1,14 +0,0 @@
1
- import { BaseToolController } from '../base/BaseToolController.js';
2
- import { UcmLocalApiClient } from '../../clients/UcmLocalApiClient.js';
3
- import { ILogger } from '../../interfaces/ILogger.js';
4
- import { type GraphProposeVocabularyParams } from '@/schemas/memory-graph-tool-schemas.js';
5
- import { ZodSchema } from 'zod';
6
- export declare class GraphProposeVocabularyTool extends BaseToolController {
7
- constructor(ucmClient: UcmLocalApiClient, logger: ILogger, publishingAuthorId?: string);
8
- get name(): string;
9
- get description(): string;
10
- get schema(): ZodSchema;
11
- get inputSchema(): Record<string, unknown>;
12
- protected handleExecute(params: GraphProposeVocabularyParams): Promise<string>;
13
- }
14
- //# sourceMappingURL=GraphProposeVocabularyTool.d.ts.map
@@ -1,108 +0,0 @@
1
- import { BaseToolController } from '../base/BaseToolController.js';
2
- import { McpError, McpErrorCode } from '../../utils/McpErrorHandler.js';
3
- import { GraphProposeVocabularySchema } from '@/schemas/memory-graph-tool-schemas.js';
4
- export class GraphProposeVocabularyTool extends BaseToolController {
5
- constructor(ucmClient, logger, publishingAuthorId) {
6
- super(ucmClient, logger, publishingAuthorId);
7
- }
8
- get name() { return 'ucm_graph_propose_vocabulary'; }
9
- get description() {
10
- return 'Propose new entity types or relationship types for a Memory Graph vocabulary. Behaviour depends on the governance mode: auto-approved in "open" mode, queued for review in "managed" mode, rejected in "locked" mode.';
11
- }
12
- get schema() { return GraphProposeVocabularySchema; }
13
- get inputSchema() {
14
- return {
15
- type: 'object',
16
- properties: {
17
- memoryGraphId: {
18
- type: 'string',
19
- description: 'The Memory Graph ID'
20
- },
21
- entityTypes: {
22
- type: 'array',
23
- description: 'New entity types to propose',
24
- items: {
25
- type: 'object',
26
- properties: {
27
- type: { type: 'string', description: 'Entity type name (PascalCase)' },
28
- description: { type: 'string', description: 'Description of the entity type' },
29
- justification: { type: 'string', description: 'Why this entity type is needed' },
30
- properties: {
31
- type: 'array',
32
- items: {
33
- type: 'object',
34
- properties: {
35
- name: { type: 'string', description: 'Property name' },
36
- type: { type: 'string', description: 'Property type: string, number, boolean, date, enum' },
37
- required: { type: 'boolean', description: 'Whether the property is required' },
38
- description: { type: 'string', description: 'Property description' }
39
- },
40
- required: ['name', 'type', 'required']
41
- },
42
- description: 'Property schemas for the entity type'
43
- }
44
- },
45
- required: ['type', 'description', 'justification']
46
- }
47
- },
48
- relationshipTypes: {
49
- type: 'array',
50
- description: 'New relationship types to propose',
51
- items: {
52
- type: 'object',
53
- properties: {
54
- type: { type: 'string', description: 'Relationship type name (SCREAMING_SNAKE_CASE)' },
55
- description: { type: 'string', description: 'Description of the relationship type' },
56
- justification: { type: 'string', description: 'Why this relationship type is needed' },
57
- allowedSourceTypes: { type: 'array', items: { type: 'string' }, description: 'Allowed source entity types' },
58
- allowedTargetTypes: { type: 'array', items: { type: 'string' }, description: 'Allowed target entity types' },
59
- bidirectional: { type: 'boolean', description: 'Whether the relationship is symmetric (default: false)' },
60
- properties: {
61
- type: 'array',
62
- items: {
63
- type: 'object',
64
- properties: {
65
- name: { type: 'string', description: 'Property name' },
66
- type: { type: 'string', description: 'Property type: string, number, boolean, date, enum' },
67
- required: { type: 'boolean', description: 'Whether the property is required' },
68
- description: { type: 'string', description: 'Property description' }
69
- },
70
- required: ['name', 'type', 'required']
71
- },
72
- description: 'Property schemas for the relationship type'
73
- }
74
- },
75
- required: ['type', 'description', 'justification', 'allowedSourceTypes', 'allowedTargetTypes']
76
- }
77
- }
78
- },
79
- required: ['memoryGraphId']
80
- };
81
- }
82
- async handleExecute(params) {
83
- const { memoryGraphId, entityTypes, relationshipTypes } = params;
84
- if ((!entityTypes || entityTypes.length === 0) && (!relationshipTypes || relationshipTypes.length === 0)) {
85
- throw new McpError(McpErrorCode.InvalidParams, 'At least one of entityTypes or relationshipTypes must be provided');
86
- }
87
- this.logger.info('GraphProposeVocabularyTool', `Proposing vocabulary for graph: ${memoryGraphId}`);
88
- try {
89
- const result = await this.ucmClient.graphProposeVocabulary(memoryGraphId, {
90
- // TYPE-EXCEPTION: Zod infers `required?: boolean` but API client expects `required: boolean`;
91
- // runtime values are always valid — cast to satisfy the client signature.
92
- entityTypes: entityTypes,
93
- relationshipTypes: relationshipTypes,
94
- });
95
- return JSON.stringify(result);
96
- }
97
- catch (error) {
98
- if (error.response?.status === 400) {
99
- throw new McpError(McpErrorCode.InvalidParams, error.response.data?.message || 'Validation error');
100
- }
101
- if (error.response?.status === 404) {
102
- throw new McpError(McpErrorCode.InvalidParams, `Memory Graph not found`);
103
- }
104
- throw new McpError(McpErrorCode.InternalError, `Failed to propose vocabulary: ${error.message}`);
105
- }
106
- }
107
- }
108
- //# sourceMappingURL=GraphProposeVocabularyTool.js.map
@@ -1,94 +0,0 @@
1
- import { BaseToolController } from '../base/BaseToolController.js';
2
- import { McpError, McpErrorCode } from '../../utils/McpErrorHandler.js';
3
- import { GraphSearchSchema } from '@/schemas/memory-graph-tool-schemas.js';
4
- export class GraphSearchTool extends BaseToolController {
5
- constructor(ucmClient, logger, publishingAuthorId) {
6
- super(ucmClient, logger, publishingAuthorId);
7
- }
8
- get name() { return 'ucm_graph_search'; }
9
- get description() {
10
- return 'Semantic search across one or more Memory Graphs using vector similarity. Uses embeddings if available. Returns entities ranked by relevance to the query concept. Provide memoryGraphId for single-graph search, graphIds (array) for multi-graph search, or omit both to search all accessible graphs.';
11
- }
12
- get schema() { return GraphSearchSchema; }
13
- get inputSchema() {
14
- return {
15
- type: 'object',
16
- properties: {
17
- memoryGraphId: {
18
- type: 'string',
19
- description: 'Single Memory Graph ID to search (use this for single-graph search)'
20
- },
21
- graphIds: {
22
- type: 'array',
23
- items: { type: 'string' },
24
- description: 'Multiple Memory Graph IDs to search across (use this for multi-graph search)'
25
- },
26
- query: {
27
- type: 'string',
28
- description: 'Natural language query to search for (will be embedded and compared against entity embeddings)'
29
- },
30
- entityTypes: {
31
- type: 'array',
32
- items: { type: 'string' },
33
- description: 'Filter results by entity types'
34
- },
35
- limit: {
36
- type: 'number',
37
- description: 'Maximum results (default: 10, max: 50)'
38
- },
39
- similarityThreshold: {
40
- type: 'number',
41
- description: 'Minimum similarity score threshold (0-1, default: 0.7)'
42
- }
43
- },
44
- required: ['query']
45
- };
46
- }
47
- async handleExecute(params) {
48
- const { memoryGraphId, graphIds, query, entityTypes, limit, similarityThreshold } = params;
49
- // Use single-graph search only when memoryGraphId is provided and graphIds is not
50
- if (memoryGraphId && !graphIds) {
51
- this.logger.info('GraphSearchTool', `Searching single graph: ${memoryGraphId}`);
52
- try {
53
- const result = await this.ucmClient.graphSearch(memoryGraphId, query, {
54
- entityTypes,
55
- limit,
56
- similarityThreshold
57
- });
58
- return JSON.stringify(result);
59
- }
60
- catch (error) {
61
- if (error.response?.status === 422) {
62
- const detail = error.response?.data?.message || 'Embeddings are not configured for this Memory Graph';
63
- throw new McpError(McpErrorCode.InvalidRequest, detail);
64
- }
65
- if (error.response?.status === 404) {
66
- throw new McpError(McpErrorCode.InvalidParams, `Memory Graph not found`);
67
- }
68
- throw new McpError(McpErrorCode.InternalError, `Failed to search graph: ${error.message}`);
69
- }
70
- }
71
- // Multi-graph search: graphIds provided, or neither memoryGraphId nor graphIds provided
72
- this.logger.info('GraphSearchTool', `Searching multiple graphs`);
73
- try {
74
- const result = await this.ucmClient.graphSearchMultiple(query, {
75
- graphIds,
76
- entityTypes,
77
- limit,
78
- similarityThreshold
79
- });
80
- return JSON.stringify(result);
81
- }
82
- catch (error) {
83
- if (error.response?.status === 422) {
84
- const detail = error.response?.data?.message || 'Embeddings are not configured for one or more Memory Graphs';
85
- throw new McpError(McpErrorCode.InvalidRequest, detail);
86
- }
87
- if (error.response?.status === 404) {
88
- throw new McpError(McpErrorCode.InvalidParams, `One or more Memory Graphs not found`);
89
- }
90
- throw new McpError(McpErrorCode.InternalError, `Failed to search graphs: ${error.message}`);
91
- }
92
- }
93
- }
94
- //# sourceMappingURL=GraphSearchTool.js.map
@@ -1,14 +0,0 @@
1
- import { BaseToolController } from '../base/BaseToolController.js';
2
- import { UcmLocalApiClient } from '../../clients/UcmLocalApiClient.js';
3
- import { ILogger } from '../../interfaces/ILogger.js';
4
- import { type GraphTraverseParams } from '@/schemas/memory-graph-tool-schemas.js';
5
- import { ZodSchema } from 'zod';
6
- export declare class GraphTraverseTool extends BaseToolController {
7
- constructor(ucmClient: UcmLocalApiClient, logger: ILogger, publishingAuthorId?: string);
8
- get name(): string;
9
- get description(): string;
10
- get schema(): ZodSchema;
11
- get inputSchema(): Record<string, unknown>;
12
- protected handleExecute(params: GraphTraverseParams): Promise<string>;
13
- }
14
- //# sourceMappingURL=GraphTraverseTool.d.ts.map
@@ -1,114 +0,0 @@
1
- import { BaseToolController } from '../base/BaseToolController.js';
2
- import { McpError, McpErrorCode } from '../../utils/McpErrorHandler.js';
3
- import { GraphTraverseSchema } from '@/schemas/memory-graph-tool-schemas.js';
4
- export class GraphTraverseTool extends BaseToolController {
5
- constructor(ucmClient, logger, publishingAuthorId) {
6
- super(ucmClient, logger, publishingAuthorId);
7
- }
8
- get name() { return 'ucm_graph_traverse'; }
9
- get description() {
10
- return 'Execute a structured graph traversal using a JSON spec. Supports start point selection, ordered hop steps with relationship/entity type filters, property filters, repeat loops, and multiple return modes (terminal, all, paths). The most powerful query tool for complex graph navigation.';
11
- }
12
- get schema() { return GraphTraverseSchema; }
13
- get inputSchema() {
14
- return {
15
- type: 'object',
16
- properties: {
17
- memoryGraphId: {
18
- type: 'string',
19
- description: 'The Memory Graph ID'
20
- },
21
- start: {
22
- type: 'object',
23
- description: 'Start point specification',
24
- properties: {
25
- entityId: { type: 'string', description: 'Start from a specific entity ID or slug' },
26
- entityType: { type: 'string', description: 'Start from all entities of this type' },
27
- filter: {
28
- type: 'array',
29
- items: {
30
- type: 'object',
31
- properties: {
32
- key: { type: 'string' },
33
- operator: { type: 'string', description: 'eq, neq, gt, gte, lt, lte, contains, isNull, isNotNull' },
34
- value: {}
35
- },
36
- required: ['key', 'operator']
37
- },
38
- description: 'Property filters on start entities'
39
- }
40
- }
41
- },
42
- steps: {
43
- type: 'array',
44
- description: 'Ordered traversal steps (hops)',
45
- items: {
46
- type: 'object',
47
- properties: {
48
- direction: { type: 'string', enum: ['out', 'in', 'both'], description: 'Hop direction' },
49
- relationshipTypes: { type: 'array', items: { type: 'string' }, description: 'Filter by relationship types' },
50
- entityTypes: { type: 'array', items: { type: 'string' }, description: 'Filter by entity types at this step' },
51
- entityFilter: {
52
- type: 'array',
53
- items: {
54
- type: 'object',
55
- properties: {
56
- key: { type: 'string' },
57
- operator: { type: 'string' },
58
- value: {}
59
- },
60
- required: ['key', 'operator']
61
- },
62
- description: 'Property filters on entities at this step'
63
- },
64
- repeat: {
65
- type: 'object',
66
- properties: {
67
- maxDepth: { type: 'number', description: 'Maximum repeat depth' },
68
- emitIntermediates: { type: 'boolean', description: 'Include intermediate results' }
69
- },
70
- description: 'Repeat this step up to maxDepth times'
71
- }
72
- }
73
- }
74
- },
75
- returnMode: {
76
- type: 'string',
77
- enum: ['terminal', 'all', 'path'],
78
- description: 'What to return: terminal (only final step entities), all (every visited entity), path (full traversal paths with relationships). Default: terminal'
79
- },
80
- limit: {
81
- type: 'number',
82
- description: 'Maximum results (default: 50, max: 200)'
83
- },
84
- detailLevel: {
85
- type: 'string',
86
- enum: ['brief', 'summary', 'full'],
87
- description: 'Detail level for returned entities (default: summary)'
88
- }
89
- },
90
- required: ['memoryGraphId', 'start', 'steps']
91
- };
92
- }
93
- async handleExecute(params) {
94
- const { memoryGraphId, start, steps, returnMode, limit, detailLevel } = params;
95
- this.logger.info('GraphTraverseTool', `Traversing graph: ${memoryGraphId}`);
96
- try {
97
- const result = await this.ucmClient.graphTraverse(memoryGraphId, {
98
- start,
99
- steps,
100
- returnMode,
101
- limit,
102
- detailLevel
103
- });
104
- return JSON.stringify(result);
105
- }
106
- catch (error) {
107
- if (error.response?.status === 404) {
108
- throw new McpError(McpErrorCode.InvalidParams, `Memory Graph not found`);
109
- }
110
- throw new McpError(McpErrorCode.InternalError, `Failed to traverse graph: ${error.message}`);
111
- }
112
- }
113
- }
114
- //# sourceMappingURL=GraphTraverseTool.js.map