Skip to content

standalone.mjs: memory_save ignores title/tags, uses content as title — breaks keyword search #1073

Description

@netyilei

Summary

dist/standalone.mjs (MCP standalone mode) has 3 related bugs:

Bug 1: validate() doesn't extract title or tags

Lines 1515-1522, the memory_save case only extracts content, type, concepts, files:

case "memory_save": {
    const content = args["content"];
    if (typeof content !== "string" || !content.trim()) throw new Error("content is required");
    v.content = content;
    v.type = args["type"] || "fact";
    v.concepts = normalizeList(args["concepts"]);
    v.files = normalizeList(args["files"]);
    return v;
}

v.title and v.tags are never set.

Bug 2: handleLocal() stores content as title

Line 1613:

title: (v.content || "").slice(0, 80),

Should be v.title || (v.content || "").slice(0, 80).

Bug 3: search doesn't include tags
Lines 1637-1644, the search text concatenates title, content, files, concepts, sessionIds, id but not tags.

Impact
memory_save via standalone MCP always stores title == content (truncated to 80 chars)
tags parameter is silently discarded
Tags cannot be searched
Only affects standalone.mjs. The full REST API + iii-engine path is not affected.

Verified and fixed locally against v0.9.27.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions