Skip to content

Persistent project knowledge graph for coding agents. MCP server with semantic search, in-process embeddings, and web explorer.

fix: genericize get_concept example ID and add empty-string test

0xk3vinb62dd1cd6aef
diff --git a/package.json b/package.json
index 823c3cd..1e7c39f 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "megamemory",
- "version": "1.6.0",
+ "version": "1.6.1",
"description": "MCP server that gives coding agents persistent project understanding via a knowledge graph",
"type": "module",
"main": "dist/index.js",
diff --git a/src/__tests__/get-concept.test.ts b/src/__tests__/get-concept.test.ts
index 2bf1d00..3fbd7ad 100644
--- a/src/__tests__/get-concept.test.ts
+++ b/src/__tests__/get-concept.test.ts
@@ -79,6 +79,14 @@ describe("getConcept tool", () => {
db.close();
});
+ it("throws for empty string ID", () => {
+ const { db } = createTmpDb("empty-id.db");
+
+ expect(() => getConcept(db, { id: "" })).toThrow(/not found/);
+
+ db.close();
+ });
+
it("throws for soft-deleted nodes", () => {
const { db } = createTmpDb("deleted.db");
insertTestNode(db, "doomed-node");
diff --git a/src/index.ts b/src/index.ts
index ef11bd8..0b25284 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -239,7 +239,7 @@ async function startMcpServer() {
"get_concept",
"Look up a concept by its exact ID. Returns the concept with its full context including children, edges, incoming edges, and parent. Unlike 'understand' which uses semantic search, this does exact ID matching. Use this when you know the specific concept ID.",
{
- id: z.string().describe("Exact concept ID to look up (e.g., 'chapter-03-main-c-god-object-split')"),
+ id: z.string().describe("Exact concept ID to look up (e.g., 'auth-module' or 'database-config')"),
},
async (params) => {
try {