mindgraph-mcp 0.3.3 → 0.3.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 (3) hide show
  1. package/dist/cli.js +20 -10
  2. package/dist/index.js +20 -10
  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 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.",
877
+ description: "Search the knowledge graph using BM25 keyword matching. Primary action: 'context' \u2014 pass 1\u20133 discriminating keywords (proper nouns, technical terms) extracted from the user's question. Drop filler words (what, how, tell me about, implications of). GOOD: 'Kissinger NATO', 'Rust async runtime'. BAD: 'What is Kissinger\\'s view on NATO?'. 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: {
@@ -895,7 +895,7 @@ var init_tools = __esm({
895
895
  },
896
896
  query: {
897
897
  type: "string",
898
- description: "Keyword search query \u2014 use specific nouns and terms, e.g. 'Rust async runtime' not 'what do I know about async in Rust' (for text, context)"
898
+ description: "BM25 keyword query \u2014 extract 1\u20133 discriminating terms from the user's question, drop filler words. User asks 'What is Kissinger's view on NATO?' \u2192 'Kissinger NATO'. User asks about async in Rust \u2192 'Rust async runtime'. NEVER pass natural language sentences. (for text, context)"
899
899
  },
900
900
  node_types: {
901
901
  type: "array",
@@ -1055,14 +1055,24 @@ When the user asks about something, your FIRST and ONLY action should be a SINGL
1055
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
1057
  **Example:** User says "Tell me about Indian philosophy and Taoism"
1058
- \u2713 CORRECT: \`mindgraph_retrieve({action: "context", query: "Indian philosophy Taoism"})\`
1058
+ \u2713 CORRECT: \`mindgraph_retrieve({action: "context", query: "Indian philosophy Taoism"})\` \u2014 extracted key nouns, dropped "Tell me about"
1059
1059
  \u2717 WRONG: First retrieve active_goals, then open_questions, then search for the topic
1060
+ \u2717 WRONG: \`mindgraph_retrieve({action: "context", query: "Tell me about Indian philosophy and Taoism"})\` \u2014 natural language sentence won't match BM25 index
1060
1061
 
1061
- ## Search query style
1062
+ ## Search query style \u2014 BM25 keyword matching
1062
1063
 
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
+ The search index uses BM25 keyword matching against node labels and summaries. It matches individual words, NOT meaning or concepts. Drop filler words like "what", "how", "implications of", "tell me about". Query with 1\u20133 discriminating terms (proper nouns, technical terms, domain-specific words).
1065
+
1066
+ **Derive keywords from the user's question \u2014 examples:**
1067
+ - User asks "What is Kissinger's view on NATO expansion?" \u2192 query: \`"Kissinger NATO"\`
1068
+ - User asks "Tell me about async programming in Rust" \u2192 query: \`"Rust async runtime"\`
1069
+ - User asks "How does Indian philosophy relate to Taoism?" \u2192 query: \`"Indian philosophy Taoism"\`
1070
+ - User asks "What are the implications of carbon tax policy?" \u2192 query: \`"carbon tax"\`
1071
+
1072
+ **GOOD queries:** \`"Rust async runtime"\`, \`"Kissinger NATO"\`, \`"carbon tax emissions"\`
1073
+ **BAD queries:** \`"what do I know about async programming in Rust?"\`, \`"how does X relate to Y"\`, \`"implications of climate change"\`
1074
+
1075
+ If the first query returns no results, try synonym or related terms (e.g. \`"global warming"\` instead of \`"climate change"\`).
1066
1076
 
1067
1077
  ## When to READ
1068
1078
 
@@ -1094,7 +1104,7 @@ Capture knowledge when the user shares something worth remembering:
1094
1104
  server = new import_server.Server(
1095
1105
  {
1096
1106
  name: "mindgraph",
1097
- version: "0.3.3"
1107
+ version: "0.3.4"
1098
1108
  },
1099
1109
  {
1100
1110
  capabilities: {
@@ -1227,7 +1237,7 @@ Capture knowledge when the user shares something worth remembering:
1227
1237
  role: "user",
1228
1238
  content: {
1229
1239
  type: "text",
1230
- text: `Search my knowledge graph for everything related to "${topic}". Use context retrieval with keyword queries to find entities, claims, evidence, questions, and any connected knowledge. Try multiple keyword variations to ensure broad coverage. Present a structured overview of what I know about this topic, highlighting any gaps or open questions.`
1240
+ text: `Search my knowledge graph for everything related to "${topic}". Use context retrieval with short BM25 keyword queries (1\u20133 discriminating terms extracted from the topic, not full sentences). Try multiple keyword variations and synonyms to ensure broad coverage. Present a structured overview of what I know about this topic, highlighting any gaps or open questions.`
1231
1241
  }
1232
1242
  }
1233
1243
  ]
@@ -1322,7 +1332,7 @@ ${conversation}`
1322
1332
  {
1323
1333
  uriTemplate: "mindgraph://search/{query}",
1324
1334
  name: "Search Results",
1325
- description: "Full-text search across all nodes in the knowledge graph",
1335
+ description: "BM25 keyword search across all nodes \u2014 pass 1\u20133 discriminating terms (e.g. 'Kissinger NATO'), not natural language sentences",
1326
1336
  mimeType: "application/json"
1327
1337
  },
1328
1338
  {
package/dist/index.js CHANGED
@@ -389,7 +389,7 @@ var TOOLS = [
389
389
  },
390
390
  {
391
391
  name: "mindgraph_retrieve",
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.",
392
+ description: "Search the knowledge graph using BM25 keyword matching. Primary action: 'context' \u2014 pass 1\u20133 discriminating keywords (proper nouns, technical terms) extracted from the user's question. Drop filler words (what, how, tell me about, implications of). GOOD: 'Kissinger NATO', 'Rust async runtime'. BAD: 'What is Kissinger\\'s view on NATO?'. 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: {
@@ -410,7 +410,7 @@ var TOOLS = [
410
410
  },
411
411
  query: {
412
412
  type: "string",
413
- description: "Keyword search query \u2014 use specific nouns and terms, e.g. 'Rust async runtime' not 'what do I know about async in Rust' (for text, context)"
413
+ description: "BM25 keyword query \u2014 extract 1\u20133 discriminating terms from the user's question, drop filler words. User asks 'What is Kissinger's view on NATO?' \u2192 'Kissinger NATO'. User asks about async in Rust \u2192 'Rust async runtime'. NEVER pass natural language sentences. (for text, context)"
414
414
  },
415
415
  node_types: {
416
416
  type: "array",
@@ -1012,14 +1012,24 @@ When the user asks about something, your FIRST and ONLY action should be a SINGL
1012
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
1014
  **Example:** User says "Tell me about Indian philosophy and Taoism"
1015
- \u2713 CORRECT: \`mindgraph_retrieve({action: "context", query: "Indian philosophy Taoism"})\`
1015
+ \u2713 CORRECT: \`mindgraph_retrieve({action: "context", query: "Indian philosophy Taoism"})\` \u2014 extracted key nouns, dropped "Tell me about"
1016
1016
  \u2717 WRONG: First retrieve active_goals, then open_questions, then search for the topic
1017
+ \u2717 WRONG: \`mindgraph_retrieve({action: "context", query: "Tell me about Indian philosophy and Taoism"})\` \u2014 natural language sentence won't match BM25 index
1017
1018
 
1018
- ## Search query style
1019
+ ## Search query style \u2014 BM25 keyword matching
1019
1020
 
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
+ The search index uses BM25 keyword matching against node labels and summaries. It matches individual words, NOT meaning or concepts. Drop filler words like "what", "how", "implications of", "tell me about". Query with 1\u20133 discriminating terms (proper nouns, technical terms, domain-specific words).
1022
+
1023
+ **Derive keywords from the user's question \u2014 examples:**
1024
+ - User asks "What is Kissinger's view on NATO expansion?" \u2192 query: \`"Kissinger NATO"\`
1025
+ - User asks "Tell me about async programming in Rust" \u2192 query: \`"Rust async runtime"\`
1026
+ - User asks "How does Indian philosophy relate to Taoism?" \u2192 query: \`"Indian philosophy Taoism"\`
1027
+ - User asks "What are the implications of carbon tax policy?" \u2192 query: \`"carbon tax"\`
1028
+
1029
+ **GOOD queries:** \`"Rust async runtime"\`, \`"Kissinger NATO"\`, \`"carbon tax emissions"\`
1030
+ **BAD queries:** \`"what do I know about async programming in Rust?"\`, \`"how does X relate to Y"\`, \`"implications of climate change"\`
1031
+
1032
+ If the first query returns no results, try synonym or related terms (e.g. \`"global warming"\` instead of \`"climate change"\`).
1023
1033
 
1024
1034
  ## When to READ
1025
1035
 
@@ -1051,7 +1061,7 @@ Capture knowledge when the user shares something worth remembering:
1051
1061
  var server = new import_server.Server(
1052
1062
  {
1053
1063
  name: "mindgraph",
1054
- version: "0.3.3"
1064
+ version: "0.3.4"
1055
1065
  },
1056
1066
  {
1057
1067
  capabilities: {
@@ -1184,7 +1194,7 @@ server.setRequestHandler(import_types.GetPromptRequestSchema, async (request) =>
1184
1194
  role: "user",
1185
1195
  content: {
1186
1196
  type: "text",
1187
- text: `Search my knowledge graph for everything related to "${topic}". Use context retrieval with keyword queries to find entities, claims, evidence, questions, and any connected knowledge. Try multiple keyword variations to ensure broad coverage. Present a structured overview of what I know about this topic, highlighting any gaps or open questions.`
1197
+ text: `Search my knowledge graph for everything related to "${topic}". Use context retrieval with short BM25 keyword queries (1\u20133 discriminating terms extracted from the topic, not full sentences). Try multiple keyword variations and synonyms to ensure broad coverage. Present a structured overview of what I know about this topic, highlighting any gaps or open questions.`
1188
1198
  }
1189
1199
  }
1190
1200
  ]
@@ -1279,7 +1289,7 @@ server.setRequestHandler(import_types.ListResourceTemplatesRequestSchema, async
1279
1289
  {
1280
1290
  uriTemplate: "mindgraph://search/{query}",
1281
1291
  name: "Search Results",
1282
- description: "Full-text search across all nodes in the knowledge graph",
1292
+ description: "BM25 keyword search across all nodes \u2014 pass 1\u20133 discriminating terms (e.g. 'Kissinger NATO'), not natural language sentences",
1283
1293
  mimeType: "application/json"
1284
1294
  },
1285
1295
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mindgraph-mcp",
3
- "version": "0.3.3",
3
+ "version": "0.3.4",
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",