@utaba/ucm-mcp-server 6.5.1 → 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.
- package/dist/clients/UcmLocalApiClient.d.ts +221 -2
- package/dist/clients/UcmLocalApiClient.js +211 -3
- package/dist/index.js +1 -1
- package/dist/interfaces/IMcpTool.d.ts +2 -2
- package/dist/server/ToolRegistry.js +44 -8
- package/dist/tools/authorization/ListAuthorizationsTool.js +2 -2
- package/dist/tools/authorization/SignOutTool.js +2 -2
- package/dist/tools/base/BaseToolController.d.ts +7 -4
- package/dist/tools/base/BaseToolController.js +28 -11
- package/dist/tools/connections/AccessConnectionTool.js +2 -2
- package/dist/tools/connections/CallRemoteToolTool.js +3 -3
- package/dist/tools/core/DeleteArtifactTool.js +5 -4
- package/dist/tools/core/EditArtifactMetadataTool.js +1 -1
- package/dist/tools/core/GetArtifactTool.js +1 -1
- package/dist/tools/core/GetArtifactVersionsTool.js +1 -1
- package/dist/tools/core/GetChunkTool.js +1 -1
- package/dist/tools/core/ListArtifactsTool.js +1 -1
- package/dist/tools/core/MoveArtifactTool.d.ts +1 -1
- package/dist/tools/core/MoveArtifactTool.js +2 -2
- package/dist/tools/core/PublishArtifactFromFileTool.js +1 -1
- package/dist/tools/core/PublishArtifactTool.js +2 -2
- package/dist/tools/core/SearchArtifactsTool.js +7 -6
- package/dist/tools/memory-graph/GraphCreateEntitiesTool.d.ts +14 -0
- package/dist/tools/memory-graph/GraphCreateEntitiesTool.js +58 -0
- package/dist/tools/memory-graph/GraphCreateRelationshipsTool.d.ts +14 -0
- package/dist/tools/memory-graph/GraphCreateRelationshipsTool.js +57 -0
- package/dist/tools/memory-graph/GraphCreateTool.d.ts +14 -0
- package/dist/tools/memory-graph/GraphCreateTool.js +64 -0
- package/dist/tools/memory-graph/GraphDeleteEntitiesTool.d.ts +14 -0
- package/dist/tools/memory-graph/GraphDeleteEntitiesTool.js +45 -0
- package/dist/tools/memory-graph/GraphDeleteRelationshipsTool.d.ts +14 -0
- package/dist/tools/memory-graph/GraphDeleteRelationshipsTool.js +45 -0
- package/dist/tools/memory-graph/GraphExploreTool.d.ts +14 -0
- package/dist/tools/memory-graph/GraphExploreTool.js +73 -0
- package/dist/tools/memory-graph/GraphFindEntitiesTool.d.ts +14 -0
- package/dist/tools/memory-graph/GraphFindEntitiesTool.js +68 -0
- package/dist/tools/memory-graph/GraphFindPathsTool.d.ts +14 -0
- package/dist/tools/memory-graph/GraphFindPathsTool.js +62 -0
- package/dist/tools/memory-graph/GraphGetEntityTool.d.ts +14 -0
- package/dist/tools/memory-graph/GraphGetEntityTool.js +49 -0
- package/dist/tools/memory-graph/GraphGetRelationshipsTool.d.ts +14 -0
- package/dist/tools/memory-graph/GraphGetRelationshipsTool.js +62 -0
- package/dist/tools/memory-graph/GraphListTemplatesTool.d.ts +14 -0
- package/dist/tools/memory-graph/GraphListTemplatesTool.js +34 -0
- package/dist/tools/memory-graph/GraphListTool.d.ts +14 -0
- package/dist/tools/memory-graph/GraphListTool.js +45 -0
- package/dist/tools/memory-graph/GraphOpenTool.d.ts +15 -0
- package/dist/tools/memory-graph/GraphOpenTool.js +50 -0
- package/dist/tools/memory-graph/GraphProposeVocabularyTool.d.ts +14 -0
- package/dist/tools/memory-graph/GraphProposeVocabularyTool.js +149 -0
- package/dist/tools/memory-graph/GraphSearchTool.d.ts +14 -0
- package/dist/tools/memory-graph/GraphSearchTool.js +94 -0
- package/dist/tools/memory-graph/GraphTraverseTool.d.ts +14 -0
- package/dist/tools/memory-graph/GraphTraverseTool.js +114 -0
- package/dist/tools/memory-graph/GraphUpdateEntitiesTool.d.ts +14 -0
- package/dist/tools/memory-graph/GraphUpdateEntitiesTool.js +58 -0
- package/dist/tools/memory-graph/GraphUpdateTool.d.ts +14 -0
- package/dist/tools/memory-graph/GraphUpdateTool.js +59 -0
- package/dist/tools/memory-graph/KnowledgeSetListTool.d.ts +14 -0
- package/dist/tools/memory-graph/KnowledgeSetListTool.js +25 -0
- package/dist/tools/memory-graph/KnowledgeSetOpenTool.d.ts +14 -0
- package/dist/tools/memory-graph/KnowledgeSetOpenTool.js +31 -0
- package/dist/tools/repository/CreateRepositoryTool.js +10 -9
- package/dist/tools/repository/GetRepositoryTool.js +15 -15
- package/dist/tools/repository/UpdateRepositoryTool.js +10 -9
- package/dist/tools/sharepoint/SharePointListConnectionsTool.js +1 -1
- package/dist/tools/sharepoint/SharePointListFoldersTool.js +1 -1
- package/dist/tools/utility/AuthorIndexTool.js +6 -5
- package/dist/tools/utility/AuthorRecentsTool.js +6 -5
- package/dist/tools/utility/ListRepositoriesTool.js +5 -4
- package/dist/utils/McpErrorHandler.js +1 -1
- package/package.json +1 -1
- package/package.json.backup +1 -1
- package/dist/clients/UcmApiClient.d.ts +0 -157
- package/dist/clients/UcmApiClient.js +0 -443
- package/dist/publish/package.json +0 -37
- package/dist/tools/artifacts/GetArtifactController.d.ts +0 -34
- package/dist/tools/artifacts/GetArtifactController.js +0 -397
- package/dist/tools/artifacts/GetLatestController.d.ts +0 -39
- package/dist/tools/artifacts/GetLatestController.js +0 -469
- package/dist/tools/artifacts/ListVersionsController.d.ts +0 -43
- package/dist/tools/artifacts/ListVersionsController.js +0 -530
- package/dist/tools/artifacts/PublishArtifactController.d.ts +0 -37
- package/dist/tools/artifacts/PublishArtifactController.js +0 -605
- package/dist/tools/discovery/BrowseCategoriesController.d.ts +0 -25
- package/dist/tools/discovery/BrowseCategoriesController.js +0 -400
- package/dist/tools/discovery/FindByPurposeController.d.ts +0 -12
- package/dist/tools/discovery/FindByPurposeController.js +0 -131
- package/dist/tools/discovery/ListAuthorsController.d.ts +0 -20
- package/dist/tools/discovery/ListAuthorsController.js +0 -274
- package/dist/tools/discovery/SearchArtifactsController.d.ts +0 -14
- package/dist/tools/discovery/SearchArtifactsController.js +0 -226
- package/dist/tools/navigation/ExploreNamespaceController.d.ts +0 -35
- package/dist/tools/navigation/ExploreNamespaceController.js +0 -548
- package/dist/tools/repository/DeleteRepositoryGuidanceTool.d.ts +0 -13
- package/dist/tools/repository/DeleteRepositoryGuidanceTool.js +0 -93
- package/dist/tools/sharepoint/SharePointSignOutTool.d.ts +0 -22
- package/dist/tools/sharepoint/SharePointSignOutTool.js +0 -114
- package/dist/tools/utility/HealthCheckController.d.ts +0 -11
- package/dist/tools/utility/HealthCheckController.js +0 -60
- package/dist/tools/utility/SubmitFeedbackTool.d.ts +0 -16
- package/dist/tools/utility/SubmitFeedbackTool.js +0 -68
- package/dist/tools/utility/ValidatePathController.d.ts +0 -30
- package/dist/tools/utility/ValidatePathController.js +0 -465
- package/dist/utils/HttpsAgentFactory.d.ts +0 -21
- package/dist/utils/HttpsAgentFactory.js +0 -50
- package/dist/utils/ValidationUtils.d.ts +0 -10
- package/dist/utils/ValidationUtils.js +0 -50
|
@@ -3,9 +3,8 @@ export declare class UcmLocalApiClient {
|
|
|
3
3
|
private baseUrl;
|
|
4
4
|
private authToken?;
|
|
5
5
|
private authorId?;
|
|
6
|
-
private organizationId?;
|
|
7
6
|
private client;
|
|
8
|
-
constructor(baseUrl: string, authToken?: string | undefined, timeout?: number, authorId?: string | undefined
|
|
7
|
+
constructor(baseUrl: string, authToken?: string | undefined, timeout?: number, authorId?: string | undefined);
|
|
9
8
|
private setupInterceptors;
|
|
10
9
|
private ensureClient;
|
|
11
10
|
getAuthors(): Promise<AuthorData[]>;
|
|
@@ -223,5 +222,225 @@ export declare class UcmLocalApiClient {
|
|
|
223
222
|
* @param connectionType - Optional filter: 'sharepoint' | 'remote-mcp' | 'all' (default: 'all')
|
|
224
223
|
*/
|
|
225
224
|
listAuthorizations(connectionType?: string): Promise<any>;
|
|
225
|
+
/**
|
|
226
|
+
* List memory graphs, optionally filtered by scope
|
|
227
|
+
* @param scope - 'organization' | 'personal' | 'all' (default: 'all')
|
|
228
|
+
*/
|
|
229
|
+
listMemoryGraphs(scope?: string): Promise<any>;
|
|
230
|
+
/**
|
|
231
|
+
* Create a new Memory Graph for the authenticated user
|
|
232
|
+
*/
|
|
233
|
+
createMemoryGraph(data: {
|
|
234
|
+
label: string;
|
|
235
|
+
templateId: string;
|
|
236
|
+
description?: string;
|
|
237
|
+
scope?: string;
|
|
238
|
+
}): Promise<any>;
|
|
239
|
+
/**
|
|
240
|
+
* Update an existing Memory Graph's metadata
|
|
241
|
+
*/
|
|
242
|
+
updateMemoryGraph(memoryGraphId: string, data: {
|
|
243
|
+
label?: string;
|
|
244
|
+
description?: string | null;
|
|
245
|
+
usageInstructions?: string | null;
|
|
246
|
+
}): Promise<any>;
|
|
247
|
+
/**
|
|
248
|
+
* List available vocabulary templates for Memory Graph creation
|
|
249
|
+
*/
|
|
250
|
+
listMemoryGraphTemplates(): Promise<any>;
|
|
251
|
+
/**
|
|
252
|
+
* Semantic vector search across multiple Memory Graphs
|
|
253
|
+
*/
|
|
254
|
+
graphSearchMultiple(query: string, options?: {
|
|
255
|
+
graphIds?: string[];
|
|
256
|
+
entityTypes?: string[];
|
|
257
|
+
limit?: number;
|
|
258
|
+
similarityThreshold?: number;
|
|
259
|
+
}): Promise<any>;
|
|
260
|
+
/**
|
|
261
|
+
* List knowledge sets for an organization
|
|
262
|
+
*/
|
|
263
|
+
listKnowledgeSets(): Promise<any>;
|
|
264
|
+
/**
|
|
265
|
+
* List knowledge set summary (markdown) for an organization
|
|
266
|
+
*/
|
|
267
|
+
listKnowledgeSetSummary(): Promise<string>;
|
|
268
|
+
/**
|
|
269
|
+
* Open a knowledge set — returns markdown summary with contents and tool guidance
|
|
270
|
+
*/
|
|
271
|
+
openKnowledgeSet(knowledgeSetId: string): Promise<string>;
|
|
272
|
+
/**
|
|
273
|
+
* Open a memory graph — returns vocabulary, stats, instructions, policies, and metadata
|
|
274
|
+
*/
|
|
275
|
+
graphOpen(graphId: string): Promise<any>;
|
|
276
|
+
/**
|
|
277
|
+
* Find entities with filters and pagination
|
|
278
|
+
*/
|
|
279
|
+
graphFindEntities(graphId: string, query: {
|
|
280
|
+
entityTypes?: string[];
|
|
281
|
+
searchTerm?: string;
|
|
282
|
+
detailLevel?: string;
|
|
283
|
+
offset?: number;
|
|
284
|
+
limit?: number;
|
|
285
|
+
}): Promise<any>;
|
|
286
|
+
/**
|
|
287
|
+
* Get a single entity by ID
|
|
288
|
+
*/
|
|
289
|
+
graphGetEntity(graphId: string, entityId: string, detailLevel?: string): Promise<any>;
|
|
290
|
+
/**
|
|
291
|
+
* Get relationships for an entity
|
|
292
|
+
*/
|
|
293
|
+
graphGetRelationships(graphId: string, entityId: string, options?: {
|
|
294
|
+
direction?: string;
|
|
295
|
+
relationshipTypes?: string[];
|
|
296
|
+
limit?: number;
|
|
297
|
+
}): Promise<any>;
|
|
298
|
+
/**
|
|
299
|
+
* Explore neighbourhood around an entity (BFS, 1-3 hops)
|
|
300
|
+
*/
|
|
301
|
+
graphExplore(graphId: string, options: {
|
|
302
|
+
entityId: string;
|
|
303
|
+
maxDepth?: number;
|
|
304
|
+
relationshipTypes?: string[];
|
|
305
|
+
entityTypes?: string[];
|
|
306
|
+
limit?: number;
|
|
307
|
+
}): Promise<any>;
|
|
308
|
+
/**
|
|
309
|
+
* Find paths between two entities
|
|
310
|
+
*/
|
|
311
|
+
graphFindPaths(graphId: string, options: {
|
|
312
|
+
sourceEntityId: string;
|
|
313
|
+
targetEntityId: string;
|
|
314
|
+
maxDepth?: number;
|
|
315
|
+
relationshipTypes?: string[];
|
|
316
|
+
}): Promise<any>;
|
|
317
|
+
/**
|
|
318
|
+
* Structured graph traversal with a JSON spec
|
|
319
|
+
*/
|
|
320
|
+
graphTraverse(graphId: string, spec: {
|
|
321
|
+
start: Record<string, any>;
|
|
322
|
+
steps: Array<Record<string, any>>;
|
|
323
|
+
returnMode?: string;
|
|
324
|
+
limit?: number;
|
|
325
|
+
detailLevel?: string;
|
|
326
|
+
}): Promise<any>;
|
|
327
|
+
/**
|
|
328
|
+
* Semantic vector search on entity embeddings
|
|
329
|
+
*/
|
|
330
|
+
graphSearch(graphId: string, query: string, options?: {
|
|
331
|
+
entityTypes?: string[];
|
|
332
|
+
limit?: number;
|
|
333
|
+
similarityThreshold?: number;
|
|
334
|
+
}): Promise<any>;
|
|
335
|
+
/**
|
|
336
|
+
* Create one or more entities
|
|
337
|
+
*/
|
|
338
|
+
graphCreateEntities(graphId: string, entities: Array<{
|
|
339
|
+
entityType: string;
|
|
340
|
+
label: string;
|
|
341
|
+
summary?: string;
|
|
342
|
+
properties?: Record<string, unknown>;
|
|
343
|
+
data?: unknown;
|
|
344
|
+
}>): Promise<any>;
|
|
345
|
+
/**
|
|
346
|
+
* Update one or more entities
|
|
347
|
+
*/
|
|
348
|
+
graphUpdateEntities(graphId: string, updates: Array<{
|
|
349
|
+
entityId: string;
|
|
350
|
+
label?: string;
|
|
351
|
+
summary?: string;
|
|
352
|
+
properties?: Record<string, unknown>;
|
|
353
|
+
data?: unknown;
|
|
354
|
+
}>): Promise<any>;
|
|
355
|
+
/**
|
|
356
|
+
* Delete one or more entities
|
|
357
|
+
*/
|
|
358
|
+
graphDeleteEntities(graphId: string, entityIds: string[]): Promise<any>;
|
|
359
|
+
/**
|
|
360
|
+
* Create one or more relationships
|
|
361
|
+
*/
|
|
362
|
+
graphCreateRelationships(graphId: string, relationships: Array<{
|
|
363
|
+
sourceEntityId: string;
|
|
364
|
+
targetEntityId: string;
|
|
365
|
+
relationshipType: string;
|
|
366
|
+
properties?: Record<string, unknown>;
|
|
367
|
+
}>): Promise<any>;
|
|
368
|
+
/**
|
|
369
|
+
* Delete one or more relationships
|
|
370
|
+
*/
|
|
371
|
+
graphDeleteRelationships(graphId: string, relationshipIds: string[]): Promise<any>;
|
|
372
|
+
/**
|
|
373
|
+
* Delete an entire memory graph (SQL record + CosmosDB repository)
|
|
374
|
+
*/
|
|
375
|
+
graphDelete(graphId: string): Promise<any>;
|
|
376
|
+
/**
|
|
377
|
+
* Propose vocabulary extensions (entity types / relationship types)
|
|
378
|
+
*/
|
|
379
|
+
graphProposeVocabulary(graphId: string, proposals: {
|
|
380
|
+
entityTypes?: Array<{
|
|
381
|
+
type: string;
|
|
382
|
+
description: string;
|
|
383
|
+
justification: string;
|
|
384
|
+
properties?: Array<{
|
|
385
|
+
name: string;
|
|
386
|
+
type: string;
|
|
387
|
+
required: boolean;
|
|
388
|
+
description?: string;
|
|
389
|
+
}>;
|
|
390
|
+
}>;
|
|
391
|
+
relationshipTypes?: Array<{
|
|
392
|
+
type: string;
|
|
393
|
+
description: string;
|
|
394
|
+
justification: string;
|
|
395
|
+
allowedSourceTypes: string[];
|
|
396
|
+
allowedTargetTypes: string[];
|
|
397
|
+
bidirectional?: boolean;
|
|
398
|
+
properties?: Array<{
|
|
399
|
+
name: string;
|
|
400
|
+
type: string;
|
|
401
|
+
required: boolean;
|
|
402
|
+
description?: string;
|
|
403
|
+
}>;
|
|
404
|
+
}>;
|
|
405
|
+
editEntityTypes?: Array<{
|
|
406
|
+
type: string;
|
|
407
|
+
description?: string;
|
|
408
|
+
justification: string;
|
|
409
|
+
addProperties?: Array<{
|
|
410
|
+
name: string;
|
|
411
|
+
type: string;
|
|
412
|
+
required: boolean;
|
|
413
|
+
description?: string;
|
|
414
|
+
}>;
|
|
415
|
+
removeProperties?: string[];
|
|
416
|
+
updateProperties?: Array<{
|
|
417
|
+
name: string;
|
|
418
|
+
type: string;
|
|
419
|
+
required: boolean;
|
|
420
|
+
description?: string;
|
|
421
|
+
}>;
|
|
422
|
+
}>;
|
|
423
|
+
editRelationshipTypes?: Array<{
|
|
424
|
+
type: string;
|
|
425
|
+
description?: string;
|
|
426
|
+
justification: string;
|
|
427
|
+
allowedSourceTypes?: string[];
|
|
428
|
+
allowedTargetTypes?: string[];
|
|
429
|
+
bidirectional?: boolean;
|
|
430
|
+
addProperties?: Array<{
|
|
431
|
+
name: string;
|
|
432
|
+
type: string;
|
|
433
|
+
required: boolean;
|
|
434
|
+
description?: string;
|
|
435
|
+
}>;
|
|
436
|
+
removeProperties?: string[];
|
|
437
|
+
updateProperties?: Array<{
|
|
438
|
+
name: string;
|
|
439
|
+
type: string;
|
|
440
|
+
required: boolean;
|
|
441
|
+
description?: string;
|
|
442
|
+
}>;
|
|
443
|
+
}>;
|
|
444
|
+
}): Promise<unknown>;
|
|
226
445
|
}
|
|
227
446
|
//# sourceMappingURL=UcmLocalApiClient.d.ts.map
|
|
@@ -3,13 +3,11 @@ export class UcmLocalApiClient {
|
|
|
3
3
|
baseUrl;
|
|
4
4
|
authToken;
|
|
5
5
|
authorId;
|
|
6
|
-
organizationId;
|
|
7
6
|
client;
|
|
8
|
-
constructor(baseUrl, authToken, timeout = 600000, authorId
|
|
7
|
+
constructor(baseUrl, authToken, timeout = 600000, authorId) {
|
|
9
8
|
this.baseUrl = baseUrl;
|
|
10
9
|
this.authToken = authToken;
|
|
11
10
|
this.authorId = authorId;
|
|
12
|
-
this.organizationId = organizationId;
|
|
13
11
|
this.client = axios.create({
|
|
14
12
|
baseURL: this.baseUrl,
|
|
15
13
|
timeout,
|
|
@@ -515,5 +513,215 @@ export class UcmLocalApiClient {
|
|
|
515
513
|
const response = await client.get('/api/v1/oauth/authorizations', { params });
|
|
516
514
|
return response.data;
|
|
517
515
|
}
|
|
516
|
+
// ─── Memory Graph API Methods ───────────────────────────────────────
|
|
517
|
+
/**
|
|
518
|
+
* List memory graphs, optionally filtered by scope
|
|
519
|
+
* @param scope - 'organization' | 'personal' | 'all' (default: 'all')
|
|
520
|
+
*/
|
|
521
|
+
async listMemoryGraphs(scope) {
|
|
522
|
+
const client = this.ensureClient();
|
|
523
|
+
const params = {};
|
|
524
|
+
if (scope && scope !== 'all') {
|
|
525
|
+
params.scope = scope;
|
|
526
|
+
}
|
|
527
|
+
const response = await client.get(`/api/v1/memory-graphs`, { params });
|
|
528
|
+
return response.data;
|
|
529
|
+
}
|
|
530
|
+
/**
|
|
531
|
+
* Create a new Memory Graph for the authenticated user
|
|
532
|
+
*/
|
|
533
|
+
async createMemoryGraph(data) {
|
|
534
|
+
const client = this.ensureClient();
|
|
535
|
+
const response = await client.post(`/api/v1/memory-graphs`, data);
|
|
536
|
+
return response.data;
|
|
537
|
+
}
|
|
538
|
+
/**
|
|
539
|
+
* Update an existing Memory Graph's metadata
|
|
540
|
+
*/
|
|
541
|
+
async updateMemoryGraph(memoryGraphId, data) {
|
|
542
|
+
const client = this.ensureClient();
|
|
543
|
+
const response = await client.put(`/api/v1/memory-graphs/${memoryGraphId}`, data);
|
|
544
|
+
return response.data;
|
|
545
|
+
}
|
|
546
|
+
/**
|
|
547
|
+
* List available vocabulary templates for Memory Graph creation
|
|
548
|
+
*/
|
|
549
|
+
async listMemoryGraphTemplates() {
|
|
550
|
+
const client = this.ensureClient();
|
|
551
|
+
const response = await client.get(`/api/v1/memory-graphs/templates`);
|
|
552
|
+
return response.data;
|
|
553
|
+
}
|
|
554
|
+
/**
|
|
555
|
+
* Semantic vector search across multiple Memory Graphs
|
|
556
|
+
*/
|
|
557
|
+
async graphSearchMultiple(query, options) {
|
|
558
|
+
const client = this.ensureClient();
|
|
559
|
+
const response = await client.post(`/api/v1/memory-graphs/search`, {
|
|
560
|
+
query,
|
|
561
|
+
...options
|
|
562
|
+
});
|
|
563
|
+
return response.data;
|
|
564
|
+
}
|
|
565
|
+
/**
|
|
566
|
+
* List knowledge sets for an organization
|
|
567
|
+
*/
|
|
568
|
+
async listKnowledgeSets() {
|
|
569
|
+
const client = this.ensureClient();
|
|
570
|
+
const response = await client.get(`/api/v1/knowledge-sets`);
|
|
571
|
+
return response.data;
|
|
572
|
+
}
|
|
573
|
+
/**
|
|
574
|
+
* List knowledge set summary (markdown) for an organization
|
|
575
|
+
*/
|
|
576
|
+
async listKnowledgeSetSummary() {
|
|
577
|
+
const client = this.ensureClient();
|
|
578
|
+
const response = await client.get(`/api/v1/knowledge-sets/summary`);
|
|
579
|
+
return response.data.markdown;
|
|
580
|
+
}
|
|
581
|
+
/**
|
|
582
|
+
* Open a knowledge set — returns markdown summary with contents and tool guidance
|
|
583
|
+
*/
|
|
584
|
+
async openKnowledgeSet(knowledgeSetId) {
|
|
585
|
+
const client = this.ensureClient();
|
|
586
|
+
const response = await client.get(`/api/v1/knowledge-sets/${knowledgeSetId}/summary`);
|
|
587
|
+
return response.data.markdown;
|
|
588
|
+
}
|
|
589
|
+
/**
|
|
590
|
+
* Open a memory graph — returns vocabulary, stats, instructions, policies, and metadata
|
|
591
|
+
*/
|
|
592
|
+
async graphOpen(graphId) {
|
|
593
|
+
const client = this.ensureClient();
|
|
594
|
+
const response = await client.post(`/api/v1/memory-graphs/${graphId}/open`);
|
|
595
|
+
return response.data;
|
|
596
|
+
}
|
|
597
|
+
/**
|
|
598
|
+
* Find entities with filters and pagination
|
|
599
|
+
*/
|
|
600
|
+
async graphFindEntities(graphId, query) {
|
|
601
|
+
const client = this.ensureClient();
|
|
602
|
+
const response = await client.post(`/api/v1/memory-graphs/${graphId}/entities/find`, query);
|
|
603
|
+
return response.data;
|
|
604
|
+
}
|
|
605
|
+
/**
|
|
606
|
+
* Get a single entity by ID
|
|
607
|
+
*/
|
|
608
|
+
async graphGetEntity(graphId, entityId, detailLevel) {
|
|
609
|
+
const client = this.ensureClient();
|
|
610
|
+
const params = {};
|
|
611
|
+
if (detailLevel)
|
|
612
|
+
params.detailLevel = detailLevel;
|
|
613
|
+
const response = await client.get(`/api/v1/memory-graphs/${graphId}/entities/${entityId}`, { params });
|
|
614
|
+
return response.data;
|
|
615
|
+
}
|
|
616
|
+
/**
|
|
617
|
+
* Get relationships for an entity
|
|
618
|
+
*/
|
|
619
|
+
async graphGetRelationships(graphId, entityId, options) {
|
|
620
|
+
const client = this.ensureClient();
|
|
621
|
+
const params = {};
|
|
622
|
+
if (options?.direction)
|
|
623
|
+
params.direction = options.direction;
|
|
624
|
+
if (options?.relationshipTypes)
|
|
625
|
+
params.relationshipTypes = options.relationshipTypes.join(',');
|
|
626
|
+
if (options?.limit)
|
|
627
|
+
params.limit = String(options.limit);
|
|
628
|
+
const response = await client.get(`/api/v1/memory-graphs/${graphId}/entities/${entityId}/relationships`, { params });
|
|
629
|
+
return response.data;
|
|
630
|
+
}
|
|
631
|
+
/**
|
|
632
|
+
* Explore neighbourhood around an entity (BFS, 1-3 hops)
|
|
633
|
+
*/
|
|
634
|
+
async graphExplore(graphId, options) {
|
|
635
|
+
const client = this.ensureClient();
|
|
636
|
+
const response = await client.post(`/api/v1/memory-graphs/${graphId}/explore`, options);
|
|
637
|
+
return response.data;
|
|
638
|
+
}
|
|
639
|
+
/**
|
|
640
|
+
* Find paths between two entities
|
|
641
|
+
*/
|
|
642
|
+
async graphFindPaths(graphId, options) {
|
|
643
|
+
const client = this.ensureClient();
|
|
644
|
+
const response = await client.post(`/api/v1/memory-graphs/${graphId}/find-paths`, options);
|
|
645
|
+
return response.data;
|
|
646
|
+
}
|
|
647
|
+
/**
|
|
648
|
+
* Structured graph traversal with a JSON spec
|
|
649
|
+
*/
|
|
650
|
+
async graphTraverse(graphId, spec) {
|
|
651
|
+
const client = this.ensureClient();
|
|
652
|
+
const response = await client.post(`/api/v1/memory-graphs/${graphId}/traverse`, spec);
|
|
653
|
+
return response.data;
|
|
654
|
+
}
|
|
655
|
+
/**
|
|
656
|
+
* Semantic vector search on entity embeddings
|
|
657
|
+
*/
|
|
658
|
+
async graphSearch(graphId, query, options) {
|
|
659
|
+
const client = this.ensureClient();
|
|
660
|
+
const response = await client.post(`/api/v1/memory-graphs/${graphId}/search`, {
|
|
661
|
+
query,
|
|
662
|
+
...options
|
|
663
|
+
});
|
|
664
|
+
return response.data;
|
|
665
|
+
}
|
|
666
|
+
/**
|
|
667
|
+
* Create one or more entities
|
|
668
|
+
*/
|
|
669
|
+
async graphCreateEntities(graphId, entities) {
|
|
670
|
+
const client = this.ensureClient();
|
|
671
|
+
const response = await client.post(`/api/v1/memory-graphs/${graphId}/entities`, { entities });
|
|
672
|
+
return response.data;
|
|
673
|
+
}
|
|
674
|
+
/**
|
|
675
|
+
* Update one or more entities
|
|
676
|
+
*/
|
|
677
|
+
async graphUpdateEntities(graphId, updates) {
|
|
678
|
+
const client = this.ensureClient();
|
|
679
|
+
const response = await client.put(`/api/v1/memory-graphs/${graphId}/entities`, { updates });
|
|
680
|
+
return response.data;
|
|
681
|
+
}
|
|
682
|
+
/**
|
|
683
|
+
* Delete one or more entities
|
|
684
|
+
*/
|
|
685
|
+
async graphDeleteEntities(graphId, entityIds) {
|
|
686
|
+
const client = this.ensureClient();
|
|
687
|
+
const response = await client.delete(`/api/v1/memory-graphs/${graphId}/entities`, {
|
|
688
|
+
data: { entityIds }
|
|
689
|
+
});
|
|
690
|
+
return response.data;
|
|
691
|
+
}
|
|
692
|
+
/**
|
|
693
|
+
* Create one or more relationships
|
|
694
|
+
*/
|
|
695
|
+
async graphCreateRelationships(graphId, relationships) {
|
|
696
|
+
const client = this.ensureClient();
|
|
697
|
+
const response = await client.post(`/api/v1/memory-graphs/${graphId}/relationships`, { relationships });
|
|
698
|
+
return response.data;
|
|
699
|
+
}
|
|
700
|
+
/**
|
|
701
|
+
* Delete one or more relationships
|
|
702
|
+
*/
|
|
703
|
+
async graphDeleteRelationships(graphId, relationshipIds) {
|
|
704
|
+
const client = this.ensureClient();
|
|
705
|
+
const response = await client.delete(`/api/v1/memory-graphs/${graphId}/relationships`, {
|
|
706
|
+
data: { relationshipIds }
|
|
707
|
+
});
|
|
708
|
+
return response.data;
|
|
709
|
+
}
|
|
710
|
+
/**
|
|
711
|
+
* Delete an entire memory graph (SQL record + CosmosDB repository)
|
|
712
|
+
*/
|
|
713
|
+
async graphDelete(graphId) {
|
|
714
|
+
const client = this.ensureClient();
|
|
715
|
+
const response = await client.delete(`/api/v1/memory-graphs/${graphId}`);
|
|
716
|
+
return response.data;
|
|
717
|
+
}
|
|
718
|
+
/**
|
|
719
|
+
* Propose vocabulary extensions (entity types / relationship types)
|
|
720
|
+
*/
|
|
721
|
+
async graphProposeVocabulary(graphId, proposals) {
|
|
722
|
+
const client = this.ensureClient();
|
|
723
|
+
const response = await client.post(`/api/v1/memory-graphs/${graphId}/vocabulary/propose`, proposals);
|
|
724
|
+
return response.data;
|
|
725
|
+
}
|
|
518
726
|
}
|
|
519
727
|
//# sourceMappingURL=UcmLocalApiClient.js.map
|
package/dist/index.js
CHANGED
|
@@ -12,7 +12,7 @@ async function main() {
|
|
|
12
12
|
program
|
|
13
13
|
.name('ucm-mcp-server')
|
|
14
14
|
.description('Universal Context Manager - Read the ucm_connect tool first to avoid mistakes')
|
|
15
|
-
.version('6.
|
|
15
|
+
.version('6.7.0')
|
|
16
16
|
.option('-u, --ucm-url <url>', 'UCM API base URL (defaults to https://ucm.utaba.ai)')
|
|
17
17
|
.option('-p, --port <port>', 'Server port', '3001')
|
|
18
18
|
.option('--log-level <level>', 'Log level', 'ERROR')
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export interface IMcpTool {
|
|
2
2
|
readonly name: string;
|
|
3
3
|
readonly description: string;
|
|
4
|
-
readonly inputSchema:
|
|
5
|
-
execute(params:
|
|
4
|
+
readonly inputSchema: Record<string, unknown>;
|
|
5
|
+
execute(params: Record<string, unknown>): Promise<string>;
|
|
6
6
|
}
|
|
7
7
|
//# sourceMappingURL=IMcpTool.d.ts.map
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { McpError, McpErrorCode } from '../utils/McpErrorHandler.js';
|
|
2
2
|
// Import utility tools
|
|
3
|
-
// import { HealthCheckController } from '../tools/utility/HealthCheckController.js'; // commented out — use ucm_connect instead
|
|
4
3
|
import { QuickstartTool } from '../tools/utility/QuickstartTool.js';
|
|
5
4
|
import { AuthorIndexTool } from '../tools/utility/AuthorIndexTool.js';
|
|
6
5
|
import { AuthorRecentsTool } from '../tools/utility/AuthorRecentsTool.js';
|
|
7
6
|
import { ListRepositoriesTool } from '../tools/utility/ListRepositoriesTool.js';
|
|
8
|
-
// import { SubmitFeedbackTool } from '../tools/utility/SubmitFeedbackTool.js'; // removed — tool disabled
|
|
9
7
|
// Import core tools
|
|
10
8
|
import { GetArtifactTool } from '../tools/core/GetArtifactTool.js';
|
|
11
9
|
import { GetChunkTool } from '../tools/core/GetChunkTool.js';
|
|
@@ -21,10 +19,9 @@ import { MoveArtifactTool } from '../tools/core/MoveArtifactTool.js';
|
|
|
21
19
|
import { CreateRepositoryTool } from '../tools/repository/CreateRepositoryTool.js';
|
|
22
20
|
import { GetRepositoryTool } from '../tools/repository/GetRepositoryTool.js';
|
|
23
21
|
import { UpdateRepositoryTool } from '../tools/repository/UpdateRepositoryTool.js';
|
|
24
|
-
import { DeleteRepositoryGuidanceTool } from '../tools/repository/DeleteRepositoryGuidanceTool.js';
|
|
25
22
|
// Import connection/SharePoint tools
|
|
26
23
|
import { ListConnectionsTool } from '../tools/sharepoint/SharePointListConnectionsTool.js';
|
|
27
|
-
// DEPRECATED: Legacy SharePoint tools - use
|
|
24
|
+
// DEPRECATED: Legacy SharePoint tools - use ucm_connection_call_tool via unified gateway instead
|
|
28
25
|
// Commented out 2026-02-13 - pending confirmation that unified gateway works correctly
|
|
29
26
|
// import { SharePointSearchTool } from '../tools/sharepoint/SharePointSearchTool.js';
|
|
30
27
|
// import { SharePointListFoldersTool } from '../tools/sharepoint/SharePointListFoldersTool.js';
|
|
@@ -36,6 +33,27 @@ import { ListAuthorizationsTool } from '../tools/authorization/ListAuthorization
|
|
|
36
33
|
// Import connection tools
|
|
37
34
|
import { AccessConnectionTool } from '../tools/connections/AccessConnectionTool.js';
|
|
38
35
|
import { CallRemoteToolTool } from '../tools/connections/CallRemoteToolTool.js';
|
|
36
|
+
// Import memory graph tools
|
|
37
|
+
import { GraphListTool } from '../tools/memory-graph/GraphListTool.js';
|
|
38
|
+
import { GraphCreateTool } from '../tools/memory-graph/GraphCreateTool.js';
|
|
39
|
+
import { GraphUpdateTool } from '../tools/memory-graph/GraphUpdateTool.js';
|
|
40
|
+
import { GraphListTemplatesTool } from '../tools/memory-graph/GraphListTemplatesTool.js';
|
|
41
|
+
import { KnowledgeSetListTool } from '../tools/memory-graph/KnowledgeSetListTool.js';
|
|
42
|
+
import { KnowledgeSetOpenTool } from '../tools/memory-graph/KnowledgeSetOpenTool.js';
|
|
43
|
+
import { GraphOpenTool } from '../tools/memory-graph/GraphOpenTool.js';
|
|
44
|
+
import { GraphFindEntitiesTool } from '../tools/memory-graph/GraphFindEntitiesTool.js';
|
|
45
|
+
import { GraphGetEntityTool } from '../tools/memory-graph/GraphGetEntityTool.js';
|
|
46
|
+
import { GraphGetRelationshipsTool } from '../tools/memory-graph/GraphGetRelationshipsTool.js';
|
|
47
|
+
import { GraphExploreTool } from '../tools/memory-graph/GraphExploreTool.js';
|
|
48
|
+
import { GraphFindPathsTool } from '../tools/memory-graph/GraphFindPathsTool.js';
|
|
49
|
+
import { GraphTraverseTool } from '../tools/memory-graph/GraphTraverseTool.js';
|
|
50
|
+
import { GraphSearchTool } from '../tools/memory-graph/GraphSearchTool.js';
|
|
51
|
+
import { GraphCreateEntitiesTool } from '../tools/memory-graph/GraphCreateEntitiesTool.js';
|
|
52
|
+
import { GraphUpdateEntitiesTool } from '../tools/memory-graph/GraphUpdateEntitiesTool.js';
|
|
53
|
+
import { GraphDeleteEntitiesTool } from '../tools/memory-graph/GraphDeleteEntitiesTool.js';
|
|
54
|
+
import { GraphCreateRelationshipsTool } from '../tools/memory-graph/GraphCreateRelationshipsTool.js';
|
|
55
|
+
import { GraphDeleteRelationshipsTool } from '../tools/memory-graph/GraphDeleteRelationshipsTool.js';
|
|
56
|
+
import { GraphProposeVocabularyTool } from '../tools/memory-graph/GraphProposeVocabularyTool.js';
|
|
39
57
|
export class ToolRegistry {
|
|
40
58
|
ucmClient;
|
|
41
59
|
logger;
|
|
@@ -54,11 +72,9 @@ export class ToolRegistry {
|
|
|
54
72
|
registerTools() {
|
|
55
73
|
// Register utility tools
|
|
56
74
|
this.registerTool(new QuickstartTool(this.ucmClient, this.logger, this.authorId));
|
|
57
|
-
// this.registerTool(new HealthCheckController(this.ucmClient, this.logger, this.authorId)); // commented out — use ucm_connect instead
|
|
58
75
|
this.registerTool(new AuthorIndexTool(this.ucmClient, this.logger, this.authorId));
|
|
59
76
|
this.registerTool(new AuthorRecentsTool(this.ucmClient, this.logger, this.authorId));
|
|
60
77
|
this.registerTool(new ListRepositoriesTool(this.ucmClient, this.logger, this.authorId));
|
|
61
|
-
// this.registerTool(new SubmitFeedbackTool(this.ucmClient, this.logger, this.authorId)); // removed — tool disabled
|
|
62
78
|
// Register core tools
|
|
63
79
|
this.registerTool(new GetArtifactTool(this.ucmClient, this.logger, this.authorId, this.trustedAuthors));
|
|
64
80
|
this.registerTool(new GetChunkTool(this.ucmClient, this.logger, this.authorId));
|
|
@@ -74,10 +90,9 @@ export class ToolRegistry {
|
|
|
74
90
|
this.registerTool(new CreateRepositoryTool(this.ucmClient, this.logger, this.authorId));
|
|
75
91
|
this.registerTool(new GetRepositoryTool(this.ucmClient, this.logger, this.authorId));
|
|
76
92
|
this.registerTool(new UpdateRepositoryTool(this.ucmClient, this.logger, this.authorId));
|
|
77
|
-
this.registerTool(new DeleteRepositoryGuidanceTool(this.ucmClient, this.logger, this.authorId, this.baseUrl));
|
|
78
93
|
// Register connection tools (ListConnectionsTool is unified - lists all connection types)
|
|
79
94
|
this.registerTool(new ListConnectionsTool(this.ucmClient, this.logger, this.authorId));
|
|
80
|
-
// DEPRECATED: Legacy SharePoint tools - use
|
|
95
|
+
// DEPRECATED: Legacy SharePoint tools - use ucm_connection_call_tool via unified gateway instead
|
|
81
96
|
// Commented out 2026-02-13 - pending confirmation that unified gateway works correctly
|
|
82
97
|
// this.registerTool(new SharePointSearchTool(this.ucmClient, this.logger, this.authorId));
|
|
83
98
|
// this.registerTool(new SharePointListFoldersTool(this.ucmClient, this.logger, this.authorId));
|
|
@@ -89,6 +104,27 @@ export class ToolRegistry {
|
|
|
89
104
|
// Register unified authorization tools
|
|
90
105
|
this.registerTool(new SignOutTool(this.ucmClient, this.logger, this.authorId));
|
|
91
106
|
this.registerTool(new ListAuthorizationsTool(this.ucmClient, this.logger, this.authorId));
|
|
107
|
+
// Register memory graph tools
|
|
108
|
+
this.registerTool(new GraphListTool(this.ucmClient, this.logger, this.authorId));
|
|
109
|
+
this.registerTool(new GraphCreateTool(this.ucmClient, this.logger, this.authorId));
|
|
110
|
+
this.registerTool(new GraphUpdateTool(this.ucmClient, this.logger, this.authorId));
|
|
111
|
+
this.registerTool(new GraphListTemplatesTool(this.ucmClient, this.logger, this.authorId));
|
|
112
|
+
this.registerTool(new KnowledgeSetListTool(this.ucmClient, this.logger, this.authorId));
|
|
113
|
+
this.registerTool(new KnowledgeSetOpenTool(this.ucmClient, this.logger, this.authorId));
|
|
114
|
+
this.registerTool(new GraphOpenTool(this.ucmClient, this.logger, this.authorId));
|
|
115
|
+
this.registerTool(new GraphFindEntitiesTool(this.ucmClient, this.logger, this.authorId));
|
|
116
|
+
this.registerTool(new GraphGetEntityTool(this.ucmClient, this.logger, this.authorId));
|
|
117
|
+
this.registerTool(new GraphGetRelationshipsTool(this.ucmClient, this.logger, this.authorId));
|
|
118
|
+
this.registerTool(new GraphExploreTool(this.ucmClient, this.logger, this.authorId));
|
|
119
|
+
this.registerTool(new GraphFindPathsTool(this.ucmClient, this.logger, this.authorId));
|
|
120
|
+
this.registerTool(new GraphTraverseTool(this.ucmClient, this.logger, this.authorId));
|
|
121
|
+
this.registerTool(new GraphSearchTool(this.ucmClient, this.logger, this.authorId));
|
|
122
|
+
this.registerTool(new GraphCreateEntitiesTool(this.ucmClient, this.logger, this.authorId));
|
|
123
|
+
this.registerTool(new GraphUpdateEntitiesTool(this.ucmClient, this.logger, this.authorId));
|
|
124
|
+
this.registerTool(new GraphDeleteEntitiesTool(this.ucmClient, this.logger, this.authorId));
|
|
125
|
+
this.registerTool(new GraphCreateRelationshipsTool(this.ucmClient, this.logger, this.authorId));
|
|
126
|
+
this.registerTool(new GraphDeleteRelationshipsTool(this.ucmClient, this.logger, this.authorId));
|
|
127
|
+
this.registerTool(new GraphProposeVocabularyTool(this.ucmClient, this.logger, this.authorId));
|
|
92
128
|
this.logger.info('ToolRegistry', `Registered ${this.tools.size} MCP tools`);
|
|
93
129
|
}
|
|
94
130
|
registerTool(tool) {
|
|
@@ -8,7 +8,7 @@ export class ListAuthorizationsTool extends BaseToolController {
|
|
|
8
8
|
super(ucmClient, logger, publishingAuthorId);
|
|
9
9
|
}
|
|
10
10
|
get name() {
|
|
11
|
-
return '
|
|
11
|
+
return 'ucm_connection_list_auth';
|
|
12
12
|
}
|
|
13
13
|
get description() {
|
|
14
14
|
return 'List all your active OAuth authorizations across connection types. Shows which services you are currently authorized to access, with expiry info and connection details.';
|
|
@@ -138,7 +138,7 @@ export class ListAuthorizationsTool extends BaseToolController {
|
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
lines.push('\n## Actions\n');
|
|
141
|
-
lines.push('To revoke an authorization, use: `
|
|
141
|
+
lines.push('To revoke an authorization, use: `ucm_connection_signout` with connectionType and connectionId');
|
|
142
142
|
}
|
|
143
143
|
return lines.join('\n');
|
|
144
144
|
}
|
|
@@ -9,7 +9,7 @@ export class SignOutTool extends BaseToolController {
|
|
|
9
9
|
super(ucmClient, logger, publishingAuthorId);
|
|
10
10
|
}
|
|
11
11
|
get name() {
|
|
12
|
-
return '
|
|
12
|
+
return 'ucm_connection_signout';
|
|
13
13
|
}
|
|
14
14
|
get description() {
|
|
15
15
|
return 'Sign out from an OAuth-authorized connection. Revokes user-delegated permissions by deleting access tokens. Works for SharePoint OnBehalfOf connections and Remote MCP Servers with user-delegated OAuth.';
|
|
@@ -25,7 +25,7 @@ export class SignOutTool extends BaseToolController {
|
|
|
25
25
|
},
|
|
26
26
|
connectionId: {
|
|
27
27
|
type: 'string',
|
|
28
|
-
description: 'Connection ID to revoke authorization for (get from
|
|
28
|
+
description: 'Connection ID to revoke authorization for (get from ucm_connection_list_auth or ucm_connection_list)',
|
|
29
29
|
minLength: 36,
|
|
30
30
|
maxLength: 36
|
|
31
31
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { IMcpTool } from '../../interfaces/IMcpTool.js';
|
|
2
2
|
import { UcmLocalApiClient } from '../../clients/UcmLocalApiClient.js';
|
|
3
3
|
import { ILogger } from '../../interfaces/ILogger.js';
|
|
4
|
+
import { ZodSchema } from 'zod';
|
|
4
5
|
export declare abstract class BaseToolController implements IMcpTool {
|
|
5
6
|
protected ucmClient: UcmLocalApiClient;
|
|
6
7
|
protected logger: ILogger;
|
|
@@ -8,9 +9,11 @@ export declare abstract class BaseToolController implements IMcpTool {
|
|
|
8
9
|
constructor(ucmClient: UcmLocalApiClient, logger: ILogger, publishingAuthorId?: string | undefined);
|
|
9
10
|
abstract get name(): string;
|
|
10
11
|
abstract get description(): string;
|
|
11
|
-
abstract get inputSchema():
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
abstract get inputSchema(): Record<string, unknown>;
|
|
13
|
+
/** Override to provide a zod schema for runtime validation */
|
|
14
|
+
get schema(): ZodSchema | undefined;
|
|
15
|
+
execute(params: Record<string, unknown>): Promise<string>;
|
|
16
|
+
protected abstract handleExecute(params: Record<string, unknown>): Promise<string>;
|
|
17
|
+
protected validateParams(params: Record<string, unknown>): void;
|
|
15
18
|
}
|
|
16
19
|
//# sourceMappingURL=BaseToolController.d.ts.map
|