mindgraph-mcp 0.8.0 → 0.9.0
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 +12 -1
- package/dist/index.js +12 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -445,6 +445,15 @@ async function handleRetrieve(client2, args) {
|
|
|
445
445
|
return ok(await client2.getPendingApprovals());
|
|
446
446
|
case "unresolved_contradictions":
|
|
447
447
|
return ok(await client2.getContradictions());
|
|
448
|
+
case "preferences":
|
|
449
|
+
return ok(
|
|
450
|
+
await client2.retrieve({
|
|
451
|
+
action: "preferences",
|
|
452
|
+
...query ? { query, k: limit } : {},
|
|
453
|
+
limit,
|
|
454
|
+
agent_id
|
|
455
|
+
})
|
|
456
|
+
);
|
|
448
457
|
case "layer":
|
|
449
458
|
if (!layer) return err("layer is required for layer retrieval");
|
|
450
459
|
return ok(
|
|
@@ -1002,7 +1011,7 @@ var init_tools = __esm({
|
|
|
1002
1011
|
},
|
|
1003
1012
|
{
|
|
1004
1013
|
name: "mindgraph_retrieve",
|
|
1005
|
-
description: "Search and explore the knowledge graph. Use 'context' (default) for BM25 keyword retrieval \u2014 returns graph nodes only by default (labels, summaries, types, confidence); set include_chunks=true to also get full source text. Pass 1-3 discriminating keywords, not sentences. GOOD: 'Kissinger NATO'. BAD: 'What is Kissinger\\'s view on NATO?'. Use 'document_index' to list all ingested documents (titles, dates, UIDs) for orientation. Use 'semantic' when keywords return nothing \u2014 conceptual/fuzzy queries. Use 'hybrid' for keyword + semantic. Use 'text' for fast keyword-only. Use 'neighborhood'/'chain'/'path'/'subgraph' for graph traversal. Other actions ('active_goals', 'open_questions', etc.) only when the user explicitly asks.",
|
|
1014
|
+
description: "Search and explore the knowledge graph. Use 'context' (default) for BM25 keyword retrieval \u2014 returns graph nodes only by default (labels, summaries, types, confidence); set include_chunks=true to also get full source text. Pass 1-3 discriminating keywords, not sentences. GOOD: 'Kissinger NATO'. BAD: 'What is Kissinger\\'s view on NATO?'. Use 'document_index' to list all ingested documents (titles, dates, UIDs) for orientation. Use 'semantic' when keywords return nothing \u2014 conceptual/fuzzy queries. Use 'hybrid' for keyword + semantic. Use 'text' for fast keyword-only. Use 'neighborhood'/'chain'/'path'/'subgraph' for graph traversal. Use 'preferences' for advice or recommendation requests ('suggest a hotel', 'what should I read?') \u2014 it returns the user's stated/learned preferences relevant to the query (pass the topic as 'query'), so your answer reflects what they actually like instead of being generic. Other structured actions ('active_goals', 'open_questions', etc.) only when the user explicitly asks.",
|
|
1006
1015
|
inputSchema: {
|
|
1007
1016
|
type: "object",
|
|
1008
1017
|
properties: {
|
|
@@ -1018,6 +1027,7 @@ var init_tools = __esm({
|
|
|
1018
1027
|
"weak_claims",
|
|
1019
1028
|
"pending_approvals",
|
|
1020
1029
|
"unresolved_contradictions",
|
|
1030
|
+
"preferences",
|
|
1021
1031
|
"layer",
|
|
1022
1032
|
"recent",
|
|
1023
1033
|
"chain",
|
|
@@ -1383,6 +1393,7 @@ If keyword search returns no results, escalate:
|
|
|
1383
1393
|
- User asks "what documents are in my graph?" \u2192 action "document_index"
|
|
1384
1394
|
- User explicitly asks "what are my goals?" \u2192 action "active_goals"
|
|
1385
1395
|
- User explicitly asks about open questions \u2192 action "open_questions"
|
|
1396
|
+
- User asks for advice or a recommendation ("suggest a hotel", "what should I read?") \u2192 action "preferences", query "topic keywords" \u2014 tailor the answer to what they like
|
|
1386
1397
|
- Explore around a known node \u2192 action "neighborhood" with start_uid
|
|
1387
1398
|
- Find connections between nodes \u2192 action "path" with start_uid + end_uid
|
|
1388
1399
|
|
package/dist/index.js
CHANGED
|
@@ -297,7 +297,7 @@ var TOOLS = [
|
|
|
297
297
|
},
|
|
298
298
|
{
|
|
299
299
|
name: "mindgraph_retrieve",
|
|
300
|
-
description: "Search and explore the knowledge graph. Use 'context' (default) for BM25 keyword retrieval \u2014 returns graph nodes only by default (labels, summaries, types, confidence); set include_chunks=true to also get full source text. Pass 1-3 discriminating keywords, not sentences. GOOD: 'Kissinger NATO'. BAD: 'What is Kissinger\\'s view on NATO?'. Use 'document_index' to list all ingested documents (titles, dates, UIDs) for orientation. Use 'semantic' when keywords return nothing \u2014 conceptual/fuzzy queries. Use 'hybrid' for keyword + semantic. Use 'text' for fast keyword-only. Use 'neighborhood'/'chain'/'path'/'subgraph' for graph traversal. Other actions ('active_goals', 'open_questions', etc.) only when the user explicitly asks.",
|
|
300
|
+
description: "Search and explore the knowledge graph. Use 'context' (default) for BM25 keyword retrieval \u2014 returns graph nodes only by default (labels, summaries, types, confidence); set include_chunks=true to also get full source text. Pass 1-3 discriminating keywords, not sentences. GOOD: 'Kissinger NATO'. BAD: 'What is Kissinger\\'s view on NATO?'. Use 'document_index' to list all ingested documents (titles, dates, UIDs) for orientation. Use 'semantic' when keywords return nothing \u2014 conceptual/fuzzy queries. Use 'hybrid' for keyword + semantic. Use 'text' for fast keyword-only. Use 'neighborhood'/'chain'/'path'/'subgraph' for graph traversal. Use 'preferences' for advice or recommendation requests ('suggest a hotel', 'what should I read?') \u2014 it returns the user's stated/learned preferences relevant to the query (pass the topic as 'query'), so your answer reflects what they actually like instead of being generic. Other structured actions ('active_goals', 'open_questions', etc.) only when the user explicitly asks.",
|
|
301
301
|
inputSchema: {
|
|
302
302
|
type: "object",
|
|
303
303
|
properties: {
|
|
@@ -313,6 +313,7 @@ var TOOLS = [
|
|
|
313
313
|
"weak_claims",
|
|
314
314
|
"pending_approvals",
|
|
315
315
|
"unresolved_contradictions",
|
|
316
|
+
"preferences",
|
|
316
317
|
"layer",
|
|
317
318
|
"recent",
|
|
318
319
|
"chain",
|
|
@@ -1011,6 +1012,15 @@ async function handleRetrieve(client2, args) {
|
|
|
1011
1012
|
return ok(await client2.getPendingApprovals());
|
|
1012
1013
|
case "unresolved_contradictions":
|
|
1013
1014
|
return ok(await client2.getContradictions());
|
|
1015
|
+
case "preferences":
|
|
1016
|
+
return ok(
|
|
1017
|
+
await client2.retrieve({
|
|
1018
|
+
action: "preferences",
|
|
1019
|
+
...query ? { query, k: limit } : {},
|
|
1020
|
+
limit,
|
|
1021
|
+
agent_id
|
|
1022
|
+
})
|
|
1023
|
+
);
|
|
1014
1024
|
case "layer":
|
|
1015
1025
|
if (!layer) return err("layer is required for layer retrieval");
|
|
1016
1026
|
return ok(
|
|
@@ -1340,6 +1350,7 @@ If keyword search returns no results, escalate:
|
|
|
1340
1350
|
- User asks "what documents are in my graph?" \u2192 action "document_index"
|
|
1341
1351
|
- User explicitly asks "what are my goals?" \u2192 action "active_goals"
|
|
1342
1352
|
- User explicitly asks about open questions \u2192 action "open_questions"
|
|
1353
|
+
- User asks for advice or a recommendation ("suggest a hotel", "what should I read?") \u2192 action "preferences", query "topic keywords" \u2014 tailor the answer to what they like
|
|
1343
1354
|
- Explore around a known node \u2192 action "neighborhood" with start_uid
|
|
1344
1355
|
- Find connections between nodes \u2192 action "path" with start_uid + end_uid
|
|
1345
1356
|
|
package/package.json
CHANGED