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.
- package/dist/cli.js +33 -33
- package/dist/index.js +33 -33
- 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.
|
|
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).
|
|
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.
|
|
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
|
-
##
|
|
1125
|
+
## Critical: minimize latency
|
|
1126
1126
|
|
|
1127
|
-
|
|
1128
|
-
- **
|
|
1129
|
-
- **
|
|
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
|
-
|
|
1141
|
-
-
|
|
1142
|
-
-
|
|
1143
|
-
-
|
|
1144
|
-
-
|
|
1145
|
-
|
|
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
|
-
##
|
|
1149
|
+
## When to WRITE to the graph
|
|
1156
1150
|
|
|
1157
|
-
|
|
1158
|
-
-
|
|
1159
|
-
-
|
|
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**:
|
|
1164
|
-
- **mindgraph_argue vs mindgraph_inquire**:
|
|
1165
|
-
- **
|
|
1166
|
-
- **
|
|
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
|
|
1172
|
-
- Deduplicate: the graph handles
|
|
1173
|
-
- Confidence scores:
|
|
1174
|
-
- Don't narrate tool usage
|
|
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.
|
|
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).
|
|
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
|
-
##
|
|
1082
|
+
## Critical: minimize latency
|
|
1083
1083
|
|
|
1084
|
-
|
|
1085
|
-
- **
|
|
1086
|
-
- **
|
|
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
|
-
|
|
1098
|
-
-
|
|
1099
|
-
-
|
|
1100
|
-
-
|
|
1101
|
-
-
|
|
1102
|
-
|
|
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
|
-
##
|
|
1106
|
+
## When to WRITE to the graph
|
|
1113
1107
|
|
|
1114
|
-
|
|
1115
|
-
-
|
|
1116
|
-
-
|
|
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**:
|
|
1121
|
-
- **mindgraph_argue vs mindgraph_inquire**:
|
|
1122
|
-
- **
|
|
1123
|
-
- **
|
|
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
|
|
1129
|
-
- Deduplicate: the graph handles
|
|
1130
|
-
- Confidence scores:
|
|
1131
|
-
- Don't narrate tool usage
|
|
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.
|
|
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