@graphite-atlas/mcp-server 1.0.4 → 1.2.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/index.js CHANGED
@@ -20,6 +20,147 @@ import { setupTools } from './tools/index.js';
20
20
  // Server configuration
21
21
  const SERVER_NAME = 'graphite-atlas';
22
22
  const SERVER_VERSION = '1.0.0';
23
+ const SERVER_INSTRUCTIONS = `You are connected to Graphite Atlas, a knowledge graph platform for modeling business operations and organizational relationships.
24
+
25
+ WHY THIS IS USEFUL:
26
+ The user's Atlas contains their actual business data — real people, org structure, processes, systems, and how they connect. When the user asks questions about their business, team, or operations, query the Atlas rather than guessing. The graph is the source of truth for their organization.
27
+
28
+ WHEN TO USE ATLAS TOOLS:
29
+ - The user asks about their org structure, team, processes, or operations → query the graph
30
+ - The user wants to document or model something about their business → create points and paths
31
+ - The user asks "who does X?" or "what system handles Y?" → search and traverse the graph
32
+ - The user provides a narrative or transcript about their business → use brain_dump to extract structure
33
+ - You need context about the user's business to answer a question → list_points, search_points, list_paths
34
+
35
+ WHEN NOT TO USE ATLAS TOOLS:
36
+ - General knowledge questions unrelated to the user's business
37
+ - Coding tasks that don't involve Atlas data
38
+
39
+ HOW IT WORKS:
40
+ The graph is made up of Points (nodes) and Paths (relationships) that conform to a typed ontology. Points represent things (people, processes, systems). Paths represent how they connect (has_role, reports_to, has_step).
41
+
42
+ VALID POINT TYPES (by category):
43
+ - Actor: Person, Position, Group, Organization, Vendor
44
+ - Action: Process, Step, Review, Decision, Approval, Handoff, Task, Sequence, StepGroup, And, Or
45
+ - Resource: System, Artifact, API, Equipment, Skill, Transport
46
+ - Outcome: Outcome, Metric
47
+ - Location: Physical Site
48
+ - Time: Date, TimeRange, Temporal, AbsoluteDate, RelativeOffset
49
+
50
+ VALID PATH TYPES (key relationships):
51
+ - Person → Position: has_role
52
+ - Person → Group: member_of
53
+ - Person → Step: performs, assigned_to
54
+ - Person → Step/Outcome: responsible_for
55
+ - Person → Person/Position: reports_to
56
+ - Person → Skill: has_skill
57
+ - Process → Step: has_step
58
+ - Step → Step: followed_by, followed_by_if
59
+ - Step → System/Equipment: uses_resource
60
+ - Step → Artifact/Outcome: creates_output
61
+ - Step → Artifact/Step: needs_input
62
+ - Outcome → Metric: measured_by
63
+ - Metric → Metric: impacts
64
+ - Organization → Organization: has_subsidiary, operates_under
65
+ - Step/Date → Step/Date: happens_before, happens_after, simultaneous_with
66
+ - Step → Date: has_deadline
67
+ - Handoff → Step/Artifact: handoff_of
68
+ - Person → Handoff: from_person
69
+ - Handoff → Person: to_person
70
+ - Step/Person → Physical Site: located_in
71
+
72
+ TERMINOLOGY:
73
+ Atlas uses map metaphors, not graph database jargon. Use the correct terms:
74
+ - Atlas (not "knowledge graph" or "graph database")
75
+ - Points (not "nodes" or "entities" or "vertices")
76
+ - Paths (not "edges" or "relationships" or "links")
77
+ - Views (not "subgraphs" or "filters")
78
+ When presenting results to users, always use these terms.
79
+
80
+ MODELING PHILOSOPHY:
81
+ When building or modifying an atlas, favor simplicity over completeness. The goal is minimal primitives through which 90% of business concepts can be expressed.
82
+ - Don't over-model — if something can be a property, don't make it a separate point
83
+ - Don't get bogged down in taxonomy debates — pick a reasonable type and move on
84
+ - Consistency matters more than perfection — use the same patterns across the atlas
85
+ - For shared nodes (systems, people, groups that appear in multiple processes): keep the point description general — what it IS across the business. Put process-specific context on the path descriptions — what it DOES in that process. This ensures explanations are correct regardless of which process is being discussed.
86
+
87
+ PROCESS vs STEP:
88
+ A Process is just a Step that has sub-steps. The distinction is structural:
89
+ - Step — an atomic action (no children)
90
+ - Process — a collection of Steps (has children via has_step)
91
+ Processes can contain other Processes (sub-processes). If a Step gains sub-steps, it should become a Process.
92
+
93
+ ATLAS QUALITY PRINCIPLES:
94
+ When building atlas structures, follow these patterns:
95
+ - Accountability chain: Person → has_role → Position → responsible_for → Outcome/Process
96
+ - Process structure: Process → has_step → Step → followed_by → Step
97
+ - Outcome measurement: Outcome → measured_by → Metric → impacts → Metric
98
+ Key rules:
99
+ - Outcomes connect to Positions (not People directly)
100
+ - Every Step should have a performer (Position)
101
+ - Handoffs need both sender and receiver
102
+ - Avoid orphan points (everything should connect)
103
+
104
+ ALIASES:
105
+ Points can have an aliases property — an array of alternate names, abbreviations, or nicknames. The name field is the canonical/formal name. Aliases are informal references (e.g., "AA" for "Art Authentication", "Tim" for "Timothy"). When users mention an alias, resolve to the formal name. Don't create separate points for aliases.
106
+
107
+ PATH METADATA:
108
+ Most paths don't need descriptions or extra properties — the relationship type (reports_to, has_role, etc.) speaks for itself. Only add path properties when the relationship has a meaningful qualifier:
109
+ - Yes: followed_by_if with condition "if budget approved"
110
+ - Yes: responsible_for with scope "primary"
111
+ - No: reports_to with description "Sarah reports to John" (redundant — the path already says that)
112
+
113
+ CREATING DATA — Search Before You Write:
114
+ Before creating any point or path:
115
+ 1. Search first — use search_points or find_similar_points to check if it already exists
116
+ 2. Reference existing entities by name — don't create duplicates
117
+ 3. Show what's NEW vs EXISTING — make it clear what you're adding vs what already exists
118
+ 4. Use batch_create for multiple entities — one atomic operation instead of many individual calls
119
+
120
+ GRAPH-GROUNDED OUTPUT:
121
+ When answering questions about the user's business, every statement must come from the Atlas data. Do not add generic boilerplate, invented qualifications, or corporate fluff. If data is missing, say so explicitly rather than guessing. The atlas is the source of truth.
122
+
123
+ QUERY STRATEGY — Read the Map, Don't Memorize It:
124
+ You're a navigator. Zoom into the relevant part of the map, don't unfold every page in the atlas. Always start with the question, not the data. Before pulling anything, ask: what part of the atlas actually answers this?
125
+
126
+ The right tool for the job:
127
+ - "Who reports to X?" → search_points for X, then get_node_neighborhood
128
+ - "What systems does this process use?" → get_node_neighborhood on the process
129
+ - "What's most important here?" → get_page_rank or get_betweenness_centrality
130
+ - "Show me all the processes" → search_points filtered by type
131
+ - "How are A and B connected?" → mage_shortest_path between the two points
132
+ - "Are there any gaps in the data?" → find_isolated_nodes
133
+ - "Give me a broad overview" → see below
134
+ - Complex multi-hop traversals or aggregations → query_cypher
135
+
136
+ For broad overview questions, build the picture incrementally:
137
+ 1. Orient first — use query_cypher to count points by type: MATCH (p:Point {atlasId: $atlasId}) WHERE p.deletedAt IS NULL RETURN p.type as type, count(p) as count ORDER BY count DESC
138
+ 2. Start with search_points for Processes — they define what the business does
139
+ 3. Use get_page_rank to find the most important points
140
+ 4. Traverse outward from those anchors with get_node_neighborhood
141
+ 5. Fill in specifics only as needed
142
+
143
+ Exception: For small atlases under ~50 points, a full list_points is acceptable for overview questions. But even then, prefer targeted queries for targeted questions.
144
+
145
+ NEVER do this:
146
+ - list_points + list_paths as your opening move on a large atlas
147
+ - Loading hundreds of points to answer a question about one person
148
+ - Reading every path to find one relationship type
149
+
150
+ ALWAYS do this:
151
+ - Search for what's relevant first
152
+ - Traverse outward from anchor points
153
+ - Use analytics tools to find what matters
154
+ - Use query_cypher for complex traversals, aggregations, and pattern matching
155
+ - Build understanding incrementally — like reading a map, not memorizing a phone book
156
+
157
+ RULES:
158
+ - Use lookup_ontology to verify types before creating points or paths
159
+ - Use find_similar_points before creating to avoid duplicates
160
+ - Use validate_points and validate_paths to check data before writing
161
+ - Point names should be specific and descriptive (e.g., "Scott Lynn" not "CEO")
162
+ - Path types are snake_case (e.g., has_role, reports_to)
163
+ `;
23
164
  /**
24
165
  * Main server initialization
25
166
  */
@@ -59,6 +200,7 @@ async function main() {
59
200
  capabilities: {
60
201
  tools: {},
61
202
  },
203
+ instructions: SERVER_INSTRUCTIONS,
62
204
  });
63
205
  // Set up tools (atlases, nodes, edges, etc.)
64
206
  const tools = setupTools(client);
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EACL,qBAAqB,EACrB,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AI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACrB,OAAO,CAAC,KAAK,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;IACrC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
@@ -21,7 +21,8 @@ export interface MCPTool {
21
21
  * - Views (10 tools)
22
22
  * - Batch operations (1 tool)
23
23
  * - Brain dump/LLM (2 tools)
24
- * - Validation (3 tools)
24
+ * - Validation & ontology (4 tools)
25
+ * - Query (1 tool)
25
26
  * - Analytics (4 tools)
26
27
  * - MAGE algorithms (7 tools)
27
28
  */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAWnD,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;IACjC,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CAC9D;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,EAAE,CAYjE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAYnD,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;IACjC,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CAC9D;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,EAAE,CAajE"}
@@ -11,6 +11,7 @@ import { createBrainDumpTools } from "./brain-dump.js";
11
11
  import { createValidationTools } from "./validation.js";
12
12
  import { createAnalyticsTools } from "./analytics.js";
13
13
  import { createMAGETools } from "./mage.js";
14
+ import { createQueryTools } from "./query.js";
14
15
  import { createViewTools } from "./views.js";
15
16
  /**
16
17
  * Set up all tools for the MCP server
@@ -22,7 +23,8 @@ import { createViewTools } from "./views.js";
22
23
  * - Views (10 tools)
23
24
  * - Batch operations (1 tool)
24
25
  * - Brain dump/LLM (2 tools)
25
- * - Validation (3 tools)
26
+ * - Validation & ontology (4 tools)
27
+ * - Query (1 tool)
26
28
  * - Analytics (4 tools)
27
29
  * - MAGE algorithms (7 tools)
28
30
  */
@@ -34,6 +36,7 @@ export function setupTools(client) {
34
36
  ...createViewTools(client),
35
37
  ...createBatchTools(client),
36
38
  ...createBrainDumpTools(client),
39
+ ...createQueryTools(client),
37
40
  ...createValidationTools(client),
38
41
  ...createAnalyticsTools(client),
39
42
  ...createMAGETools(client),
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAC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YAAY,CAAC;AAS7C;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,UAAU,CAAC,MAA2B;IACpD,OAAO;QACL,GAAG,gBAAgB,CAAC,MAAM,CAAC;QAC3B,GAAG,gBAAgB,CAAC,MAAM,CAAC;QAC3B,GAAG,eAAe,CAAC,MAAM,CAAC;QAC1B,GAAG,eAAe,CAAC,MAAM,CAAC;QAC1B,GAAG,gBAAgB,CAAC,MAAM,CAAC;QAC3B,GAAG,oBAAoB,CAAC,MAAM,CAAC;QAC/B,GAAG,gBAAgB,CAAC,MAAM,CAAC;QAC3B,GAAG,qBAAqB,CAAC,MAAM,CAAC;QAChC,GAAG,oBAAoB,CAAC,MAAM,CAAC;QAC/B,GAAG,eAAe,CAAC,MAAM,CAAC;KAC3B,CAAC;AACJ,CAAC"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Ontology Data
3
+ *
4
+ * Current Atlas ontology — point types, path types, and their constraints.
5
+ * Shared by validation tools and lookup_ontology tool.
6
+ *
7
+ * Source of truth: atlas/src/data/ontology/ontology.json
8
+ * Last synced: 2026-01-09
9
+ */
10
+ export interface PointType {
11
+ value: string;
12
+ description: string;
13
+ category: string;
14
+ superType: string;
15
+ properties: string[];
16
+ }
17
+ export interface PathType {
18
+ value: string;
19
+ description: string;
20
+ category: string;
21
+ sourceTypes: string[];
22
+ targetTypes: string[];
23
+ multiplicity: string;
24
+ properties: string[];
25
+ }
26
+ export declare const POINT_TYPES: PointType[];
27
+ export declare const PATH_TYPES: PathType[];
28
+ /** All valid point type names */
29
+ export declare const VALID_POINT_TYPES: string[];
30
+ /** All valid path type names */
31
+ export declare const VALID_PATH_TYPES: string[];
32
+ /** All point type categories */
33
+ export declare const POINT_CATEGORIES: string[];
34
+ //# sourceMappingURL=ontology-data.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ontology-data.d.ts","sourceRoot":"","sources":["../../src/tools/ontology-data.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB;AAED,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB;AAED,eAAO,MAAM,WAAW,EAAE,SAAS,EA+BlC,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,QAAQ,EA4BhC,CAAC;AAEF,iCAAiC;AACjC,eAAO,MAAM,iBAAiB,EAAE,MAAM,EAAkC,CAAC;AAEzE,gCAAgC;AAChC,eAAO,MAAM,gBAAgB,EAAE,MAAM,EAAiC,CAAC;AAEvE,gCAAgC;AAChC,eAAO,MAAM,gBAAgB,EAAE,MAAM,EAAmD,CAAC"}
@@ -0,0 +1,77 @@
1
+ /**
2
+ * Ontology Data
3
+ *
4
+ * Current Atlas ontology — point types, path types, and their constraints.
5
+ * Shared by validation tools and lookup_ontology tool.
6
+ *
7
+ * Source of truth: atlas/src/data/ontology/ontology.json
8
+ * Last synced: 2026-01-09
9
+ */
10
+ export const POINT_TYPES = [
11
+ { value: 'Person', description: 'An individual actor', category: 'Actor', superType: 'Actor', properties: [] },
12
+ { value: 'Position', description: 'A job function or responsibility', category: 'Actor', superType: 'Actor', properties: [] },
13
+ { value: 'Group', description: 'A group of roles or people servicing a common function or objective', category: 'Actor', superType: 'Actor', properties: [] },
14
+ { value: 'Organization', description: 'A distinct company, firm, agency, or entity group', category: 'Actor', superType: 'Actor', properties: [] },
15
+ { value: 'Vendor', description: 'Company, person or entity that provides a tool or service', category: 'Actor', superType: 'Actor', properties: [] },
16
+ { value: 'Process', description: 'A repeatable sequence of steps', category: 'Action', superType: 'Action', properties: [] },
17
+ { value: 'Step', description: 'An atomic action inside a process', category: 'Action', superType: 'Action', properties: ['stepType', 'status', 'result'] },
18
+ { value: 'Review', description: 'An evaluation of a step or artifact by a person for the purposes of seeking a decision or approval', category: 'Action', superType: 'Action', properties: [] },
19
+ { value: 'Decision', description: 'An action where a choice or judgment is made', category: 'Action', superType: 'Action', properties: ['result'] },
20
+ { value: 'Approval', description: 'A step where a person or group reviews and authorizes a request or action', category: 'Action', superType: 'Action', properties: [] },
21
+ { value: 'Handoff', description: 'A transfer of responsibility, ownership, or context from one person to another', category: 'Action', superType: 'Action', properties: [] },
22
+ { value: 'Task', description: 'A generic action related to a specific task or step executed within a Process', category: 'Action', superType: 'Action', properties: [] },
23
+ { value: 'Sequence', description: 'A defined order of tasks or steps in a business workflow', category: 'Action', superType: 'Action', properties: [] },
24
+ { value: 'StepGroup', description: 'A container that expresses logical relationships (AND, OR, SEQUENCE) between multiple steps', category: 'Action', superType: 'Action', properties: [] },
25
+ { value: 'And', description: 'Combines multiple conditions or tasks that must all be met or completed', category: 'Action', superType: 'Action', properties: [] },
26
+ { value: 'Or', description: 'A logical operator used to execute a task if at least one condition is met', category: 'Action', superType: 'Action', properties: [] },
27
+ { value: 'System', description: 'Software, system, database used', category: 'Resource', superType: 'Resource', properties: ['url', 'file_path', 'media_type', 'mime_type', 'raw_content'] },
28
+ { value: 'Artifact', description: 'File or document', category: 'Resource', superType: 'Resource', properties: ['source_type', 'file_path', 'url', 'media_type', 'mime_type', 'raw_content'] },
29
+ { value: 'API', description: 'An API enables different software systems to communicate and automate business workflows', category: 'Resource', superType: 'Resource', properties: [] },
30
+ { value: 'Equipment', description: 'Physical tools or machinery used to perform tasks in business operations', category: 'Resource', superType: 'Resource', properties: [] },
31
+ { value: 'Skill', description: 'Internal capability of a person', category: 'Resource', superType: 'Resource', properties: [] },
32
+ { value: 'Transport', description: 'Movement of people or goods between locations to facilitate operations', category: 'Resource', superType: 'Resource', properties: [] },
33
+ { value: 'Outcome', description: 'Result of a process', category: 'Outcome', superType: 'Outcome', properties: [] },
34
+ { value: 'Metric', description: 'A measurable quantity', category: 'Outcome', superType: 'Outcome', properties: ['value', 'unit', 'currency'] },
35
+ { value: 'Physical Site', description: 'Physical locations where processes are performed', category: 'Location', superType: 'Location', properties: [] },
36
+ { value: 'Date', description: 'A time anchor (optional node)', category: 'Time', superType: 'Time', properties: ['iso_value', 'offset_days', 'unit'] },
37
+ { value: 'TimeRange', description: 'A TimeRange defines the start and end times for a specific business activity', category: 'Time', superType: 'Time', properties: [] },
38
+ { value: 'Temporal', description: 'A time-based anchor that represents a specific moment, range, or relative offset', category: 'Time', superType: 'Time', properties: [] },
39
+ { value: 'AbsoluteDate', description: 'A specific calendar date used to schedule or track business events', category: 'Time', superType: 'Time', properties: [] },
40
+ { value: 'RelativeOffset', description: 'A RelativeOffset specifies the time difference from a reference point', category: 'Time', superType: 'Time', properties: [] },
41
+ ];
42
+ export const PATH_TYPES = [
43
+ { value: 'has_role', description: 'Assignment of a Position to a Person', category: 'Actor', sourceTypes: ['Person'], targetTypes: ['Position'], multiplicity: 'many-to-many', properties: [] },
44
+ { value: 'reports_to', description: 'Org chart or chain of command', category: 'Actor', sourceTypes: ['Person'], targetTypes: ['Person', 'Position'], multiplicity: 'many-to-many', properties: [] },
45
+ { value: 'member_of', description: 'Person is part of a department/team', category: 'Actor', sourceTypes: ['Person'], targetTypes: ['Group'], multiplicity: 'many-to-many', properties: [] },
46
+ { value: 'responsible_for', description: 'Person is functionally accountable', category: 'Actor', sourceTypes: ['Person'], targetTypes: ['Step', 'Outcome'], multiplicity: 'many-to-many', properties: [] },
47
+ { value: 'assigned_to', description: 'Person is assigned to perform an action', category: 'Actor', sourceTypes: ['Person'], targetTypes: ['Step'], multiplicity: 'many-to-many', properties: [] },
48
+ { value: 'has_skill', description: 'Capability or competency linking People to their abilities', category: 'Actor', sourceTypes: ['Person'], targetTypes: ['Skill'], multiplicity: 'many-to-many', properties: [] },
49
+ { value: 'has_subsidiary', description: 'Parent company owns or controls another business entity', category: 'Actor', sourceTypes: ['Organization'], targetTypes: ['Organization'], multiplicity: 'many-to-many', properties: [] },
50
+ { value: 'operates_under', description: 'Business unit functions under the brand or authority of another organization', category: 'Actor', sourceTypes: ['Organization'], targetTypes: ['Organization'], multiplicity: 'many-to-many', properties: [] },
51
+ { value: 'has_interest', description: 'Partial ownership, investment, or financial interest in another organization', category: 'Actor', sourceTypes: ['Organization', 'Person'], targetTypes: ['Organization'], multiplicity: 'many-to-many', properties: [] },
52
+ { value: 'performs', description: 'Person who executes a step', category: 'Action', sourceTypes: ['Person'], targetTypes: ['Step'], multiplicity: 'many-to-many', properties: [] },
53
+ { value: 'has_step', description: 'Step is part of a Process', category: 'Action', sourceTypes: ['Process'], targetTypes: ['Step'], multiplicity: 'many-to-many', properties: [] },
54
+ { value: 'followed_by', description: 'Indicates order between steps (structural)', category: 'Action', sourceTypes: ['Step'], targetTypes: ['Step'], multiplicity: 'many-to-many', properties: [] },
55
+ { value: 'followed_by_if', description: 'Indicates conditional logic flow', category: 'Action', sourceTypes: ['Step'], targetTypes: ['Step'], multiplicity: 'many-to-many', properties: ['condition'] },
56
+ { value: 'creates_output', description: 'Step produces an artifact or business result', category: 'Action', sourceTypes: ['Step'], targetTypes: ['Artifact', 'Outcome'], multiplicity: 'many-to-many', properties: [] },
57
+ { value: 'from_person', description: 'Who initiated or sent the handoff', category: 'Action', sourceTypes: ['Person'], targetTypes: ['Handoff'], multiplicity: 'many-to-many', properties: [] },
58
+ { value: 'to_person', description: 'Who received the handoff', category: 'Action', sourceTypes: ['Handoff'], targetTypes: ['Person'], multiplicity: 'many-to-many', properties: [] },
59
+ { value: 'handoff_of', description: 'What was handed off — task, artifact, or process step', category: 'Action', sourceTypes: ['Handoff'], targetTypes: ['Step', 'Artifact'], multiplicity: 'many-to-many', properties: [] },
60
+ { value: 'needs_input', description: 'Step depends on artifact or other step', category: 'Resource', sourceTypes: ['Step'], targetTypes: ['Artifact', 'Step'], multiplicity: 'many-to-many', properties: [] },
61
+ { value: 'uses_resource', description: 'Resource used or consumed during a Step', category: 'Resource', sourceTypes: ['Step'], targetTypes: ['System', 'Equipment', 'Transport'], multiplicity: 'many-to-many', properties: [] },
62
+ { value: 'measured_by', description: 'Ties measurable data to a result', category: 'Outcome', sourceTypes: ['Outcome'], targetTypes: ['Metric'], multiplicity: 'many-to-many', properties: [] },
63
+ { value: 'impacts', description: 'Metric influence', category: 'Outcome', sourceTypes: ['Metric'], targetTypes: ['Metric'], multiplicity: 'many-to-many', properties: [] },
64
+ { value: 'located_in', description: 'Actor or event takes place in a location', category: 'Location', sourceTypes: ['Step', 'Person', 'Group'], targetTypes: ['Physical Site'], multiplicity: 'many-to-many', properties: [] },
65
+ { value: 'happens_before', description: 'One Step or Date must occur before another', category: 'Time', sourceTypes: ['Step', 'Date'], targetTypes: ['Step', 'Date'], multiplicity: 'many-to-many', properties: [] },
66
+ { value: 'happens_after', description: 'One Step or Date occurs after another', category: 'Time', sourceTypes: ['Step', 'Date'], targetTypes: ['Step', 'Date'], multiplicity: 'many-to-many', properties: [] },
67
+ { value: 'simultaneous_with', description: 'Two Steps or Dates occur together', category: 'Time', sourceTypes: ['Step', 'Date'], targetTypes: ['Step', 'Date'], multiplicity: 'many-to-many', properties: [] },
68
+ { value: 'has_deadline', description: 'Optional deadline for a step', category: 'Time', sourceTypes: ['Step'], targetTypes: ['Date'], multiplicity: 'many-to-many', properties: [] },
69
+ { value: 'part_of', description: 'Compositional hierarchy within the business ontology', category: 'General', sourceTypes: [], targetTypes: [], multiplicity: 'many-to-many', properties: [] },
70
+ ];
71
+ /** All valid point type names */
72
+ export const VALID_POINT_TYPES = POINT_TYPES.map(p => p.value);
73
+ /** All valid path type names */
74
+ export const VALID_PATH_TYPES = PATH_TYPES.map(p => p.value);
75
+ /** All point type categories */
76
+ export const POINT_CATEGORIES = [...new Set(POINT_TYPES.map(p => p.category))];
77
+ //# sourceMappingURL=ontology-data.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ontology-data.js","sourceRoot":"","sources":["../../src/tools/ontology-data.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAoBH,MAAM,CAAC,MAAM,WAAW,GAAgB;IACtC,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,qBAAqB,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,EAAE;IAC9G,EAAE,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,kCAAkC,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,EAAE;IAC7H,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,qEAAqE,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,EAAE;IAC7J,EAAE,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,mDAAmD,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,EAAE;IAClJ,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,2DAA2D,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,EAAE;IACpJ,EAAE,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,gCAAgC,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,EAAE;IAC5H,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,mCAAmC,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC,UAAU,EAAE,QAAQ,EAAE,QAAQ,CAAC,EAAE;IA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iteAtlasClient } from '../client.js';
7
+ import { MCPTool } from './index.js';
8
+ export declare function createQueryTools(client: GraphiteAtlasClient): MCPTool[];
9
+ //# sourceMappingURL=query.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../src/tools/query.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAoCrC,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,EAAE,CA8EvE"}
@@ -0,0 +1,111 @@
1
+ /**
2
+ * Cypher Query Tool
3
+ *
4
+ * Exposes read-only Cypher queries for complex graph traversals.
5
+ */
6
+ import { z } from 'zod';
7
+ /**
8
+ * Read-only validation: reject any write operations
9
+ */
10
+ const FORBIDDEN_OPERATIONS = [
11
+ 'CREATE',
12
+ 'MERGE',
13
+ 'DELETE',
14
+ 'DETACH',
15
+ 'SET',
16
+ 'REMOVE',
17
+ 'DROP',
18
+ 'CALL',
19
+ 'LOAD',
20
+ 'FOREACH',
21
+ ];
22
+ function validateReadOnly(query) {
23
+ const upperQuery = query.toUpperCase();
24
+ for (const op of FORBIDDEN_OPERATIONS) {
25
+ // Word boundary check to avoid false positives (e.g., "DELETED" as a property)
26
+ const regex = new RegExp(`\\b${op}\\b`);
27
+ if (regex.test(upperQuery)) {
28
+ return {
29
+ valid: false,
30
+ reason: `Query contains forbidden operation: ${op}. Only read-only queries (MATCH, RETURN, WITH, WHERE, ORDER BY, LIMIT) are allowed.`,
31
+ };
32
+ }
33
+ }
34
+ return { valid: true };
35
+ }
36
+ export function createQueryTools(client) {
37
+ return [
38
+ {
39
+ name: 'query_cypher',
40
+ description: `Execute a read-only Cypher query against the graph database. Useful for complex traversals, aggregations, and pattern matching that go beyond the standard tools.
41
+
42
+ The atlas_id is automatically injected as the $atlasId parameter, so use it in your queries to scope to the correct atlas.
43
+
44
+ Only read-only queries are allowed (MATCH, RETURN, WITH, WHERE, ORDER BY, LIMIT, UNWIND, OPTIONAL MATCH). Write operations (CREATE, MERGE, DELETE, SET) are blocked.
45
+
46
+ Example queries:
47
+
48
+ Find all people and their roles:
49
+ MATCH (p:Point {atlasId: $atlasId, type: 'Person'})-[r:PATH]->(pos:Point {type: 'Position'})
50
+ WHERE r.type = 'has_role'
51
+ RETURN p.name as person, pos.name as role
52
+
53
+ Count points by type:
54
+ MATCH (p:Point {atlasId: $atlasId})
55
+ WHERE p.deletedAt IS NULL
56
+ RETURN p.type as type, count(p) as count
57
+ ORDER BY count DESC
58
+
59
+ Multi-hop traversal (who reports to who):
60
+ MATCH path = (p:Point {atlasId: $atlasId, type: 'Person'})-[:PATH*1..3]->(mgr:Point {type: 'Position'})
61
+ RETURN p.name, [n IN nodes(path) | n.name] as chain
62
+ LIMIT 20
63
+
64
+ When to use query_cypher:
65
+ - Multi-hop traversals
66
+ - Aggregations (counts, grouping)
67
+ - Complex filtering
68
+ - Pattern matching across relationship types
69
+ - Any query that would require multiple list/search calls`,
70
+ inputSchema: {
71
+ type: 'object',
72
+ properties: {
73
+ atlas_id: {
74
+ type: 'string',
75
+ description: 'The atlas ID to query',
76
+ },
77
+ query: {
78
+ type: 'string',
79
+ description: 'The Cypher query to execute (read-only)',
80
+ },
81
+ },
82
+ required: ['atlas_id', 'query'],
83
+ },
84
+ async execute(args) {
85
+ const schema = z.object({
86
+ atlas_id: z.string(),
87
+ query: z.string(),
88
+ });
89
+ const { atlas_id, query } = schema.parse(args);
90
+ // Validate read-only
91
+ const validation = validateReadOnly(query);
92
+ if (!validation.valid) {
93
+ return {
94
+ success: false,
95
+ error: validation.reason,
96
+ };
97
+ }
98
+ const results = await client.queryCypher(atlas_id, {
99
+ query,
100
+ parameters: { atlasId: atlas_id },
101
+ });
102
+ return {
103
+ success: true,
104
+ results: Array.isArray(results) ? results : [],
105
+ count: Array.isArray(results) ? results.length : 0,
106
+ };
107
+ },
108
+ },
109
+ ];
110
+ }
111
+ //# sourceMappingURL=query.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query.js","sourceRoot":"","sources":["../../src/tools/query.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,MAAM,oBAAoB,GAAG;IAC3B,QAAQ;IACR,OAAO;IACP,QAAQ;IACR,QAAQ;IACR,KAAK;IACL,QAAQ;IACR,MAAM;IACN,MAAM;IACN,MAAM;IACN,SAAS;CACV,CAAC;AAEF,SAAS,gBAAgB,CAAC,KAAa;IACrC,MAAM,UAAU,GAAG,KAAK,CAAC,WAAW,EAAE,CAAC;IAEvC,KAAK,MAAM,EAAE,IAAI,oBAAoB,EAAE,CAAC;QACtC,+EAA+E;QAC/E,MAAM,KAAK,GAAG,IAAI,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;QACxC,IAAI,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC;YAC3B,OAAO;gBACL,KAAK,EAAE,KAAK;gBACZ,MAAM,EAAE,uCAAuC,EAAE,qFAAqF;aACvI,CAAC;QACJ,CAAC;IACH,CAAC;IAED,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AACzB,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,MAA2B;IAC1D,OAAO;QACL;YACE,IAAI,EAAE,cAAc;YACpB,WAAW,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0DA6BuC;YACpD,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,QAAQ,EAAE;wBACR,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,uBAAuB;qBACrC;oBACD,KAAK,EAAE;wBACL,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,yCAAyC;qBACvD;iBACF;gBACD,QAAQ,EAAE,CAAC,UAAU,EAAE,OAAO,CAAC;aAChC;YACD,KAAK,CAAC,OAAO,CAAC,IAAI;gBAChB,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC;oBACtB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;oBACpB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;iBAClB,CAAC,CAAC;gBAEH,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;gBAE/C,qBAAqB;gBACrB,MAAM,UAAU,GAAG,gBAAgB,CAAC,KAAK,CAAC,CAAC;gBAC3C,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;oBACtB,OAAO;wBACL,OAAO,EAAE,KAAK;wBACd,KAAK,EAAE,UAAU,CAAC,MAAM;qBACzB,CAAC;gBACJ,CAAC;gBAED,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC,WAAW,CAAC,QAAQ,EAAE;oBACjD,KAAK;oBACL,UAAU,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;iBAClC,CAAC,CAAC;gBAEH,OAAO;oBACL,OAAO,EAAE,IAAI;oBACb,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;oBAC9C,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;iBACnD,CAAC;YACJ,CAAC;SACF;KACF,CAAC;AACJ,CAAC"}
@@ -1,7 +1,8 @@
1
1
  /**
2
- * Ontology Validation & Entity Resolution Tools
2
+ * Ontology Validation, Entity Resolution & Lookup Tools
3
3
  *
4
- * Prevents duplicate entities and validates against ontology schema.
4
+ * Prevents duplicate entities, validates against ontology schema,
5
+ * and provides ontology browsing for type discovery.
5
6
  */
6
7
  import { GraphiteAtlasClient } from '../client.js';
7
8
  import { MCPTool } from './index.js';
@@ -1 +1 @@
1
- {"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../src/tools/validation.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAGrC,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,EAAE,CAoV5E"}
1
+ {"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../src/tools/validation.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAUrC,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,EAAE,CA+f5E"}