mindgraph-mcp 0.3.2 → 0.3.3

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 (3) hide show
  1. package/dist/cli.js +40 -39
  2. package/dist/index.js +40 -39
  3. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -874,7 +874,7 @@ var init_tools = __esm({
874
874
  },
875
875
  {
876
876
  name: "mindgraph_retrieve",
877
- description: "Search and query the knowledge graph using full-text search (BM25). Use short keyword queries \u2014 specific nouns and terms, NOT full sentences. Only retrieve when the user's message references or benefits from stored knowledge \u2014 do NOT pre-fetch goals/questions/contradictions unless asked. Actions: 'context' for rich retrieval (FTS + graph traversal, returns connected entities and source chunks), 'text' for fast direct keyword search. Convenience queries (no query needed): 'active_goals', 'open_questions', 'weak_claims', 'pending_approvals', 'unresolved_contradictions'. Use 'layer' to browse a cognitive layer, 'recent' for latest additions.",
877
+ description: "Search the knowledge graph. Primary action: 'context' \u2014 pass a short keyword query (specific nouns/terms, not sentences) for FTS + graph traversal results. Use 'text' for fast keyword-only lookup. Other actions ('active_goals', 'open_questions', 'weak_claims', 'pending_approvals', 'unresolved_contradictions', 'layer', 'recent') are ONLY for when the user explicitly asks about those topics \u2014 never pre-fetch them.",
878
878
  inputSchema: {
879
879
  type: "object",
880
880
  properties: {
@@ -1039,61 +1039,62 @@ var init_src = __esm({
1039
1039
  baseUrl: BASE_URL,
1040
1040
  apiKey: API_KEY
1041
1041
  });
1042
- INSTRUCTIONS = `You have access to a persistent knowledge graph via MindGraph. This is the user's long-term memory \u2014 use it proactively.
1042
+ INSTRUCTIONS = `You have access to a persistent knowledge graph via MindGraph.
1043
1043
 
1044
- ## Critical: minimize latency
1044
+ ## #1 RULE: Go straight to the user's topic
1045
1045
 
1046
- - **Jump straight to the user's topic.** Do NOT pre-fetch goals, open questions, or other convenience queries unless the user specifically asks about them.
1047
- - **Parallelize tool calls.** When you need to search and capture at the same time, issue all calls in a single parallel batch \u2014 never serialize independent calls.
1046
+ When the user asks about something, your FIRST and ONLY action should be a SINGLE \`mindgraph_retrieve\` call with action "context" and keyword terms from their message. Nothing else first.
1048
1047
 
1049
- ## When to READ from the graph
1048
+ **NEVER do any of these before addressing the user's topic:**
1049
+ - Do NOT retrieve active_goals
1050
+ - Do NOT retrieve open_questions
1051
+ - Do NOT retrieve contradictions or weak_claims
1052
+ - Do NOT follow a "session lifecycle" or "warm-up" sequence
1053
+ - Do NOT make multiple serial retrieve calls when one "context" call covers it
1050
1054
 
1051
- Only retrieve when the user's message references or would benefit from stored knowledge:
1052
- - User asks about a topic \u2192 \`mindgraph_retrieve\` with action "context" and keyword query
1053
- - User asks about goals \u2192 \`mindgraph_retrieve\` with action "active_goals"
1054
- - User asks about open questions \u2192 \`mindgraph_retrieve\` with action "open_questions"
1055
- - Before asserting something the user previously told you \u2192 retrieve to check
1055
+ There is no session to open. There is no context to pre-load. Just search for what the user asked about.
1056
1056
 
1057
- Do NOT retrieve preemptively. If the user says "let's discuss X", search for X \u2014 don't also fetch goals, questions, and contradictions.
1057
+ **Example:** User says "Tell me about Indian philosophy and Taoism"
1058
+ \u2713 CORRECT: \`mindgraph_retrieve({action: "context", query: "Indian philosophy Taoism"})\`
1059
+ \u2717 WRONG: First retrieve active_goals, then open_questions, then search for the topic
1058
1060
 
1059
1061
  ## Search query style
1060
1062
 
1061
- MindGraph uses **full-text search (BM25)**, not semantic/embedding search. Write queries as **short keyword phrases**, not natural language questions:
1062
- - GOOD: \`"Rust async runtime"\`, \`"project deadline March"\`, \`"Sarah engineering manager"\`
1063
- - BAD: \`"what do I know about async programming in Rust?"\`, \`"tell me about Sarah's role"\`
1063
+ Full-text search (BM25) \u2014 use short keyword phrases, not natural language:
1064
+ - GOOD: \`"Rust async runtime"\`, \`"Indian philosophy Taoism"\`
1065
+ - BAD: \`"what do I know about async programming in Rust?"\`
1064
1066
 
1065
- Use the most specific nouns and terms from the topic. Multiple keywords broaden recall across label, summary, and content fields.
1067
+ ## When to READ
1066
1068
 
1067
- ## When to WRITE to the graph
1069
+ - User asks about topic X \u2192 \`mindgraph_retrieve\` action "context", query "X keywords"
1070
+ - User explicitly asks "what are my goals?" \u2192 action "active_goals"
1071
+ - User explicitly asks about open questions \u2192 action "open_questions"
1072
+ - Before asserting something the user previously said \u2192 retrieve to check
1073
+ - Parallelize independent calls in a single batch
1068
1074
 
1069
- Store knowledge whenever the user shares something worth remembering:
1070
- - **People, organizations, places, events** \u2192 \`mindgraph_capture\` with action "entity"
1071
- - **Quick notes, preferences, reflections, moods** \u2192 \`mindgraph_journal\`
1072
- - **Factual observations** \u2192 \`mindgraph_capture\` with action "observation"
1073
- - **Claims with evidence** \u2192 \`mindgraph_argue\`
1074
- - **Questions to track** \u2192 \`mindgraph_inquire\` with action "open_question"
1075
- - **Hypotheses or theories** \u2192 \`mindgraph_inquire\` with action "hypothesis" or "theory"
1076
- - **Goals or projects** \u2192 \`mindgraph_commit\`
1077
- - **Decisions** \u2192 \`mindgraph_decide\`
1078
- - **Long-form content** \u2192 \`mindgraph_ingest\`
1075
+ ## When to WRITE
1079
1076
 
1080
- ## Tool selection guide
1077
+ Capture knowledge when the user shares something worth remembering:
1078
+ - People/orgs/places/events \u2192 \`mindgraph_capture\` action "entity"
1079
+ - Quick notes, preferences \u2192 \`mindgraph_journal\`
1080
+ - Factual observations \u2192 \`mindgraph_capture\` action "observation"
1081
+ - Claims with evidence \u2192 \`mindgraph_argue\`
1082
+ - Questions to track \u2192 \`mindgraph_inquire\` action "open_question"
1083
+ - Goals or projects \u2192 \`mindgraph_commit\`
1084
+ - Decisions \u2192 \`mindgraph_decide\`
1085
+ - Long-form content \u2192 \`mindgraph_ingest\`
1081
1086
 
1082
- - **mindgraph_capture vs mindgraph_journal**: \`capture\` for structured entities and factual observations. \`journal\` for informal notes, preferences, and reflections.
1083
- - **mindgraph_argue vs mindgraph_inquire**: \`argue\` when there's evidence. \`inquire\` for open questions and hypotheses without evidence yet.
1084
- - **mindgraph_retrieve "text" vs "context"**: "text" for fast direct keyword lookup. "context" for richer retrieval that follows graph edges to connected entities and source chunks \u2014 best for RAG.
1085
- - **mindgraph_ingest**: For content longer than a paragraph. Automatically extracts entities, claims, and relationships.
1087
+ ## Tool tips
1086
1088
 
1087
- ## Important behaviors
1088
-
1089
- - Be proactive about capturing: if the user mentions a person, place, or organization, capture it
1090
- - Deduplicate: the graph handles deduplication automatically
1091
- - Confidence scores: 0.9+ for stated facts, 0.5-0.8 for uncertain claims, below 0.5 for speculation
1092
- - Don't narrate tool usage \u2014 capture knowledge naturally as part of the conversation`;
1089
+ - \`capture\` for structured/factual, \`journal\` for personal/informal
1090
+ - \`argue\` when evidence exists, \`inquire\` for open questions
1091
+ - \`text\` for fast lookup, \`context\` for rich retrieval with graph traversal
1092
+ - Confidence: 0.9+ for facts, 0.5-0.8 for uncertain, <0.5 for speculation
1093
+ - Don't narrate tool usage \u2014 capture naturally as part of conversation`;
1093
1094
  server = new import_server.Server(
1094
1095
  {
1095
1096
  name: "mindgraph",
1096
- version: "0.2.1"
1097
+ version: "0.3.3"
1097
1098
  },
1098
1099
  {
1099
1100
  capabilities: {
package/dist/index.js CHANGED
@@ -389,7 +389,7 @@ var TOOLS = [
389
389
  },
390
390
  {
391
391
  name: "mindgraph_retrieve",
392
- description: "Search and query the knowledge graph using full-text search (BM25). Use short keyword queries \u2014 specific nouns and terms, NOT full sentences. Only retrieve when the user's message references or benefits from stored knowledge \u2014 do NOT pre-fetch goals/questions/contradictions unless asked. Actions: 'context' for rich retrieval (FTS + graph traversal, returns connected entities and source chunks), 'text' for fast direct keyword search. Convenience queries (no query needed): 'active_goals', 'open_questions', 'weak_claims', 'pending_approvals', 'unresolved_contradictions'. Use 'layer' to browse a cognitive layer, 'recent' for latest additions.",
392
+ description: "Search the knowledge graph. Primary action: 'context' \u2014 pass a short keyword query (specific nouns/terms, not sentences) for FTS + graph traversal results. Use 'text' for fast keyword-only lookup. Other actions ('active_goals', 'open_questions', 'weak_claims', 'pending_approvals', 'unresolved_contradictions', 'layer', 'recent') are ONLY for when the user explicitly asks about those topics \u2014 never pre-fetch them.",
393
393
  inputSchema: {
394
394
  type: "object",
395
395
  properties: {
@@ -996,61 +996,62 @@ var client = new import_mindgraph.MindGraph({
996
996
  baseUrl: BASE_URL,
997
997
  apiKey: API_KEY
998
998
  });
999
- var INSTRUCTIONS = `You have access to a persistent knowledge graph via MindGraph. This is the user's long-term memory \u2014 use it proactively.
999
+ var INSTRUCTIONS = `You have access to a persistent knowledge graph via MindGraph.
1000
1000
 
1001
- ## Critical: minimize latency
1001
+ ## #1 RULE: Go straight to the user's topic
1002
1002
 
1003
- - **Jump straight to the user's topic.** Do NOT pre-fetch goals, open questions, or other convenience queries unless the user specifically asks about them.
1004
- - **Parallelize tool calls.** When you need to search and capture at the same time, issue all calls in a single parallel batch \u2014 never serialize independent calls.
1003
+ When the user asks about something, your FIRST and ONLY action should be a SINGLE \`mindgraph_retrieve\` call with action "context" and keyword terms from their message. Nothing else first.
1005
1004
 
1006
- ## When to READ from the graph
1005
+ **NEVER do any of these before addressing the user's topic:**
1006
+ - Do NOT retrieve active_goals
1007
+ - Do NOT retrieve open_questions
1008
+ - Do NOT retrieve contradictions or weak_claims
1009
+ - Do NOT follow a "session lifecycle" or "warm-up" sequence
1010
+ - Do NOT make multiple serial retrieve calls when one "context" call covers it
1007
1011
 
1008
- Only retrieve when the user's message references or would benefit from stored knowledge:
1009
- - User asks about a topic \u2192 \`mindgraph_retrieve\` with action "context" and keyword query
1010
- - User asks about goals \u2192 \`mindgraph_retrieve\` with action "active_goals"
1011
- - User asks about open questions \u2192 \`mindgraph_retrieve\` with action "open_questions"
1012
- - Before asserting something the user previously told you \u2192 retrieve to check
1012
+ There is no session to open. There is no context to pre-load. Just search for what the user asked about.
1013
1013
 
1014
- Do NOT retrieve preemptively. If the user says "let's discuss X", search for X \u2014 don't also fetch goals, questions, and contradictions.
1014
+ **Example:** User says "Tell me about Indian philosophy and Taoism"
1015
+ \u2713 CORRECT: \`mindgraph_retrieve({action: "context", query: "Indian philosophy Taoism"})\`
1016
+ \u2717 WRONG: First retrieve active_goals, then open_questions, then search for the topic
1015
1017
 
1016
1018
  ## Search query style
1017
1019
 
1018
- MindGraph uses **full-text search (BM25)**, not semantic/embedding search. Write queries as **short keyword phrases**, not natural language questions:
1019
- - GOOD: \`"Rust async runtime"\`, \`"project deadline March"\`, \`"Sarah engineering manager"\`
1020
- - BAD: \`"what do I know about async programming in Rust?"\`, \`"tell me about Sarah's role"\`
1020
+ Full-text search (BM25) \u2014 use short keyword phrases, not natural language:
1021
+ - GOOD: \`"Rust async runtime"\`, \`"Indian philosophy Taoism"\`
1022
+ - BAD: \`"what do I know about async programming in Rust?"\`
1021
1023
 
1022
- Use the most specific nouns and terms from the topic. Multiple keywords broaden recall across label, summary, and content fields.
1024
+ ## When to READ
1023
1025
 
1024
- ## When to WRITE to the graph
1026
+ - User asks about topic X \u2192 \`mindgraph_retrieve\` action "context", query "X keywords"
1027
+ - User explicitly asks "what are my goals?" \u2192 action "active_goals"
1028
+ - User explicitly asks about open questions \u2192 action "open_questions"
1029
+ - Before asserting something the user previously said \u2192 retrieve to check
1030
+ - Parallelize independent calls in a single batch
1025
1031
 
1026
- Store knowledge whenever the user shares something worth remembering:
1027
- - **People, organizations, places, events** \u2192 \`mindgraph_capture\` with action "entity"
1028
- - **Quick notes, preferences, reflections, moods** \u2192 \`mindgraph_journal\`
1029
- - **Factual observations** \u2192 \`mindgraph_capture\` with action "observation"
1030
- - **Claims with evidence** \u2192 \`mindgraph_argue\`
1031
- - **Questions to track** \u2192 \`mindgraph_inquire\` with action "open_question"
1032
- - **Hypotheses or theories** \u2192 \`mindgraph_inquire\` with action "hypothesis" or "theory"
1033
- - **Goals or projects** \u2192 \`mindgraph_commit\`
1034
- - **Decisions** \u2192 \`mindgraph_decide\`
1035
- - **Long-form content** \u2192 \`mindgraph_ingest\`
1032
+ ## When to WRITE
1036
1033
 
1037
- ## Tool selection guide
1034
+ Capture knowledge when the user shares something worth remembering:
1035
+ - People/orgs/places/events \u2192 \`mindgraph_capture\` action "entity"
1036
+ - Quick notes, preferences \u2192 \`mindgraph_journal\`
1037
+ - Factual observations \u2192 \`mindgraph_capture\` action "observation"
1038
+ - Claims with evidence \u2192 \`mindgraph_argue\`
1039
+ - Questions to track \u2192 \`mindgraph_inquire\` action "open_question"
1040
+ - Goals or projects \u2192 \`mindgraph_commit\`
1041
+ - Decisions \u2192 \`mindgraph_decide\`
1042
+ - Long-form content \u2192 \`mindgraph_ingest\`
1038
1043
 
1039
- - **mindgraph_capture vs mindgraph_journal**: \`capture\` for structured entities and factual observations. \`journal\` for informal notes, preferences, and reflections.
1040
- - **mindgraph_argue vs mindgraph_inquire**: \`argue\` when there's evidence. \`inquire\` for open questions and hypotheses without evidence yet.
1041
- - **mindgraph_retrieve "text" vs "context"**: "text" for fast direct keyword lookup. "context" for richer retrieval that follows graph edges to connected entities and source chunks \u2014 best for RAG.
1042
- - **mindgraph_ingest**: For content longer than a paragraph. Automatically extracts entities, claims, and relationships.
1044
+ ## Tool tips
1043
1045
 
1044
- ## Important behaviors
1045
-
1046
- - Be proactive about capturing: if the user mentions a person, place, or organization, capture it
1047
- - Deduplicate: the graph handles deduplication automatically
1048
- - Confidence scores: 0.9+ for stated facts, 0.5-0.8 for uncertain claims, below 0.5 for speculation
1049
- - Don't narrate tool usage \u2014 capture knowledge naturally as part of the conversation`;
1046
+ - \`capture\` for structured/factual, \`journal\` for personal/informal
1047
+ - \`argue\` when evidence exists, \`inquire\` for open questions
1048
+ - \`text\` for fast lookup, \`context\` for rich retrieval with graph traversal
1049
+ - Confidence: 0.9+ for facts, 0.5-0.8 for uncertain, <0.5 for speculation
1050
+ - Don't narrate tool usage \u2014 capture naturally as part of conversation`;
1050
1051
  var server = new import_server.Server(
1051
1052
  {
1052
1053
  name: "mindgraph",
1053
- version: "0.2.1"
1054
+ version: "0.3.3"
1054
1055
  },
1055
1056
  {
1056
1057
  capabilities: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mindgraph-mcp",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "MCP server for MindGraph — connect Claude Desktop, Claude Code, and any MCP client to your knowledge graph",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",