mindgraph-mcp 0.3.0 → 0.3.1

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 +33 -33
  2. package/dist/index.js +33 -33
  3. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -537,7 +537,7 @@ var init_tools = __esm({
537
537
  TOOLS = [
538
538
  {
539
539
  name: "mindgraph_session",
540
- description: "Manage conversation sessions. ALWAYS open a session at the start of a substantial conversation (label it with the topic). Use 'trace' to bookmark key moments (decisions made, important facts shared). Close the session at the end with a summary of what was discussed. Sessions enable the graph to track conversation continuity and trigger knowledge distillation on close.",
540
+ description: "Manage conversation sessions. Only open a session for long, substantive conversations \u2014 never as a first action. Use 'trace' to bookmark key moments (decisions, important facts). Close with a summary to trigger knowledge distillation. Sessions track conversation continuity but are optional for short interactions.",
541
541
  inputSchema: {
542
542
  type: "object",
543
543
  properties: {
@@ -955,7 +955,7 @@ var init_tools = __esm({
955
955
  },
956
956
  {
957
957
  name: "mindgraph_retrieve",
958
- description: "Search and query the knowledge graph using full-text search (BM25). ALWAYS retrieve before answering questions about previously stored knowledge. Use short keyword queries \u2014 specific nouns and terms, NOT full sentences. Actions: 'context' for rich retrieval (FTS + graph traversal \u2014 best for RAG, 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 specific cognitive layer, 'recent' for latest additions.",
958
+ 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.",
959
959
  inputSchema: {
960
960
  type: "object",
961
961
  properties: {
@@ -1095,7 +1095,7 @@ async function main() {
1095
1095
  const transport = new import_stdio.StdioServerTransport();
1096
1096
  await server.connect(transport);
1097
1097
  console.error(
1098
- `MindGraph MCP server v0.3.0 running on stdio (${BASE_URL})`
1098
+ `MindGraph MCP server v0.3.1 running on stdio (${BASE_URL})`
1099
1099
  );
1100
1100
  }
1101
1101
  var import_server, import_stdio, import_types, import_mindgraph, API_KEY, BASE_URL, AGENT_ID, client, INSTRUCTIONS, server, PROMPTS;
@@ -1122,27 +1122,21 @@ var init_src = __esm({
1122
1122
  });
1123
1123
  INSTRUCTIONS = `You have access to a persistent knowledge graph via MindGraph. This is the user's long-term memory \u2014 use it proactively.
1124
1124
 
1125
- ## When to WRITE to the graph
1125
+ ## Critical: minimize latency
1126
1126
 
1127
- Store knowledge whenever the user shares something worth remembering:
1128
- - **People, organizations, places, events** \u2192 \`mindgraph_capture\` with action "entity" and the appropriate entity_type
1129
- - **Quick notes, preferences, reflections, moods** \u2192 \`mindgraph_journal\`
1130
- - **Factual observations about the world** \u2192 \`mindgraph_capture\` with action "observation"
1131
- - **Claims that could be true or false** \u2192 \`mindgraph_argue\` (with evidence if available)
1132
- - **Questions to investigate later** \u2192 \`mindgraph_inquire\` with action "open_question"
1133
- - **Hypotheses or theories** \u2192 \`mindgraph_inquire\` with action "hypothesis" or "theory"
1134
- - **Goals or projects the user is working on** \u2192 \`mindgraph_commit\`
1135
- - **Decisions being made** \u2192 \`mindgraph_decide\` (open, add options, resolve)
1136
- - **Long-form content (articles, transcripts, documents)** \u2192 \`mindgraph_ingest\`
1127
+ - **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.
1128
+ - **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.
1129
+ - **Sessions are optional.** Only open a session if the conversation is long and substantive. Never open a session as a first action \u2014 answer the user's question first, then open a session in the background if warranted.
1137
1130
 
1138
1131
  ## When to READ from the graph
1139
1132
 
1140
- Retrieve context before answering questions that might benefit from prior knowledge:
1141
- - **"What do I know about X?"** \u2192 \`mindgraph_retrieve\` with action "context" and keyword query
1142
- - **"What are my goals?"** \u2192 \`mindgraph_retrieve\` with action "active_goals"
1143
- - **"What questions are open?"** \u2192 \`mindgraph_retrieve\` with action "open_questions"
1144
- - **Anything referencing past conversations or stored knowledge** \u2192 \`mindgraph_retrieve\` with action "context"
1145
- - **Before making claims about things the user has told you** \u2192 retrieve first to avoid contradictions
1133
+ Only retrieve when the user's message references or would benefit from stored knowledge:
1134
+ - User asks about a topic \u2192 \`mindgraph_retrieve\` with action "context" and keyword query
1135
+ - User asks about goals \u2192 \`mindgraph_retrieve\` with action "active_goals"
1136
+ - User asks about open questions \u2192 \`mindgraph_retrieve\` with action "open_questions"
1137
+ - Before asserting something the user previously told you \u2192 retrieve to check
1138
+
1139
+ Do NOT retrieve preemptively. If the user says "let's discuss X", search for X \u2014 don't also fetch goals, questions, and contradictions.
1146
1140
 
1147
1141
  ## Search query style
1148
1142
 
@@ -1152,26 +1146,32 @@ MindGraph uses **full-text search (BM25)**, not semantic/embedding search. Write
1152
1146
 
1153
1147
  Use the most specific nouns and terms from the topic. Multiple keywords broaden recall across label, summary, and content fields.
1154
1148
 
1155
- ## Session management
1149
+ ## When to WRITE to the graph
1156
1150
 
1157
- - Open a session with \`mindgraph_session\` action "open" at the start of a substantial conversation
1158
- - Use action "trace" to mark key moments during the conversation
1159
- - Close the session with action "close" and a summary at the end
1151
+ Store knowledge whenever the user shares something worth remembering:
1152
+ - **People, organizations, places, events** \u2192 \`mindgraph_capture\` with action "entity"
1153
+ - **Quick notes, preferences, reflections, moods** \u2192 \`mindgraph_journal\`
1154
+ - **Factual observations** \u2192 \`mindgraph_capture\` with action "observation"
1155
+ - **Claims with evidence** \u2192 \`mindgraph_argue\`
1156
+ - **Questions to track** \u2192 \`mindgraph_inquire\` with action "open_question"
1157
+ - **Hypotheses or theories** \u2192 \`mindgraph_inquire\` with action "hypothesis" or "theory"
1158
+ - **Goals or projects** \u2192 \`mindgraph_commit\`
1159
+ - **Decisions** \u2192 \`mindgraph_decide\`
1160
+ - **Long-form content** \u2192 \`mindgraph_ingest\`
1160
1161
 
1161
1162
  ## Tool selection guide
1162
1163
 
1163
- - **mindgraph_capture vs mindgraph_journal**: Use \`capture\` for structured entities (people, orgs, places) and factual observations. Use \`journal\` for informal notes, preferences, reflections, and anything that's more about the user's inner state than external facts.
1164
- - **mindgraph_argue vs mindgraph_inquire**: Use \`argue\` when there's a specific claim with supporting evidence. Use \`inquire\` for open-ended questions, hypotheses without evidence yet, or theoretical frameworks.
1165
- - **mindgraph_commit vs mindgraph_plan**: Use \`commit\` for the user's goals, projects, and milestones. Use \`plan\` for agent-level task management and execution tracking.
1166
- - **mindgraph_retrieve "text" vs "context"**: Use "text" for fast direct keyword lookup. Use "context" for richer retrieval that searches nodes via FTS, then follows graph edges to find connected entities, claims, and source chunks \u2014 best for RAG and comprehensive answers.
1167
- - **mindgraph_ingest**: Use for any content longer than a paragraph. It automatically extracts entities, claims, and relationships. For short facts, use the specific cognitive tools instead.
1164
+ - **mindgraph_capture vs mindgraph_journal**: \`capture\` for structured entities and factual observations. \`journal\` for informal notes, preferences, and reflections.
1165
+ - **mindgraph_argue vs mindgraph_inquire**: \`argue\` when there's evidence. \`inquire\` for open questions and hypotheses without evidence yet.
1166
+ - **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.
1167
+ - **mindgraph_ingest**: For content longer than a paragraph. Automatically extracts entities, claims, and relationships.
1168
1168
 
1169
1169
  ## Important behaviors
1170
1170
 
1171
- - Be proactive: if the user mentions a person, place, or organization you haven't captured yet, capture it
1172
- - Deduplicate: the graph handles entity deduplication automatically \u2014 don't worry about creating duplicates
1173
- - Confidence scores: use 0.9+ for things the user states as fact, 0.5-0.8 for uncertain claims, below 0.5 for speculation
1174
- - Don't narrate tool usage excessively \u2014 capture knowledge naturally as part of the conversation`;
1171
+ - Be proactive about capturing: if the user mentions a person, place, or organization, capture it
1172
+ - Deduplicate: the graph handles deduplication automatically
1173
+ - Confidence scores: 0.9+ for stated facts, 0.5-0.8 for uncertain claims, below 0.5 for speculation
1174
+ - Don't narrate tool usage \u2014 capture knowledge naturally as part of the conversation`;
1175
1175
  server = new import_server.Server(
1176
1176
  {
1177
1177
  name: "mindgraph",
package/dist/index.js CHANGED
@@ -10,7 +10,7 @@ var import_mindgraph = require("mindgraph");
10
10
  var TOOLS = [
11
11
  {
12
12
  name: "mindgraph_session",
13
- description: "Manage conversation sessions. ALWAYS open a session at the start of a substantial conversation (label it with the topic). Use 'trace' to bookmark key moments (decisions made, important facts shared). Close the session at the end with a summary of what was discussed. Sessions enable the graph to track conversation continuity and trigger knowledge distillation on close.",
13
+ description: "Manage conversation sessions. Only open a session for long, substantive conversations \u2014 never as a first action. Use 'trace' to bookmark key moments (decisions, important facts). Close with a summary to trigger knowledge distillation. Sessions track conversation continuity but are optional for short interactions.",
14
14
  inputSchema: {
15
15
  type: "object",
16
16
  properties: {
@@ -428,7 +428,7 @@ var TOOLS = [
428
428
  },
429
429
  {
430
430
  name: "mindgraph_retrieve",
431
- description: "Search and query the knowledge graph using full-text search (BM25). ALWAYS retrieve before answering questions about previously stored knowledge. Use short keyword queries \u2014 specific nouns and terms, NOT full sentences. Actions: 'context' for rich retrieval (FTS + graph traversal \u2014 best for RAG, 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 specific cognitive layer, 'recent' for latest additions.",
431
+ 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.",
432
432
  inputSchema: {
433
433
  type: "object",
434
434
  properties: {
@@ -1079,27 +1079,21 @@ var client = new import_mindgraph.MindGraph({
1079
1079
  });
1080
1080
  var INSTRUCTIONS = `You have access to a persistent knowledge graph via MindGraph. This is the user's long-term memory \u2014 use it proactively.
1081
1081
 
1082
- ## When to WRITE to the graph
1082
+ ## Critical: minimize latency
1083
1083
 
1084
- Store knowledge whenever the user shares something worth remembering:
1085
- - **People, organizations, places, events** \u2192 \`mindgraph_capture\` with action "entity" and the appropriate entity_type
1086
- - **Quick notes, preferences, reflections, moods** \u2192 \`mindgraph_journal\`
1087
- - **Factual observations about the world** \u2192 \`mindgraph_capture\` with action "observation"
1088
- - **Claims that could be true or false** \u2192 \`mindgraph_argue\` (with evidence if available)
1089
- - **Questions to investigate later** \u2192 \`mindgraph_inquire\` with action "open_question"
1090
- - **Hypotheses or theories** \u2192 \`mindgraph_inquire\` with action "hypothesis" or "theory"
1091
- - **Goals or projects the user is working on** \u2192 \`mindgraph_commit\`
1092
- - **Decisions being made** \u2192 \`mindgraph_decide\` (open, add options, resolve)
1093
- - **Long-form content (articles, transcripts, documents)** \u2192 \`mindgraph_ingest\`
1084
+ - **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.
1085
+ - **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.
1086
+ - **Sessions are optional.** Only open a session if the conversation is long and substantive. Never open a session as a first action \u2014 answer the user's question first, then open a session in the background if warranted.
1094
1087
 
1095
1088
  ## When to READ from the graph
1096
1089
 
1097
- Retrieve context before answering questions that might benefit from prior knowledge:
1098
- - **"What do I know about X?"** \u2192 \`mindgraph_retrieve\` with action "context" and keyword query
1099
- - **"What are my goals?"** \u2192 \`mindgraph_retrieve\` with action "active_goals"
1100
- - **"What questions are open?"** \u2192 \`mindgraph_retrieve\` with action "open_questions"
1101
- - **Anything referencing past conversations or stored knowledge** \u2192 \`mindgraph_retrieve\` with action "context"
1102
- - **Before making claims about things the user has told you** \u2192 retrieve first to avoid contradictions
1090
+ Only retrieve when the user's message references or would benefit from stored knowledge:
1091
+ - User asks about a topic \u2192 \`mindgraph_retrieve\` with action "context" and keyword query
1092
+ - User asks about goals \u2192 \`mindgraph_retrieve\` with action "active_goals"
1093
+ - User asks about open questions \u2192 \`mindgraph_retrieve\` with action "open_questions"
1094
+ - Before asserting something the user previously told you \u2192 retrieve to check
1095
+
1096
+ Do NOT retrieve preemptively. If the user says "let's discuss X", search for X \u2014 don't also fetch goals, questions, and contradictions.
1103
1097
 
1104
1098
  ## Search query style
1105
1099
 
@@ -1109,26 +1103,32 @@ MindGraph uses **full-text search (BM25)**, not semantic/embedding search. Write
1109
1103
 
1110
1104
  Use the most specific nouns and terms from the topic. Multiple keywords broaden recall across label, summary, and content fields.
1111
1105
 
1112
- ## Session management
1106
+ ## When to WRITE to the graph
1113
1107
 
1114
- - Open a session with \`mindgraph_session\` action "open" at the start of a substantial conversation
1115
- - Use action "trace" to mark key moments during the conversation
1116
- - Close the session with action "close" and a summary at the end
1108
+ Store knowledge whenever the user shares something worth remembering:
1109
+ - **People, organizations, places, events** \u2192 \`mindgraph_capture\` with action "entity"
1110
+ - **Quick notes, preferences, reflections, moods** \u2192 \`mindgraph_journal\`
1111
+ - **Factual observations** \u2192 \`mindgraph_capture\` with action "observation"
1112
+ - **Claims with evidence** \u2192 \`mindgraph_argue\`
1113
+ - **Questions to track** \u2192 \`mindgraph_inquire\` with action "open_question"
1114
+ - **Hypotheses or theories** \u2192 \`mindgraph_inquire\` with action "hypothesis" or "theory"
1115
+ - **Goals or projects** \u2192 \`mindgraph_commit\`
1116
+ - **Decisions** \u2192 \`mindgraph_decide\`
1117
+ - **Long-form content** \u2192 \`mindgraph_ingest\`
1117
1118
 
1118
1119
  ## Tool selection guide
1119
1120
 
1120
- - **mindgraph_capture vs mindgraph_journal**: Use \`capture\` for structured entities (people, orgs, places) and factual observations. Use \`journal\` for informal notes, preferences, reflections, and anything that's more about the user's inner state than external facts.
1121
- - **mindgraph_argue vs mindgraph_inquire**: Use \`argue\` when there's a specific claim with supporting evidence. Use \`inquire\` for open-ended questions, hypotheses without evidence yet, or theoretical frameworks.
1122
- - **mindgraph_commit vs mindgraph_plan**: Use \`commit\` for the user's goals, projects, and milestones. Use \`plan\` for agent-level task management and execution tracking.
1123
- - **mindgraph_retrieve "text" vs "context"**: Use "text" for fast direct keyword lookup. Use "context" for richer retrieval that searches nodes via FTS, then follows graph edges to find connected entities, claims, and source chunks \u2014 best for RAG and comprehensive answers.
1124
- - **mindgraph_ingest**: Use for any content longer than a paragraph. It automatically extracts entities, claims, and relationships. For short facts, use the specific cognitive tools instead.
1121
+ - **mindgraph_capture vs mindgraph_journal**: \`capture\` for structured entities and factual observations. \`journal\` for informal notes, preferences, and reflections.
1122
+ - **mindgraph_argue vs mindgraph_inquire**: \`argue\` when there's evidence. \`inquire\` for open questions and hypotheses without evidence yet.
1123
+ - **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.
1124
+ - **mindgraph_ingest**: For content longer than a paragraph. Automatically extracts entities, claims, and relationships.
1125
1125
 
1126
1126
  ## Important behaviors
1127
1127
 
1128
- - Be proactive: if the user mentions a person, place, or organization you haven't captured yet, capture it
1129
- - Deduplicate: the graph handles entity deduplication automatically \u2014 don't worry about creating duplicates
1130
- - Confidence scores: use 0.9+ for things the user states as fact, 0.5-0.8 for uncertain claims, below 0.5 for speculation
1131
- - Don't narrate tool usage excessively \u2014 capture knowledge naturally as part of the conversation`;
1128
+ - Be proactive about capturing: if the user mentions a person, place, or organization, capture it
1129
+ - Deduplicate: the graph handles deduplication automatically
1130
+ - Confidence scores: 0.9+ for stated facts, 0.5-0.8 for uncertain claims, below 0.5 for speculation
1131
+ - Don't narrate tool usage \u2014 capture knowledge naturally as part of the conversation`;
1132
1132
  var server = new import_server.Server(
1133
1133
  {
1134
1134
  name: "mindgraph",
@@ -1490,7 +1490,7 @@ async function main() {
1490
1490
  const transport = new import_stdio.StdioServerTransport();
1491
1491
  await server.connect(transport);
1492
1492
  console.error(
1493
- `MindGraph MCP server v0.3.0 running on stdio (${BASE_URL})`
1493
+ `MindGraph MCP server v0.3.1 running on stdio (${BASE_URL})`
1494
1494
  );
1495
1495
  }
1496
1496
  main().catch((error) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mindgraph-mcp",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
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",