# v1.7.0: Knowledge Context Explorer — One Call to Understand Any Topic

We just shipped [Knowledge Keeper MCP v1.7.0](https://github.com/zsc-glitch/knowledge-keeper-mcp) with a new tool that solves a real pain point for AI agents: **understanding the context around a knowledge point without multiple round-trip queries**.

## The Problem

When an AI agent needs to understand a topic in your knowledge base, it typically does this:

```
1. knowledge_get(id)          → get the target item
2. knowledge_get_linked(id)   → get linked items
3. knowledge_search(query)    → find related by topic
4. Manually synthesize all results
```

That's **4 tool calls minimum**, each burning tokens and adding latency. For a coding agent working through a complex problem, this adds up fast.

## The Solution: `knowledge_context`

One call does it all:

```
knowledge_context(id="kp-cp-morwwiaq-bwk5zy", depth="standard")
```

Returns the target item plus its full **knowledge neighborhood**:

```
📌 Machine Learning Basics (concept)
   ID: kp-cp-morwwiaq-bwk5zy
   标签: ai, ml, fundamentals
   创建: 2026-04-28

---

📎 关联知识点 (6 个):

1. [decision] Use BM25 for keyword search
   原因: 共享标签: ai, search | 相关度: 73%
   
2. [concept] Neural Networks
   原因: 直接链接 | 相关度: 100%
   
3. [note] TF-IDF vs BM25 Comparison
   原因: 共享标签: search | 相关度: 65%
   
4. [concept] Deep Learning
   原因: 反向链接 | 相关度: 90%
   
5. [todo] Implement hybrid search
   原因: 共享标签: ai, search | 相关度: 58%
   
6. [note] Attention Mechanism
   原因: 标题相似 45% | 相关度: 42%

📊 直接链接: 1 | 反向链接: 1 | 共享标签: 3 | 标题相似: 1
```

## Three Depth Levels

Not all context needs are the same. That's why we offer three depth levels:

| Depth | What it finds | Best for |
|-------|--------------|----------|
| **quick** | Direct links + reverse links | Fast lookups, "what's connected to X?" |
| **standard** | + items sharing tags | Understanding a topic area |
| **deep** | + items with similar titles (Jaccard ≥ 40%) | Thorough exploration, research |

Quick mode is fast even on large knowledge bases — it only traverses explicit links. Standard adds tag-based discovery. Deep goes further with title similarity analysis.

## How Scoring Works

Each related item gets a relevance score (0-100%):

| Relation Type | Base Score | Reason |
|--------------|-----------|--------|
| Direct link | 100% | Explicitly connected |
| Reverse link | 90% | Someone linked TO this |
| Shared tags | 50-80% | Depends on tag overlap ratio |
| Similar title | 30-60% | Jaccard similarity on title words |

Results are sorted by score, so the most relevant items appear first. The `max_results` parameter (3-30, default 10) lets you control how much context to retrieve.

## Real-World Use Cases

**For Claude Code / Cursor agents:**
```
# Agent working on a bug fix
knowledge_context(id="kp-dc-use-bm25", depth="quick")
→ Gets the original decision + all linked context
→ No need to guess search queries
```

**For research and exploration:**
```
# Agent exploring a new topic area
knowledge_context(id="kp-cp-ml-basics", depth="deep")
→ Finds everything connected: links, shared tags, similar titles
→ One call replaces 4+ tool invocations
```

**For knowledge base maintenance:**
```
# Agent cleaning up the knowledge base
knowledge_context(id="kp-nt-old-entry", depth="standard")
→ See all connections before deciding to delete/archive
→ Avoids orphaning linked items
```

## Token Savings

For a typical knowledge base with 100+ items:

| Approach | Tool Calls | Approx. Tokens |
|----------|-----------|----------------|
| get → get_linked → search → synthesize | 4+ | 2,000-4,000 |
| knowledge_context(standard) | 1 | 800-1,500 |

That's roughly **50-60% fewer tokens** for the same contextual understanding.

## What's Next

This is the first step toward smarter context retrieval. Future plans include:

- **Context-aware suggestions**: "Based on this context, you might also want..."
- **Cross-vault context**: When working with multiple knowledge bases
- **Streaming context**: For very large neighborhoods, stream results as they're found

## Try It Now

```bash
# Install or update
npm install @zsc-glitch/knowledge-keeper-mcp@1.7.0

# Or run directly
npx @zsc-glitch/knowledge-keeper-mcp
```

**All 32 tools** are available: save, search, semantic search, BM25, hybrid RRF, get, update, delete, tags, versions, review, link/unlink, get-linked, graph (build/query/visualize), export/import, batch, sync, merge, analytics (3 tools), cloud sync (Pro), recent, duplicates, and now **context**.

- [npm](https://npm.im/@zsc-glitch/knowledge-keeper-mcp)
- [GitHub](https://github.com/zsc-glitch/knowledge-keeper-mcp)
- [Quick Start](https://github.com/zsc-glitch/knowledge-keeper-mcp/blob/main/QUICKSTART.md)
- [Landing Page](https://zsc-glitch.github.io/knowledge-keeper-mcp/)

---

Made with 🧠 by [小影](https://github.com/zsc-glitch)
