@scitrera/memorylayer-mcp-server 0.0.3 → 0.0.4

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 (40) hide show
  1. package/README.md +115 -10
  2. package/dist/bin/memorylayer-mcp.js +19 -0
  3. package/dist/bin/memorylayer-mcp.js.map +1 -1
  4. package/dist/src/client.d.ts +153 -0
  5. package/dist/src/client.d.ts.map +1 -0
  6. package/dist/src/client.js +330 -0
  7. package/dist/src/client.js.map +1 -0
  8. package/dist/src/handlers.d.ts +33 -0
  9. package/dist/src/handlers.d.ts.map +1 -0
  10. package/dist/src/handlers.js +466 -0
  11. package/dist/src/handlers.js.map +1 -0
  12. package/dist/src/index.d.ts +15 -0
  13. package/dist/src/index.d.ts.map +1 -0
  14. package/dist/src/index.js +13 -0
  15. package/dist/src/index.js.map +1 -0
  16. package/dist/src/server.d.ts +42 -0
  17. package/dist/src/server.d.ts.map +1 -0
  18. package/dist/src/server.js +249 -0
  19. package/dist/src/server.js.map +1 -0
  20. package/dist/src/session.d.ts +68 -0
  21. package/dist/src/session.d.ts.map +1 -0
  22. package/dist/src/session.js +103 -0
  23. package/dist/src/session.js.map +1 -0
  24. package/dist/src/tools.d.ts +1977 -0
  25. package/dist/src/tools.d.ts.map +1 -0
  26. package/dist/src/tools.js +696 -0
  27. package/dist/src/tools.js.map +1 -0
  28. package/dist/src/types.d.ts +136 -0
  29. package/dist/src/types.d.ts.map +1 -0
  30. package/dist/src/types.js +7 -0
  31. package/dist/src/types.js.map +1 -0
  32. package/dist/src/workspace.d.ts +6 -0
  33. package/dist/src/workspace.d.ts.map +1 -0
  34. package/dist/src/workspace.js +35 -0
  35. package/dist/src/workspace.js.map +1 -0
  36. package/package.json +8 -9
  37. package/dist/bin/memorylayer-hook.d.ts +0 -19
  38. package/dist/bin/memorylayer-hook.d.ts.map +0 -1
  39. package/dist/bin/memorylayer-hook.js +0 -223
  40. package/dist/bin/memorylayer-hook.js.map +0 -1
@@ -0,0 +1,696 @@
1
+ /**
2
+ * MCP tool definitions for MemoryLayer.ai
3
+ *
4
+ * Mirrors the Python tool definitions from server/memorylayer/mcp/tools.py
5
+ */
6
+ /**
7
+ * All available MCP tools for MemoryLayer
8
+ */
9
+ export const TOOLS = [
10
+ {
11
+ name: "memory_remember",
12
+ description: "Store a new memory for later recall. Use for facts, preferences, decisions, or events worth remembering.",
13
+ inputSchema: {
14
+ type: "object",
15
+ properties: {
16
+ content: {
17
+ type: "string",
18
+ description: "The memory content to store"
19
+ },
20
+ type: {
21
+ type: "string",
22
+ enum: ["episodic", "semantic", "procedural", "working"],
23
+ description: "Memory type: episodic (events), semantic (facts), procedural (how-to), working (current context)"
24
+ },
25
+ importance: {
26
+ type: "number",
27
+ minimum: 0,
28
+ maximum: 1,
29
+ default: 0.5,
30
+ description: "How important (0-1, default 0.5). Higher values = retained longer and ranked higher in recall"
31
+ },
32
+ tags: {
33
+ type: "array",
34
+ items: { type: "string" },
35
+ description: "Tags for categorization (e.g., ['python', 'bug-fix'])"
36
+ },
37
+ subtype: {
38
+ type: "string",
39
+ enum: ["solution", "problem", "code_pattern", "fix", "error", "workflow", "preference", "decision", "directive"],
40
+ description: "Optional domain-specific classification"
41
+ }
42
+ },
43
+ required: ["content"]
44
+ }
45
+ },
46
+ {
47
+ name: "memory_recall",
48
+ description: "Search memories by semantic query. Returns relevant memories ranked by relevance. Use this to find previously stored information.",
49
+ inputSchema: {
50
+ type: "object",
51
+ properties: {
52
+ query: {
53
+ type: "string",
54
+ description: "Natural language query (e.g., 'How do I fix authentication errors?')"
55
+ },
56
+ types: {
57
+ type: "array",
58
+ items: {
59
+ type: "string",
60
+ enum: ["episodic", "semantic", "procedural", "working"]
61
+ },
62
+ description: "Filter by memory types"
63
+ },
64
+ limit: {
65
+ type: "integer",
66
+ default: 10,
67
+ minimum: 1,
68
+ maximum: 100,
69
+ description: "Max memories to return"
70
+ },
71
+ min_relevance: {
72
+ type: "number",
73
+ minimum: 0,
74
+ maximum: 1,
75
+ description: "Min relevance score (0-1). Omit for server default."
76
+ },
77
+ tags: {
78
+ type: "array",
79
+ items: { type: "string" },
80
+ description: "Filter by tags (AND logic)"
81
+ }
82
+ },
83
+ required: ["query"]
84
+ }
85
+ },
86
+ {
87
+ name: "memory_reflect",
88
+ description: "Synthesize and summarize memories matching a query. Use when you need insights across multiple memories rather than individual recall results.",
89
+ inputSchema: {
90
+ type: "object",
91
+ properties: {
92
+ query: {
93
+ type: "string",
94
+ description: "What to reflect on (e.g., 'What patterns have we seen with database performance?')"
95
+ },
96
+ detail_level: {
97
+ type: "string",
98
+ enum: ["abstract", "overview", "full"],
99
+ description: "Level of detail for reflection output: abstract (brief), overview (medium), full (detailed). Omit for server default."
100
+ },
101
+ include_sources: {
102
+ type: "boolean",
103
+ default: true,
104
+ description: "Include source memory IDs in response"
105
+ },
106
+ depth: {
107
+ type: "integer",
108
+ default: 2,
109
+ minimum: 1,
110
+ maximum: 5,
111
+ description: "Association traversal depth (how many hops to follow)"
112
+ }
113
+ },
114
+ required: ["query"]
115
+ }
116
+ },
117
+ {
118
+ name: "memory_forget",
119
+ description: "Delete or decay a memory when information is outdated or incorrect. Use sparingly - memories are useful historical context.",
120
+ inputSchema: {
121
+ type: "object",
122
+ properties: {
123
+ memory_id: {
124
+ type: "string",
125
+ description: "ID of memory to forget"
126
+ },
127
+ reason: {
128
+ type: "string",
129
+ description: "Why this memory should be forgotten (for audit trail)"
130
+ },
131
+ hard: {
132
+ type: "boolean",
133
+ default: false,
134
+ description: "Hard delete (permanent) vs soft delete (recoverable)"
135
+ }
136
+ },
137
+ required: ["memory_id"]
138
+ }
139
+ },
140
+ {
141
+ name: "memory_associate",
142
+ description: "Link two memories with a relationship. Helps build knowledge graph for traversal and causal reasoning.",
143
+ inputSchema: {
144
+ type: "object",
145
+ properties: {
146
+ source_id: {
147
+ type: "string",
148
+ description: "Source memory ID"
149
+ },
150
+ target_id: {
151
+ type: "string",
152
+ description: "Target memory ID"
153
+ },
154
+ relationship: {
155
+ type: "string",
156
+ description: "Type of relationship between memories (e.g., 'causes', 'solves', 'similar_to', 'part_of', 'related_to'). The server supports ~65 relationship types from its ontology."
157
+ },
158
+ strength: {
159
+ type: "number",
160
+ minimum: 0,
161
+ maximum: 1,
162
+ default: 0.8,
163
+ description: "Strength of association (0-1)"
164
+ }
165
+ },
166
+ required: ["source_id", "target_id", "relationship"]
167
+ }
168
+ },
169
+ {
170
+ name: "memory_briefing",
171
+ description: "Get a session briefing summarizing recent activity and context. Returns workspace stats and recent memory content at configurable detail level. Use at session start or after compaction to regain context.",
172
+ inputSchema: {
173
+ type: "object",
174
+ properties: {
175
+ time_window_minutes: {
176
+ type: "number",
177
+ default: 60,
178
+ description: "Time window in minutes for recent memories (default: 60)"
179
+ },
180
+ detail_level: {
181
+ type: "string",
182
+ enum: ["abstract", "overview", "full"],
183
+ default: "abstract",
184
+ description: "Level of memory detail: abstract (summaries), overview (more detail), full (complete content)"
185
+ },
186
+ limit: {
187
+ type: "number",
188
+ default: 10,
189
+ description: "Maximum number of recent memories to include (max: 50)"
190
+ },
191
+ include_memories: {
192
+ type: "boolean",
193
+ default: true,
194
+ description: "Whether to include recent memory content in the briefing"
195
+ },
196
+ include_contradictions: {
197
+ type: "boolean",
198
+ default: true,
199
+ description: "Flag contradicting memories in briefing"
200
+ }
201
+ }
202
+ }
203
+ },
204
+ // Advanced tools
205
+ {
206
+ name: "memory_statistics",
207
+ description: "Get memory statistics and analytics for the workspace. Use to understand memory usage patterns.",
208
+ inputSchema: {
209
+ type: "object",
210
+ properties: {
211
+ include_breakdown: {
212
+ type: "boolean",
213
+ default: true,
214
+ description: "Include breakdown by type/subtype"
215
+ }
216
+ }
217
+ }
218
+ },
219
+ {
220
+ name: "memory_graph_query",
221
+ description: "Multi-hop graph traversal to find related memories. Use to discover causal chains or knowledge paths.",
222
+ inputSchema: {
223
+ type: "object",
224
+ properties: {
225
+ start_memory_id: {
226
+ type: "string",
227
+ description: "Starting memory ID"
228
+ },
229
+ relationship_types: {
230
+ type: "array",
231
+ items: { type: "string" },
232
+ description: "Filter by relationship types (e.g., ['causes', 'triggers'])"
233
+ },
234
+ max_depth: {
235
+ type: "integer",
236
+ default: 3,
237
+ minimum: 1,
238
+ maximum: 5,
239
+ description: "Maximum traversal depth"
240
+ },
241
+ direction: {
242
+ type: "string",
243
+ enum: ["outgoing", "incoming", "both"],
244
+ default: "both",
245
+ description: "Traversal direction"
246
+ },
247
+ max_paths: {
248
+ type: "integer",
249
+ default: 50,
250
+ description: "Maximum paths to return"
251
+ }
252
+ },
253
+ required: ["start_memory_id"]
254
+ }
255
+ },
256
+ {
257
+ name: "memory_audit",
258
+ description: "Audit memories for contradictions and inconsistencies. Use to maintain knowledge base health.",
259
+ inputSchema: {
260
+ type: "object",
261
+ properties: {
262
+ memory_id: {
263
+ type: "string",
264
+ description: "Specific memory to audit (omit to audit entire workspace)"
265
+ },
266
+ auto_resolve: {
267
+ type: "boolean",
268
+ default: false,
269
+ description: "Automatically mark newer contradicting memories as preferred"
270
+ }
271
+ }
272
+ }
273
+ },
274
+ // TODO: memory_compress - commented out until compression logic is implemented
275
+ // {
276
+ // name: "memory_compress",
277
+ // ...
278
+ // }
279
+ ];
280
+ /**
281
+ * Session-aware tools for working memory management.
282
+ * These are only available when session mode is enabled.
283
+ */
284
+ export const SESSION_TOOLS = [
285
+ {
286
+ name: "memory_session_start",
287
+ description: "Start a new session for working memory. Called automatically by SessionStart hook, but can be called manually. After context compaction, call memory_context_inspect to re-orient with existing sandbox state. Returns session info.",
288
+ inputSchema: {
289
+ type: "object",
290
+ properties: {
291
+ metadata: {
292
+ type: "object",
293
+ description: "Optional metadata to attach to the session"
294
+ }
295
+ }
296
+ }
297
+ },
298
+ {
299
+ name: "memory_session_end",
300
+ description: "End the current session and optionally commit working memory to long-term storage. Called automatically by SessionEnd hook.",
301
+ inputSchema: {
302
+ type: "object",
303
+ properties: {
304
+ commit: {
305
+ type: "boolean",
306
+ default: true,
307
+ description: "Whether to commit working memory to long-term storage (extracts memories)"
308
+ },
309
+ importance_threshold: {
310
+ type: "number",
311
+ minimum: 0,
312
+ maximum: 1,
313
+ default: 0.5,
314
+ description: "Minimum importance for extracted memories"
315
+ }
316
+ }
317
+ }
318
+ },
319
+ {
320
+ name: "memory_session_commit",
321
+ description: "Commit working memory to long-term storage WITHOUT ending the session. Use for checkpoints during long sessions or before potential interruptions. The session remains active after commit.",
322
+ inputSchema: {
323
+ type: "object",
324
+ properties: {
325
+ importance_threshold: {
326
+ type: "number",
327
+ minimum: 0,
328
+ maximum: 1,
329
+ default: 0.5,
330
+ description: "Minimum importance for extracted memories"
331
+ },
332
+ clear_after_commit: {
333
+ type: "boolean",
334
+ default: false,
335
+ description: "Clear working memory after commit (session stays active)"
336
+ }
337
+ }
338
+ }
339
+ },
340
+ {
341
+ name: "memory_session_status",
342
+ description: "Get current session status including working memory summary. Use to check if a session is active.",
343
+ inputSchema: {
344
+ type: "object",
345
+ properties: {}
346
+ }
347
+ },
348
+ ];
349
+ /**
350
+ * Context Environment tools for server-side sandbox execution.
351
+ * These replace the old key-value context tools (memory_context_set/get/list/delete)
352
+ * with a powerful code execution environment backed by the Python API server.
353
+ */
354
+ export const CONTEXT_ENVIRONMENT_TOOLS = [
355
+ {
356
+ name: "memory_context_exec",
357
+ description: "Execute Python code in the server-side sandbox. Variables from prior exec calls are available. Use for data transformation, analysis, and computation on loaded memories.",
358
+ inputSchema: {
359
+ type: "object",
360
+ properties: {
361
+ code: {
362
+ type: "string",
363
+ description: "Python code to execute in sandbox. Variables from prior exec calls are available."
364
+ },
365
+ result_var: {
366
+ type: "string",
367
+ description: "Optional: store the expression result in this variable name"
368
+ },
369
+ return_result: {
370
+ type: "boolean",
371
+ default: true,
372
+ description: "Return execution output to caller. Set false for large intermediate results."
373
+ },
374
+ max_return_chars: {
375
+ type: "integer",
376
+ default: 10000,
377
+ description: "Maximum characters to return. Output beyond this is truncated with a notice."
378
+ }
379
+ },
380
+ required: ["code"]
381
+ }
382
+ },
383
+ {
384
+ name: "memory_context_inspect",
385
+ description: "Inspect variables in the server-side sandbox. Omit variable name for an overview of all variables, or specify one for detailed inspection. IMPORTANT: Call this after context compaction or at the start of continued sessions to re-orient — sandbox state persists server-side even when your context resets.",
386
+ inputSchema: {
387
+ type: "object",
388
+ properties: {
389
+ variable: {
390
+ type: "string",
391
+ description: "Optional: inspect a specific variable in detail. Omit for overview of all variables."
392
+ },
393
+ preview_chars: {
394
+ type: "integer",
395
+ default: 200,
396
+ description: "Characters to include in value previews"
397
+ }
398
+ }
399
+ }
400
+ },
401
+ {
402
+ name: "memory_context_load",
403
+ description: "Load memories from the store into a sandbox variable via semantic search. The loaded memories become available for exec, query, and RLM operations.",
404
+ inputSchema: {
405
+ type: "object",
406
+ properties: {
407
+ var: {
408
+ type: "string",
409
+ description: "Variable name to store loaded memories"
410
+ },
411
+ query: {
412
+ type: "string",
413
+ description: "Semantic search query"
414
+ },
415
+ limit: {
416
+ type: "integer",
417
+ default: 50,
418
+ description: "Maximum memories to load"
419
+ },
420
+ types: {
421
+ type: "array",
422
+ items: {
423
+ type: "string",
424
+ enum: ["episodic", "semantic", "procedural", "working"]
425
+ },
426
+ description: "Filter by memory types"
427
+ },
428
+ tags: {
429
+ type: "array",
430
+ items: { type: "string" },
431
+ description: "Filter by tags"
432
+ },
433
+ min_relevance: {
434
+ type: "number",
435
+ minimum: 0,
436
+ maximum: 1,
437
+ description: "Minimum relevance score"
438
+ },
439
+ include_embeddings: {
440
+ type: "boolean",
441
+ default: false,
442
+ description: "Include embedding vectors (large). Usually false."
443
+ }
444
+ },
445
+ required: ["var", "query"]
446
+ }
447
+ },
448
+ {
449
+ name: "memory_context_inject",
450
+ description: "Inject a value directly into the server-side sandbox as a named variable. Use to pass data from the client into the execution environment.",
451
+ inputSchema: {
452
+ type: "object",
453
+ properties: {
454
+ key: {
455
+ type: "string",
456
+ description: "Variable name in sandbox"
457
+ },
458
+ value: {
459
+ type: "string",
460
+ description: "Value to store (string, JSON string, or code snippet)"
461
+ },
462
+ parse_json: {
463
+ type: "boolean",
464
+ default: false,
465
+ description: "Parse value as JSON before storing (creates dict/list, not string)"
466
+ }
467
+ },
468
+ required: ["key", "value"]
469
+ }
470
+ },
471
+ {
472
+ name: "memory_context_query",
473
+ description: "Ask the server-side LLM a question using sandbox variables as context. The LLM sees the variable data and answers your prompt.",
474
+ inputSchema: {
475
+ type: "object",
476
+ properties: {
477
+ prompt: {
478
+ type: "string",
479
+ description: "Question or instruction for the server LLM to answer using the variable data"
480
+ },
481
+ variables: {
482
+ type: "array",
483
+ items: { type: "string" },
484
+ description: "Variable names to include as context for the LLM query"
485
+ },
486
+ max_context_chars: {
487
+ type: "integer",
488
+ description: "Max chars of variable data to send to LLM. Omit for server default."
489
+ },
490
+ result_var: {
491
+ type: "string",
492
+ description: "Optional: store LLM response in this variable"
493
+ }
494
+ },
495
+ required: ["prompt", "variables"]
496
+ }
497
+ },
498
+ {
499
+ name: "memory_context_rlm",
500
+ description: "Run a Recursive Language Model (RLM) loop: the server LLM iteratively reasons over sandbox data and memories to achieve a goal. Returns a synthesis of findings.",
501
+ inputSchema: {
502
+ type: "object",
503
+ properties: {
504
+ goal: {
505
+ type: "string",
506
+ description: "Natural language goal for the RLM loop"
507
+ },
508
+ memory_query: {
509
+ type: "string",
510
+ description: "Optional: semantic query to pre-load memories into sandbox before RLM loop starts"
511
+ },
512
+ memory_limit: {
513
+ type: "integer",
514
+ default: 100,
515
+ description: "Max memories to pre-load"
516
+ },
517
+ max_iterations: {
518
+ type: "integer",
519
+ default: 10,
520
+ minimum: 1,
521
+ maximum: 50,
522
+ description: "Maximum RLM loop iterations"
523
+ },
524
+ variables: {
525
+ type: "array",
526
+ items: { type: "string" },
527
+ description: "Existing sandbox variables to include as context"
528
+ },
529
+ result_var: {
530
+ type: "string",
531
+ description: "Optional: store the final synthesis in this variable"
532
+ },
533
+ detail_level: {
534
+ type: "string",
535
+ enum: ["brief", "standard", "detailed"],
536
+ default: "standard",
537
+ description: "How much detail to include in the returned synthesis"
538
+ }
539
+ },
540
+ required: ["goal"]
541
+ }
542
+ },
543
+ {
544
+ name: "memory_context_status",
545
+ description: "Get the status of the server-side context environment including sandbox state, active variables, and resource usage. Use after context compaction to check if a sandbox environment still exists.",
546
+ inputSchema: {
547
+ type: "object",
548
+ properties: {}
549
+ }
550
+ },
551
+ {
552
+ name: "memory_context_checkpoint",
553
+ description: "Checkpoint the sandbox state for persistence. Fires persistence hooks so enterprise deployments can save sandbox state to durable storage. No-op for default in-memory deployments.",
554
+ inputSchema: {
555
+ type: "object",
556
+ properties: {}
557
+ }
558
+ },
559
+ ];
560
+ /**
561
+ * Tool profiles for different use cases.
562
+ *
563
+ * The "cc" (Claude Code) profile is the recommended default - it provides
564
+ * the essential tools for agent memory without overwhelming the tool list.
565
+ */
566
+ /** All tool names by category */
567
+ export const TOOL_NAMES = {
568
+ // Core memory operations
569
+ remember: "memory_remember",
570
+ recall: "memory_recall",
571
+ reflect: "memory_reflect",
572
+ forget: "memory_forget",
573
+ associate: "memory_associate",
574
+ // Extended/advanced operations
575
+ briefing: "memory_briefing",
576
+ statistics: "memory_statistics",
577
+ graphQuery: "memory_graph_query",
578
+ audit: "memory_audit",
579
+ // Session management
580
+ sessionStart: "memory_session_start",
581
+ sessionEnd: "memory_session_end",
582
+ sessionCommit: "memory_session_commit",
583
+ sessionStatus: "memory_session_status",
584
+ // Context environment (server-side sandbox)
585
+ contextExec: "memory_context_exec",
586
+ contextInspect: "memory_context_inspect",
587
+ contextLoad: "memory_context_load",
588
+ contextInject: "memory_context_inject",
589
+ contextQuery: "memory_context_query",
590
+ contextRlm: "memory_context_rlm",
591
+ contextStatus: "memory_context_status",
592
+ contextCheckpoint: "memory_context_checkpoint",
593
+ };
594
+ export const TOOL_PROFILES = {
595
+ /**
596
+ * Claude Code profile (DEFAULT)
597
+ *
598
+ * 17 tools optimized for the Claude Code use case:
599
+ * - Core: remember, recall, reflect, forget
600
+ * - Session: session_start, session_end, session_commit, session_status
601
+ * - Utility: briefing
602
+ * - Context Environment: exec, inspect, load, inject, query, rlm, status, checkpoint
603
+ *
604
+ * Excluded (available in "full" profile):
605
+ * - associate: Graph building is advanced, rarely used without guidance
606
+ * - statistics: Admin/debugging, not agent workflow
607
+ * - graph_query: Power user feature
608
+ * - audit: Server-side background task
609
+ */
610
+ cc: [
611
+ TOOL_NAMES.remember,
612
+ TOOL_NAMES.recall,
613
+ TOOL_NAMES.reflect,
614
+ TOOL_NAMES.forget,
615
+ TOOL_NAMES.briefing,
616
+ TOOL_NAMES.sessionStart,
617
+ TOOL_NAMES.sessionEnd,
618
+ TOOL_NAMES.sessionCommit,
619
+ TOOL_NAMES.sessionStatus,
620
+ // Context environment
621
+ TOOL_NAMES.contextExec,
622
+ TOOL_NAMES.contextInspect,
623
+ TOOL_NAMES.contextLoad,
624
+ TOOL_NAMES.contextInject,
625
+ TOOL_NAMES.contextQuery,
626
+ TOOL_NAMES.contextRlm,
627
+ TOOL_NAMES.contextStatus,
628
+ TOOL_NAMES.contextCheckpoint,
629
+ ],
630
+ /**
631
+ * Full profile - all tools enabled
632
+ * For power users, debugging, or advanced graph-based memory use cases.
633
+ */
634
+ full: [
635
+ // Core
636
+ TOOL_NAMES.remember,
637
+ TOOL_NAMES.recall,
638
+ TOOL_NAMES.reflect,
639
+ TOOL_NAMES.forget,
640
+ TOOL_NAMES.associate,
641
+ // Extended
642
+ TOOL_NAMES.briefing,
643
+ TOOL_NAMES.statistics,
644
+ TOOL_NAMES.graphQuery,
645
+ TOOL_NAMES.audit,
646
+ // Session
647
+ TOOL_NAMES.sessionStart,
648
+ TOOL_NAMES.sessionEnd,
649
+ TOOL_NAMES.sessionCommit,
650
+ TOOL_NAMES.sessionStatus,
651
+ // Context environment
652
+ TOOL_NAMES.contextExec,
653
+ TOOL_NAMES.contextInspect,
654
+ TOOL_NAMES.contextLoad,
655
+ TOOL_NAMES.contextInject,
656
+ TOOL_NAMES.contextQuery,
657
+ TOOL_NAMES.contextRlm,
658
+ TOOL_NAMES.contextStatus,
659
+ TOOL_NAMES.contextCheckpoint,
660
+ ],
661
+ /**
662
+ * Minimal profile - just the essentials
663
+ * For testing or extremely constrained environments.
664
+ */
665
+ minimal: [
666
+ TOOL_NAMES.remember,
667
+ TOOL_NAMES.recall,
668
+ ],
669
+ };
670
+ /** Default profile for MCP server */
671
+ export const DEFAULT_PROFILE = "cc";
672
+ /**
673
+ * Get tools for a given profile.
674
+ */
675
+ export function getToolsForProfile(profile) {
676
+ const allTools = [...TOOLS, ...SESSION_TOOLS, ...CONTEXT_ENVIRONMENT_TOOLS];
677
+ const enabledNames = TOOL_PROFILES[profile];
678
+ return allTools.filter(tool => enabledNames.includes(tool.name));
679
+ }
680
+ /**
681
+ * Check if a tool is enabled for a given profile.
682
+ */
683
+ export function isToolEnabled(toolName, profile) {
684
+ return TOOL_PROFILES[profile].includes(toolName);
685
+ }
686
+ // Legacy exports for backwards compatibility
687
+ // TODO: Remove in next major version
688
+ /**
689
+ * @deprecated Use getToolsForProfile("cc") or TOOL_PROFILES instead
690
+ */
691
+ export const CORE_TOOLS = TOOLS.filter(tool => ["memory_remember", "memory_recall", "memory_reflect", "memory_forget", "memory_associate"].includes(tool.name));
692
+ /**
693
+ * @deprecated Use getToolsForProfile("full") or TOOL_PROFILES instead
694
+ */
695
+ export const EXTENDED_TOOLS = TOOLS.filter(tool => ["memory_briefing", "memory_statistics", "memory_graph_query", "memory_audit"].includes(tool.name));
696
+ //# sourceMappingURL=tools.js.map