indra_db_mcp 0.1.6 → 0.1.7

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.
@@ -1,42 +1,33 @@
1
- # Indra: Versioned Thinking Tools
1
+ # Indra: Your Knowledge Memory
2
2
 
3
- You have access to **Indra**, a knowledge graph for externalizing and versioning your reasoning. Use it proactively during complex tasks.
3
+ You have access to **Indra**, a persistent memory for your insights and analysis.
4
4
 
5
5
  ## When to Use Indra
6
6
 
7
- **Search first** when starting work on a topic - you may have prior insights:
8
- - `indra_search` - Find related thoughts before duplicating work
7
+ ### BEFORE answering questions `indra_search`
8
+ - "What should I..." Search for prior recommendations
9
+ - "Which X is better..." → Search for past analysis
10
+ - "How do I..." → Search for previous explanations
11
+ - Any question about preferences, decisions, or past work
9
12
 
10
- **Remember** key insights as you work:
11
- - Observations, hypotheses, conclusions
12
- - Important patterns or surprises
13
- - Decisions and their rationale
14
-
15
- **Connect** related thoughts to build understanding:
16
- - Link new insights to prior ones (derives_from, supports, contradicts)
17
- - Build chains of reasoning visible in the graph
18
-
19
- **Branch** when exploring alternatives:
20
- - Create branches for "what if" scenarios
21
- - Compare different approaches
13
+ ### AFTER providing analysis `indra_remember`
14
+ - You made a recommendation → Save WHY you recommended it
15
+ - You explained something → Save the key insight
16
+ - You analyzed options → Save your conclusions
17
+ - You learned user preferences → Save that context
22
18
 
23
19
  ## Quick Reference
24
20
 
25
- | Situation | Tool |
26
- |-----------|------|
27
- | Starting a task | `indra_search` for prior context |
28
- | Key insight | `indra_remember` to capture it |
29
- | Building on prior thought | `indra_connect` with relationship |
30
- | Exploring alternative | `indra_branch` then explore |
31
- | Finished analysis | `indra_checkpoint` with summary |
21
+ | When | Tool | Example |
22
+ |------|------|---------|
23
+ | Before answering | `indra_search` | Search "gym shoes recommendation" |
24
+ | After analyzing | `indra_remember` | Save "Recommended Hokas for cycling because..." |
25
+ | Finishing a task | `indra_checkpoint` | "Completed workout gear analysis" |
32
26
 
33
- ## Example Flow
27
+ ## Why This Matters
34
28
 
35
- ```
36
- 1. indra_search "database optimization" find prior work
37
- 2. indra_remember "Identified N+1 query in user loader" --id n-plus-one-finding
38
- 3. indra_connect n-plus-one-finding --to prior-perf-analysis --relationship derives_from
39
- 4. indra_checkpoint "Completed initial performance analysis"
40
- ```
29
+ Without Indra, every conversation starts from zero.
30
+ With Indra, you build cumulative knowledge that improves over time.
41
31
 
42
- Use Indra to make your reasoning visible and traceable.
32
+ Use `indra_search` BEFORE answering preference/recommendation questions.
33
+ Use `indra_remember` AFTER providing analysis worth preserving.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "indra_db_mcp",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "MCP server for indra_db - a content-addressed graph database for versioned thoughts",
5
5
  "type": "module",
6
6
  "bin": {
package/src/index.ts CHANGED
@@ -32,37 +32,34 @@ import { EdgeTypes, IndraError } from "./types.js";
32
32
  * 2. When Claude should search for these tools
33
33
  * 3. Key capabilities the server provides
34
34
  */
35
- const SERVER_INSTRUCTIONS = `# Indra: Versioned Thinking Tools
36
-
37
- ## What These Tools Do
38
- Indra provides a **knowledge graph for externalizing and versioning your reasoning**.
39
- Think of it as git for your thoughts - capture insights, connect ideas, and track how
40
- your understanding evolves over time.
41
-
42
- ## When To Search For These Tools
43
- Use Indra tools when you are:
44
- - **Starting complex analysis** - Search for prior insights on the topic before beginning
45
- - **Having key insights** - Capture important observations, hypotheses, or conclusions
46
- - **Building on prior work** - Connect new thoughts to previous ones
47
- - **Exploring alternatives** - Branch to try different approaches without losing progress
48
- - **Completing a unit of work** - Checkpoint your progress with a meaningful summary
49
-
50
- ## Key Capabilities
51
- - \`indra_search\` - Find prior thoughts by semantic meaning (not just keywords)
52
- - \`indra_remember\` - Capture a thought with optional memorable ID
53
- - \`indra_connect\` - Link thoughts with typed relationships (supports, contradicts, derives_from, etc.)
54
- - \`indra_branch\` / \`indra_switch_branch\` - Explore alternative lines of reasoning
55
- - \`indra_checkpoint\` - Save progress with a descriptive commit message
56
- - \`indra_list_thoughts\` / \`indra_explore\` - Review current state and connections
57
-
58
- ## Usage Pattern
59
- 1. Start sessions with \`indra_search\` to find relevant prior work
60
- 2. Use \`indra_remember\` to capture key insights as you work
61
- 3. Use \`indra_connect\` to link related thoughts
62
- 4. Use \`indra_checkpoint\` when completing logical units of analysis
63
-
64
- The user has configured Indra because they want their reasoning process externalized
65
- and versioned. Use these tools proactively during complex tasks.`;
35
+ const SERVER_INSTRUCTIONS = `# Indra: Your Knowledge Memory
36
+
37
+ ## What This Is
38
+ Indra is your persistent memory for insights, recommendations, and analysis.
39
+ When you figure something out, save it. Next time, search for it first.
40
+
41
+ ## CRITICAL: When To Use These Tools
42
+
43
+ ### BEFORE answering questions, use \`indra_search\`:
44
+ - "What should I..." Search for prior recommendations on this topic
45
+ - "Which X is better..." Search for past analysis of similar choices
46
+ - "How do I..." Search for previous explanations you've given
47
+ - Any question about preferences, decisions, or past work
48
+
49
+ ### AFTER providing analysis, use \`indra_remember\`:
50
+ - You made a recommendation → Save WHY you recommended it
51
+ - You explained something Save the key insight
52
+ - You analyzed options Save your conclusions
53
+ - You learned about user preferences Save that context
54
+
55
+ ## Why This Matters
56
+ Without using these tools, every conversation starts from zero.
57
+ With these tools, you build cumulative knowledge that improves over time.
58
+
59
+ ## Quick Reference
60
+ - \`indra_search "topic"\` - Find what you know about a topic BEFORE answering
61
+ - \`indra_remember "insight"\` - Save your analysis AFTER answering
62
+ - \`indra_checkpoint "summary"\` - Mark completion of a unit of work`;
66
63
 
67
64
  const server = new McpServer(
68
65
  {
@@ -118,27 +115,22 @@ function formatError(error: unknown): { content: Array<{ type: "text"; text: str
118
115
 
119
116
  server.tool(
120
117
  "remember",
121
- `🧠 CAPTURE A THOUGHT - Crystallize an idea, insight, or realization into the knowledge graph.
122
-
123
- Use this when you:
124
- - Have an insight worth preserving
125
- - Want to externalize part of your reasoning
126
- - Need to create a reference point for later
127
- - Are building understanding incrementally
128
-
129
- The thought will be embedded for semantic search, allowing you to find it later
130
- by meaning rather than exact words. Each thought becomes a node that can be
131
- connected to others, forming a web of understanding.
132
-
133
- This is how you think out loud - make your reasoning visible and traceable.
134
-
135
- PROACTIVE TRIGGERS - Use this tool when you notice yourself:
136
- - Making a key observation or having an "aha" moment
137
- - Identifying an important pattern or insight
138
- - Drawing a conclusion from analysis
139
- - Forming a hypothesis or assumption
140
- - Noting something surprising or unexpected
141
- - Making a decision with rationale worth preserving`,
118
+ `📝 SAVE YOUR ANALYSIS - Record your reasoning, conclusions, or recommendations for future reference.
119
+
120
+ USE THIS AFTER you:
121
+ - Make a recommendation or decision (save WHY you recommended it)
122
+ - Answer a question that required analysis (save your reasoning)
123
+ - Figure something out (save the insight so you don't forget)
124
+ - Learn something about the user's preferences, situation, or context
125
+
126
+ This creates a searchable record. Next time a similar question comes up,
127
+ you can find your prior analysis instead of starting from scratch.
128
+
129
+ WHEN TO USE:
130
+ - After answering "which X should I use?" save your recommendation rationale
131
+ - After explaining something complex → save the key insight
132
+ - After analyzing a problem save your conclusions
133
+ - When you notice a pattern save it for future reference`,
142
134
  {
143
135
  content: z.string().describe("The thought to capture - be specific and self-contained"),
144
136
  id: z.string().optional().describe("Optional memorable identifier (e.g., 'key-insight-about-X'). Auto-generated if not provided."),
@@ -365,29 +357,24 @@ find related concepts, or understand context.`,
365
357
 
366
358
  server.tool(
367
359
  "search",
368
- `🔮 SEMANTIC SEARCH - Find thoughts by meaning, not just keywords.
369
-
370
- This is powerful: describe what you're looking for conceptually, and find
371
- thoughts that match semantically. The embeddings capture meaning, so:
360
+ `🔍 CHECK PRIOR KNOWLEDGE - Search for relevant context before answering questions.
372
361
 
373
- - "initial hypothesis" might find "my first theory about X"
374
- - "things that went wrong" might find "problems encountered"
375
- - "key decisions" might find "we chose to..."
362
+ CALL THIS FIRST when:
363
+ - Answering questions about user preferences ("what do I like?", "which should I use?")
364
+ - Making recommendations that might have prior context
365
+ - Addressing topics you may have analyzed before
366
+ - The user asks something that sounds familiar
376
367
 
377
- Use this to:
378
- - Rediscover relevant prior thinking
379
- - Find thoughts to connect
380
- - Check if you've already captured something similar
381
- - Surface related ideas you may have forgotten
368
+ This searches your saved analyses, recommendations, and insights by meaning.
369
+ If you've reasoned about this topic before, you'll find it here.
382
370
 
383
- Higher scores = more semantically similar.
371
+ EXAMPLES:
372
+ - User asks "what shoes for the gym?" → search "gym shoes recommendation"
373
+ - User asks "how should I structure this?" → search "architecture decisions"
374
+ - User asks "what's my preference?" → search the relevant topic
384
375
 
385
- PROACTIVE TRIGGERS - Use this tool when you:
386
- - Start working on a new task (search for related prior work)
387
- - Need context on a topic you've explored before
388
- - Want to avoid duplicating previous insights
389
- - Are about to make a decision (check if you've reasoned about this)
390
- - Feel like "I think I've thought about this before"`,
376
+ Returns prior insights ranked by relevance. Use them to give consistent,
377
+ informed answers that build on past reasoning.`,
391
378
  {
392
379
  query: z.string().describe("What you're looking for - describe the meaning/concept"),
393
380
  limit: z.number().min(1).max(100).default(10).describe("Maximum results to return"),