@graphite-atlas/mcp-server 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/EXAMPLES.md +501 -0
- package/LICENSE +21 -0
- package/README.md +440 -0
- package/dist/client.d.ts +272 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +335 -0
- package/dist/client.js.map +1 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +124 -0
- package/dist/index.js.map +1 -0
- package/dist/tools/analytics.d.ts +9 -0
- package/dist/tools/analytics.d.ts.map +1 -0
- package/dist/tools/analytics.js +374 -0
- package/dist/tools/analytics.js.map +1 -0
- package/dist/tools/atlases.d.ts +7 -0
- package/dist/tools/atlases.d.ts.map +1 -0
- package/dist/tools/atlases.js +132 -0
- package/dist/tools/atlases.js.map +1 -0
- package/dist/tools/batch.d.ts +10 -0
- package/dist/tools/batch.d.ts.map +1 -0
- package/dist/tools/batch.js +154 -0
- package/dist/tools/batch.js.map +1 -0
- package/dist/tools/brain-dump.d.ts +7 -0
- package/dist/tools/brain-dump.d.ts.map +1 -0
- package/dist/tools/brain-dump.js +98 -0
- package/dist/tools/brain-dump.js.map +1 -0
- package/dist/tools/index.d.ts +18 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +29 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/mage.d.ts +10 -0
- package/dist/tools/mage.d.ts.map +1 -0
- package/dist/tools/mage.js +531 -0
- package/dist/tools/mage.js.map +1 -0
- package/dist/tools/paths.d.ts +7 -0
- package/dist/tools/paths.d.ts.map +1 -0
- package/dist/tools/paths.js +245 -0
- package/dist/tools/paths.js.map +1 -0
- package/dist/tools/points.d.ts +7 -0
- package/dist/tools/points.d.ts.map +1 -0
- package/dist/tools/points.js +225 -0
- package/dist/tools/points.js.map +1 -0
- package/dist/tools/validation.d.ts +9 -0
- package/dist/tools/validation.d.ts.map +1 -0
- package/dist/tools/validation.js +323 -0
- package/dist/tools/validation.js.map +1 -0
- package/dist/tools/views.d.ts +9 -0
- package/dist/tools/views.d.ts.map +1 -0
- package/dist/tools/views.js +335 -0
- package/dist/tools/views.js.map +1 -0
- package/package.json +62 -0
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ontology Validation & Entity Resolution Tools
|
|
3
|
+
*
|
|
4
|
+
* Prevents duplicate entities and validates against ontology schema.
|
|
5
|
+
*/
|
|
6
|
+
import { z } from 'zod';
|
|
7
|
+
export function createValidationTools(client) {
|
|
8
|
+
return [
|
|
9
|
+
// Find similar points (entity resolution)
|
|
10
|
+
{
|
|
11
|
+
name: 'find_similar_points',
|
|
12
|
+
description: `Find existing points similar to a proposed new point. Use this BEFORE creating points to prevent duplicates.
|
|
13
|
+
|
|
14
|
+
Returns points that match by:
|
|
15
|
+
- Exact name match (case-insensitive)
|
|
16
|
+
- Same type
|
|
17
|
+
- Fuzzy name match (>85% similarity)
|
|
18
|
+
|
|
19
|
+
This helps prevent creating duplicate entities like "Scott Lynn" when "Scott Lynne" already exists.`,
|
|
20
|
+
inputSchema: {
|
|
21
|
+
type: 'object',
|
|
22
|
+
properties: {
|
|
23
|
+
atlas_id: {
|
|
24
|
+
type: 'string',
|
|
25
|
+
description: 'The atlas to search in',
|
|
26
|
+
},
|
|
27
|
+
name: {
|
|
28
|
+
type: 'string',
|
|
29
|
+
description: 'The proposed point name to check for duplicates',
|
|
30
|
+
},
|
|
31
|
+
type: {
|
|
32
|
+
type: 'string',
|
|
33
|
+
description: 'The point type (e.g., Person, Position). Optional - narrows search.',
|
|
34
|
+
},
|
|
35
|
+
threshold: {
|
|
36
|
+
type: 'number',
|
|
37
|
+
description: 'Similarity threshold 0-1 (default: 0.85). Higher = stricter matching.',
|
|
38
|
+
minimum: 0,
|
|
39
|
+
maximum: 1,
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
required: ['atlas_id', 'name'],
|
|
43
|
+
},
|
|
44
|
+
async execute(args) {
|
|
45
|
+
const schema = z.object({
|
|
46
|
+
atlas_id: z.string(),
|
|
47
|
+
name: z.string(),
|
|
48
|
+
type: z.string().optional(),
|
|
49
|
+
threshold: z.number().min(0).max(1).optional().default(0.85),
|
|
50
|
+
});
|
|
51
|
+
const { atlas_id, name, type, threshold } = schema.parse(args);
|
|
52
|
+
// Get all points (filtered by type if provided)
|
|
53
|
+
const allPoints = await client.listPoints(atlas_id);
|
|
54
|
+
const candidatePoints = type
|
|
55
|
+
? allPoints.filter(p => p.type === type)
|
|
56
|
+
: allPoints;
|
|
57
|
+
// Find matches
|
|
58
|
+
const matches = [];
|
|
59
|
+
const nameLower = name.toLowerCase().trim();
|
|
60
|
+
for (const point of candidatePoints) {
|
|
61
|
+
const pointNameLower = point.name.toLowerCase().trim();
|
|
62
|
+
// Exact match (case-insensitive)
|
|
63
|
+
if (pointNameLower === nameLower) {
|
|
64
|
+
matches.push({
|
|
65
|
+
point: {
|
|
66
|
+
id: point.id,
|
|
67
|
+
name: point.name,
|
|
68
|
+
type: point.type,
|
|
69
|
+
properties: point.properties,
|
|
70
|
+
},
|
|
71
|
+
similarity: 1.0,
|
|
72
|
+
match_type: 'exact',
|
|
73
|
+
reason: 'Exact name match (case-insensitive)',
|
|
74
|
+
});
|
|
75
|
+
continue;
|
|
76
|
+
}
|
|
77
|
+
// Fuzzy match using simple Levenshtein-like similarity
|
|
78
|
+
const similarity = calculateSimilarity(nameLower, pointNameLower);
|
|
79
|
+
if (similarity >= threshold) {
|
|
80
|
+
matches.push({
|
|
81
|
+
point: {
|
|
82
|
+
id: point.id,
|
|
83
|
+
name: point.name,
|
|
84
|
+
type: point.type,
|
|
85
|
+
properties: point.properties,
|
|
86
|
+
},
|
|
87
|
+
similarity: Math.round(similarity * 100) / 100,
|
|
88
|
+
match_type: 'fuzzy',
|
|
89
|
+
reason: `${Math.round(similarity * 100)}% name similarity`,
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
// Sort by similarity (highest first)
|
|
94
|
+
matches.sort((a, b) => b.similarity - a.similarity);
|
|
95
|
+
return {
|
|
96
|
+
query: { name, type, threshold },
|
|
97
|
+
matches,
|
|
98
|
+
count: matches.length,
|
|
99
|
+
recommendation: matches.length > 0
|
|
100
|
+
? `Found ${matches.length} similar point(s). Consider using existing point instead of creating duplicate.`
|
|
101
|
+
: 'No similar points found. Safe to create new point.',
|
|
102
|
+
};
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
// Validate points against ontology
|
|
106
|
+
{
|
|
107
|
+
name: 'validate_points',
|
|
108
|
+
description: `Validate points against the ontology schema before creation. Checks if point types are valid.
|
|
109
|
+
|
|
110
|
+
Use this to catch typos and invalid types BEFORE calling create_point or batch_create.
|
|
111
|
+
|
|
112
|
+
Returns validation errors and warnings for each point.`,
|
|
113
|
+
inputSchema: {
|
|
114
|
+
type: 'object',
|
|
115
|
+
properties: {
|
|
116
|
+
atlas_id: {
|
|
117
|
+
type: 'string',
|
|
118
|
+
description: 'The atlas context (for future ontology support)',
|
|
119
|
+
},
|
|
120
|
+
points: {
|
|
121
|
+
type: 'array',
|
|
122
|
+
description: 'Points to validate',
|
|
123
|
+
items: {
|
|
124
|
+
type: 'object',
|
|
125
|
+
properties: {
|
|
126
|
+
name: { type: 'string' },
|
|
127
|
+
type: { type: 'string' },
|
|
128
|
+
},
|
|
129
|
+
required: ['name', 'type'],
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
required: ['atlas_id', 'points'],
|
|
134
|
+
},
|
|
135
|
+
async execute(args) {
|
|
136
|
+
const schema = z.object({
|
|
137
|
+
atlas_id: z.string(),
|
|
138
|
+
points: z.array(z.object({
|
|
139
|
+
name: z.string(),
|
|
140
|
+
type: z.string(),
|
|
141
|
+
})),
|
|
142
|
+
});
|
|
143
|
+
const { points } = schema.parse(args);
|
|
144
|
+
// Common ontology types (from navigator-cli-poc)
|
|
145
|
+
const validTypes = [
|
|
146
|
+
'Person', 'Position', 'Group', 'Organization',
|
|
147
|
+
'Process', 'Step', 'System', 'Outcome', 'Metric',
|
|
148
|
+
'Artifact', 'Physical Site', 'Policy', 'Procedure',
|
|
149
|
+
'Technology', 'Data', 'Document', 'Event',
|
|
150
|
+
'Risk', 'Control', 'Requirement', 'Goal',
|
|
151
|
+
];
|
|
152
|
+
const errors = [];
|
|
153
|
+
points.forEach((point, index) => {
|
|
154
|
+
// Check name
|
|
155
|
+
if (!point.name || point.name.trim().length === 0) {
|
|
156
|
+
errors.push({
|
|
157
|
+
index,
|
|
158
|
+
field: 'name',
|
|
159
|
+
message: 'Point name cannot be empty',
|
|
160
|
+
severity: 'error',
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
// Check type against ontology
|
|
164
|
+
if (!validTypes.includes(point.type)) {
|
|
165
|
+
// Try to find close matches
|
|
166
|
+
const similar = validTypes.filter(t => t.toLowerCase().includes(point.type.toLowerCase()) ||
|
|
167
|
+
point.type.toLowerCase().includes(t.toLowerCase()));
|
|
168
|
+
const suggestion = similar.length > 0
|
|
169
|
+
? ` Did you mean: ${similar.join(', ')}?`
|
|
170
|
+
: ` Valid types: ${validTypes.slice(0, 5).join(', ')}, ...`;
|
|
171
|
+
errors.push({
|
|
172
|
+
index,
|
|
173
|
+
field: 'type',
|
|
174
|
+
message: `Unknown point type '${point.type}'.${suggestion}`,
|
|
175
|
+
severity: 'warning',
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
const hasErrors = errors.some(e => e.severity === 'error');
|
|
180
|
+
return {
|
|
181
|
+
valid: !hasErrors,
|
|
182
|
+
errors,
|
|
183
|
+
summary: {
|
|
184
|
+
total: points.length,
|
|
185
|
+
errors: errors.filter(e => e.severity === 'error').length,
|
|
186
|
+
warnings: errors.filter(e => e.severity === 'warning').length,
|
|
187
|
+
},
|
|
188
|
+
};
|
|
189
|
+
},
|
|
190
|
+
},
|
|
191
|
+
// Validate paths against ontology
|
|
192
|
+
{
|
|
193
|
+
name: 'validate_paths',
|
|
194
|
+
description: `Validate paths (relationships) against ontology schema before creation.
|
|
195
|
+
|
|
196
|
+
Checks:
|
|
197
|
+
- Path type is valid
|
|
198
|
+
- Source and target point types are compatible
|
|
199
|
+
- Required properties are present
|
|
200
|
+
|
|
201
|
+
Use this to prevent invalid relationships before calling create_path or batch_create.`,
|
|
202
|
+
inputSchema: {
|
|
203
|
+
type: 'object',
|
|
204
|
+
properties: {
|
|
205
|
+
atlas_id: {
|
|
206
|
+
type: 'string',
|
|
207
|
+
description: 'The atlas context',
|
|
208
|
+
},
|
|
209
|
+
paths: {
|
|
210
|
+
type: 'array',
|
|
211
|
+
description: 'Paths to validate',
|
|
212
|
+
items: {
|
|
213
|
+
type: 'object',
|
|
214
|
+
properties: {
|
|
215
|
+
type: { type: 'string', description: 'Relationship type' },
|
|
216
|
+
source: { type: 'string', description: 'Source point name or ID' },
|
|
217
|
+
target: { type: 'string', description: 'Target point name or ID' },
|
|
218
|
+
},
|
|
219
|
+
required: ['type', 'source', 'target'],
|
|
220
|
+
},
|
|
221
|
+
},
|
|
222
|
+
},
|
|
223
|
+
required: ['atlas_id', 'paths'],
|
|
224
|
+
},
|
|
225
|
+
async execute(args) {
|
|
226
|
+
const schema = z.object({
|
|
227
|
+
atlas_id: z.string(),
|
|
228
|
+
paths: z.array(z.object({
|
|
229
|
+
type: z.string(),
|
|
230
|
+
source: z.string(),
|
|
231
|
+
target: z.string(),
|
|
232
|
+
})),
|
|
233
|
+
});
|
|
234
|
+
const { paths } = schema.parse(args);
|
|
235
|
+
// Common relationship types (from navigator-cli-poc ontology)
|
|
236
|
+
const validPathTypes = [
|
|
237
|
+
'has_role', 'reports_to', 'member_of', 'part_of',
|
|
238
|
+
'responsible_for', 'accountable_for', 'consulted_on', 'informed_of',
|
|
239
|
+
'performs', 'executes', 'owns', 'manages',
|
|
240
|
+
'has_step', 'followed_by', 'precedes', 'depends_on',
|
|
241
|
+
'uses_resource', 'produces', 'consumes', 'creates_output',
|
|
242
|
+
'measured_by', 'impacts', 'mitigates', 'escalates_to',
|
|
243
|
+
'documents', 'governed_by', 'requires', 'validates',
|
|
244
|
+
'located_at', 'assigned_to', 'derived_from',
|
|
245
|
+
];
|
|
246
|
+
const errors = [];
|
|
247
|
+
paths.forEach((path, index) => {
|
|
248
|
+
// Check path type
|
|
249
|
+
if (!validPathTypes.includes(path.type)) {
|
|
250
|
+
const similar = validPathTypes.filter(t => t.includes(path.type.toLowerCase()) ||
|
|
251
|
+
path.type.toLowerCase().includes(t));
|
|
252
|
+
const suggestion = similar.length > 0
|
|
253
|
+
? ` Did you mean: ${similar.join(', ')}?`
|
|
254
|
+
: ` Valid types: ${validPathTypes.slice(0, 5).join(', ')}, ...`;
|
|
255
|
+
errors.push({
|
|
256
|
+
index,
|
|
257
|
+
field: 'type',
|
|
258
|
+
message: `Unknown path type '${path.type}'.${suggestion}`,
|
|
259
|
+
severity: 'warning',
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
// Check source/target not empty
|
|
263
|
+
if (!path.source || path.source.trim().length === 0) {
|
|
264
|
+
errors.push({
|
|
265
|
+
index,
|
|
266
|
+
field: 'source',
|
|
267
|
+
message: 'Source point cannot be empty',
|
|
268
|
+
severity: 'error',
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
if (!path.target || path.target.trim().length === 0) {
|
|
272
|
+
errors.push({
|
|
273
|
+
index,
|
|
274
|
+
field: 'target',
|
|
275
|
+
message: 'Target point cannot be empty',
|
|
276
|
+
severity: 'error',
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
});
|
|
280
|
+
const hasErrors = errors.some(e => e.severity === 'error');
|
|
281
|
+
return {
|
|
282
|
+
valid: !hasErrors,
|
|
283
|
+
errors,
|
|
284
|
+
summary: {
|
|
285
|
+
total: paths.length,
|
|
286
|
+
errors: errors.filter(e => e.severity === 'error').length,
|
|
287
|
+
warnings: errors.filter(e => e.severity === 'warning').length,
|
|
288
|
+
},
|
|
289
|
+
};
|
|
290
|
+
},
|
|
291
|
+
},
|
|
292
|
+
];
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* Calculate string similarity using Dice coefficient
|
|
296
|
+
* Returns a value between 0 (no match) and 1 (perfect match)
|
|
297
|
+
*/
|
|
298
|
+
function calculateSimilarity(str1, str2) {
|
|
299
|
+
if (str1 === str2)
|
|
300
|
+
return 1.0;
|
|
301
|
+
if (str1.length < 2 || str2.length < 2)
|
|
302
|
+
return 0;
|
|
303
|
+
// Get bigrams (pairs of consecutive characters)
|
|
304
|
+
const getBigrams = (str) => {
|
|
305
|
+
const bigrams = new Set();
|
|
306
|
+
for (let i = 0; i < str.length - 1; i++) {
|
|
307
|
+
bigrams.add(str.substring(i, i + 2));
|
|
308
|
+
}
|
|
309
|
+
return bigrams;
|
|
310
|
+
};
|
|
311
|
+
const bigrams1 = getBigrams(str1);
|
|
312
|
+
const bigrams2 = getBigrams(str2);
|
|
313
|
+
// Count intersections
|
|
314
|
+
let intersection = 0;
|
|
315
|
+
bigrams1.forEach(bigram => {
|
|
316
|
+
if (bigrams2.has(bigram)) {
|
|
317
|
+
intersection++;
|
|
318
|
+
}
|
|
319
|
+
});
|
|
320
|
+
// Dice coefficient: (2 * intersection) / (size1 + size2)
|
|
321
|
+
return (2.0 * intersection) / (bigrams1.size + bigrams2.size);
|
|
322
|
+
}
|
|
323
|
+
//# sourceMappingURL=validation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.js","sourceRoot":"","sources":["../../src/tools/validation.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,UAAU,qBAAqB,CAAC,MAA2B;IAC/D,OAAO;QACL,0CAA0C;QAC1C;YACE,IAAI,EAAE,qBAAqB;YAC3B,WAAW,EAAE;;;;;;;oGAOiF;YAC9F,WAAW,EAAE;gBACX,IAAI,EA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AG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;YACxC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QACvC,CAAC;QACD,OAAO,OAAO,CAAC;IACjB,CAAC,CAAC;IAEF,MAAM,QAAQ,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC;IAClC,MAAM,QAAQ,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC;IAElC,sBAAsB;IACtB,IAAI,YAAY,GAAG,CAAC,CAAC;IACrB,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;QACxB,IAAI,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC;YACzB,YAAY,EAAE,CAAC;QACjB,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,yDAAyD;IACzD,OAAO,CAAC,GAAG,GAAG,YAAY,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;AAChE,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* View Management Tools
|
|
3
|
+
*
|
|
4
|
+
* Tools for creating and managing views (filtered/organized perspectives of graph data)
|
|
5
|
+
*/
|
|
6
|
+
import { GraphiteAtlasClient } from '../client.js';
|
|
7
|
+
import { MCPTool } from './index.js';
|
|
8
|
+
export declare function createViewTools(client: GraphiteAtlasClient): MCPTool[];
|
|
9
|
+
//# sourceMappingURL=views.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"views.d.ts","sourceRoot":"","sources":["../../src/tools/views.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAGrC,wBAAgB,eAAe,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,EAAE,CA8WtE"}
|