Skip to main content
Glama

Piia Engram

Local-first AI work identity you can see, edit, and override — portable across your MCP coding tools.

Tell AI once who you are, how you work, and what "good" means. Claude Code, Codex, Cursor, Windsurf, and other MCP-compatible tools can start from the same AI work identity layer — local files you own, no cloud account, no hidden memory you cannot inspect.

Install · See It in Action · Supported Tools · MCP Tools · FAQ

ENGLISH | 中文

PyPI Downloads Python 3.10+ MCP Compatible License: AGPL v3 CI Guard strategic files

Listed in: Official MCP Registry awesome-mcp-servers Glama

Also listed in: awesome-agents · Awesome-MCP-ZH · mcpservers.org · Cursor Directory · ModelScope · PulseMCP


TL;DR: piia-engram is a local-first personal AI identity layer. It helps multiple coding agents start from the same understanding of you: your preferences, quality bar, lessons learned, decisions, and project context. It is not an agent memory database; it is the user-owned layer above your tools.

Why not just use native memory? Claude Code, Codex, Cursor, and Windsurf are adding their own memories and rules. Those are useful, but they are scoped to one tool or workspace. piia-engram gives you one portable identity layer above them: local files you own, AI-proposed knowledge you review, and context that can follow you across tools.

Trust model in four lines:

  • No cloud account: install with pip, keep the core store on your machine.

  • Local files: identity and knowledge live under ~/.engram/ as JSON/Markdown.

  • User approval: AI writes locally; high-risk items (credentials, shell commands, MCP config, permission rules) wait for your review, while low/medium writes are auto-absorbed but fully auditable and reversible. Set ENGRAM_APPROVAL=strict to gate every write. "Verified" means accepted by you or by that policy, not re-checked against your current code.

  • Session continuity: Resume output can also include earlier session records (checkpoints and snapshots) that are not reviewed and do not authorize actions. Approval and review claims apply to identity and long-term knowledge under the configured policy.

  • Documented boundaries: see Trust model, Privacy, and Security.

Want proof? See the live cross-tool continuity proof — a memory written by Claude Code, read back by Codex through one local store — or the one-command reproducible code demo.

See It in Action

You  → "Help me refactor this auth module"

# WITHOUT piia-engram: AI starts from scratch
AI   → "What language? What framework? What's your testing preference?"

# WITH piia-engram: AI can load your approved identity and long-term knowledge
AI   → "Based on your preference for pytest + 90% coverage, and your
        lesson about always separating auth middleware from business
        logic (from the March incident), here's my approach..."

And you never have to take that on faith — Memory Lens (engram preview --html) shows exactly what any AI caller would receive, and what governance withheld, before anything is sent:

Above: a real report from a demo store — 4 items exposed; an unreviewed staging note and a lesson containing a credential are withheld, with the secret shown as [REDACTED].


Related MCP server: Mem0 MCP Server

Install

pip install piia-engram && engram setup

The wizard auto-detects your AI tools — Claude Code, Cursor, Codex, Claude Desktop — lists the exact config files it will touch, and writes the MCP connection after a one-keystroke confirm (every write is backed up first; decline and nothing changes). It previews your identity card, then you restart your configured tool; the first conversation can load your approved identity and long-term knowledge through startup or search tools. (full walkthrough ↓)


Let your AI agent install it

Ask your coding agent to install Engram and inspect the plan before applying:

pip install piia-engram
engram setup --non-interactive --json
engram setup --non-interactive --apply
engram doctor --json

Setup asks no questions. Use --clients cursor,codex to limit clients and --lang zh|en for output language (default en). Without --apply, plan mode writes nothing to the Engram store, home directory or client configs. Python itself may use the system temporary directory. Apply configures MCP connections with backups, preserves existing tool modes, and never imports memories, writes identity/knowledge, or approves proposals. Restart configured clients; exit code 1 means a manual step remains. See llms.txt for agent instructions and the CLI and JSON contract for details.

Supported Tools

Evidence levels follow the agent client validation runbook: L0 = discovery, L1 = protocol access, L2 = read/search behavior, L3 = A/B behavior gain, L4 = cross-client continuity, L5 = reproducible public evidence.

Tool

Integration

Evidence status

Claude Code

MCP over stdio

L4 partial continuity proof (Claude Code -> Codex)

Codex

MCP over stdio

L4 partial continuity proof (Claude Code -> Codex)

Cursor

MCP over stdio

L2 setup/read-search evidence path

Claude Desktop

MCP over stdio

L1/L2 setup path; client-specific evidence pending

Hermes

MCP over stdio

L4 controlled CLI marker continuity; desktop and broad benchmark claims unverified

OpenClaw

SOUL.md / MEMORY.md / USER.md import and export

L3 static file-bridge evidence (static snapshot A/B only; live agent behavior unverified)

ChatGPT / Gemini / Kimi

Markdown identity card fallback

Usable

Windsurf

MCP over stdio

Expected to work

GitHub Copilot

MCP over stdio

Expected to work

Cline

MCP over stdio

Expected to work

Roo Code

MCP over stdio

Expected to work

Amazon Q

MCP over stdio

Expected to work

Augment

MCP over stdio

Expected to work

Zed

MCP over stdio

Expected to work

Trae

MCP over stdio

Expected to work

Tencent CodeBuddy

MCP over stdio

Expected to work

By the numbers

These are current repository facts from docs/public-facts.json. Public registries and package badges update only during release/publish.

Current repo / development facts

Version frame

v4.27.0 (verified 2026-11-01; check PyPI and GitHub Releases for the latest published package)

Supported AI tools

16 (evidence level varies by client; see Supported Tools and the validation runbook)

MCP tools

19 Core (loaded by default) + 40 Advanced (opt-in via ENGRAM_TOOLS=all)

Knowledge types

3 (lessons, decisions, playbooks)

Test suite

Unit + integration; run pytest tests/ to verify

Lines in core.py

1770 (facade; domain logic now lives in focused mixins — see architecture.md)

PBKDF2 iterations

600,000 (OWASP 2023+ floor; legacy 100k still decrypts)

Encryption

Optional field-level AES-256-GCM for supported profile fields; local files are plaintext JSON/Markdown by default

Cold-start time

< 100 ms typical (local JSON, no network)

Network calls by default

One anonymous usage ping a day (engram telemetry off or DO_NOT_TRACK=1 turns it off); the engram command also checks PyPI for a newer version at most once a day in interactive terminals, and engram doctor checks on each run (ENGRAM_NO_UPDATE_CHECK=1 turns it off); identity and knowledge tools make none, except the optional read_web_content; remote telemetry and feedback require separate explicit opt-in and send counts only (see privacy details)


Your AI forgets you every time you switch tools or start a new chat. piia-engram fixes the handoff.

Every time you open a new chat window, switch from Claude Code to Codex, update your AI tool, or move into a different project, you're back to zero:

  • your communication preferences — gone

  • your code standards and quality bar — forgotten

  • which mistakes you've already learned from — lost

  • why you made that architecture decision last month — erased

This happens because AI memory today is locked inside each platform. It belongs to the tool, not to you. The tool updates, resets, or gets replaced — and your context disappears with it.

piia-engram gives you a personal identity layer that lives on your machine, independent of any AI tool. You tell it once who you are, how you work, and what you've learned. MCP-compatible tools can read the same approved identity and long-term knowledge. New chat, new tool, new version — your identity stays portable.

piia-engram is not an agent memory database. Tools like Mem0, Zep, and Letta store task context and session history for AI agents. piia-engram stores who you are as a person — your identity, preferences, hard-won lessons, and key decisions. It's a different layer: not what happened in a task, but who is behind every task.

Why piia-engram?

Without piia-engram

With piia-engram

New chat window = start from zero

Configured conversations can load your approved identity and long-term knowledge

AI tool updates and your preferences vanish

Your identity lives on your machine, survives any update

Switching tools loses accumulated context

Claude Code, Codex, and Cursor read the same memory

Past mistakes get repeated

Lessons learned follow you across tools and sessions

Memory is locked inside one product

Data stays local, editable, and portable

Who Uses piia-engram

piia-engram is built for developers who use multiple AI coding tools and are tired of re-explaining themselves.

If you switch between Claude Code, Codex, and Cursor — your code standards, architecture decisions, and hard-won lessons reset every time. piia-engram makes every tool start from the same understanding of who you are.

If you open 10+ AI chat windows a week — each one starts from zero. piia-engram lets each conversation start from the same approved identity and knowledge context.

If you've lost preferences after a tool update — your identity lives on your machine, not inside any platform. Updates, resets, and migrations don't touch your memory.

Investment analysts Decisions get made but reasoning gets lost. piia-engram stores the full reasoning chain so six months later, "why did I pass on that?" has a real answer — and your analytical framework travels with you across every new analysis.

System architects Architecture decisions need context: what you chose, what you ruled out, and why. piia-engram keeps living Architecture Decision Records that travel with you across companies and projects, queryable by any AI tool.

Backend developers API quirks, integration gotchas, performance trade-offs — tacit knowledge that normally lives in your head and resets when you change jobs. piia-engram turns it into a searchable library that persists across everything.

Frontend and design Design philosophy rarely gets documented in a way AI tools can use. piia-engram stores your real standards, UX lessons from real users, and the reasoning behind component decisions — so every project starts where your last one ended.

Vibe coders You build with AI and move fast. The problem: every new session your AI starts from scratch — different style choices, inconsistent patterns, re-explaining the same preferences. piia-engram makes every tool consistent from session one: your stack, your patterns, your voice, already there.

What piia-engram Stores

All data lives under ~/.engram/ as plain JSON and Markdown files you can open, edit, back up, or migrate yourself.

  • Identity: who you are, how you communicate, what languages you prefer

  • Quality standards: your code review bar, test coverage expectations, what you refuse to ship

  • Preferences: coding style, AI behavior, how you like explanations

  • Trust boundaries: which fields to keep private, what tools can access

  • Project snapshots: context for ongoing work, captured and reloadable

  • Lessons learned: mistakes, surprises, things that worked and didn't

  • Key decisions: what you chose, what you ruled out, and why

  • Domain knowledge: reusable insights across projects and tools

What piia-engram Does (Beyond Storage)

Most memory tools are passive — you put things in, they give them back. piia-engram is also active.

Knowledge inheritance across projects
Describe a new project in plain text. get_knowledge_inheritance returns a curated starter pack of the most relevant lessons and decisions from everything you have ever worked on. Your tenth project benefits from all nine before it — one tool call away.

Passive knowledge capture
Paste a session summary into extract_session_insights and piia-engram extracts and stores the lessons and decisions. No manual note-taking. Knowledge accumulates through normal AI conversations.

Works with tools that do not support MCP
ChatGPT, Gemini, Kimi — get_identity_card exports a ready-to-paste Markdown identity card. Your context travels even to tools that cannot connect directly.

Automatic playbook extraction
Finish a multi-step workflow — release to PyPI, deploy to Cloudflare, publish to MCP Registry — and piia-engram detects it at session end. It generates a structured draft playbook (steps, pitfalls, trigger keywords) and saves it to a staging area. Next time you do the same task, the AI can retrieve the confirmed playbook as a passive reference, walk through the steps with you, and record the outcome. No manual recording required — Engram starts the draft, you confirm, the host AI stays accountable. See Playbook Auto-Extraction below.

Local tools registry
AI tools constantly search for local programs, runtimes, and CLIs. register_tool records what's installed and where; find_tool retrieves it instantly. No more which python every session — the environment map persists across tools and conversations.

Knowledge health and discovery
get_knowledge_overview surfaces stale lessons (not reviewed in 30+ days), computes a 0–100 health score across four dimensions (freshness, quality, coverage, cleanliness), and flags gaps worth revisiting. explore_knowledge scans your knowledge base for near-duplicates (and walks related/similar items) with actionable merge commands. manage_relation connects related lessons and decisions into a navigable knowledge graph.

Hybrid search (optional, off by default)
The default keyword search stays unchanged. Opt in to hybrid retrieval — FTS5 full-text plus a semantic vector layer — for cross-lingual recall, e.g. an English query finding a Chinese note: pip install "piia-engram[vector]" and set ENGRAM_SEARCH=hybrid, or let engram setup enable it with one keystroke. The index is a rebuildable SQLite file; your JSON store remains the single source of truth. See docs/hybrid-search.md.

Quick Start

pip install piia-engram
engram setup

New to piia-engram? See the fuller first-value quickstart for the install -> first memory -> fresh-session recall path using only the default 19 core tools, or the complete User Guide covering install -> first value -> cross-tool continuity -> governance -> privacy -> FAQ. Host-specific setup cards are available for Claude Code, Codex, and Cursor. For proposal-only safe-context, replay, freshness/conflict, and evidence drafts, see Context governance.

The setup wizard will:

  1. Detect your Python environment

  2. Let you choose the Engram data folder (~/.engram, another drive, or a custom path)

  3. Detect your AI tools, list the exact config files it will touch, and write the MCP connection after a one-keystroke confirm (backed up first; decline leaves them untouched)

  4. Walk you through seed knowledge (role, tech stack, language)

  5. Offer to import rules and memories from your other AI tools — CLAUDE.md, .cursorrules, memory files (default no; lists them first, then the review queue, approve with engram review)

  6. Show a short daily usage ping notice; neither setup mode asks about telemetry or changes your choices

  7. Preview your AI identity card — immediate proof of value

After setup writes the MCP connection (you confirm at the prompt first), restart your AI tool. Many clients can call get_user_context at startup; when a host does not do that proactively, an explicit search_knowledge or get_resume_brief call is still the expected L2 path.

For non-interactive or CI runs, skip the confirmation prompt and write directly:

engram setup --apply-external-config

Either way, every external config write is backed up under the selected Engram data folder, and declining the prompt leaves every external config untouched.

For point-and-click local review, open piia-engram-review (double-click its installed Windows launcher). Review complete proposals and choose approve, reject or later, with optional body-free prompts while the window is running. Python with Tk support is required; MCP approval permissions stay unchanged. See the local review window guide.

Check health anytime:

engram status        # redacted install + memory health summary
engram status --html # write a local redacted status page
engram preview --as automation  # see exactly what a given AI caller would receive (read-only)
engram continuity    # metadata-only proof that cross-tool handoff is ready
engram management    # metadata-only review/playbook management view
engram doctor        # diagnose all tools
engram doctor --fix  # auto-repair issues + inject missing instructions
engram doctor --days 7 --json  # which AI clients are configured and called Engram lately (read-only)
engram repair-encoding        # dry-run scan for garbled / mojibake text
engram repair-encoding --apply  # repair reversible cases with a backup

engram continuity is metadata-only: it reports saved-session counts, contributing tools, resume-brief readiness, and aggregate context-load / wrap-up signals without printing memory bodies, raw telemetry events, session IDs, or local paths.

For a machine-readable synthetic loop proof, run:

python demos/cross_tool_continuity_demo.py --json

engram continuity reports readiness metadata. The demo JSON proves an isolated write -> resume -> search -> provenance loop using synthetic data only.

Replay experience mode

Automated offline and online evaluation callers can use IsolatedStore.admit(..., event_key="source:event:record:v1") in either isolated mode to distinguish events with identical text and retry the same event safely. Recall returns a ledger-backed receipt with a snapshot identifier, ordered IDs, content hashes and effective filters; verify_recall_receipt reports later changes without bodies. Replay callers may also supply effective_at and now to retire/restore at historical times. An Owner veto hides a card at every time.

Pin the isolated store API with from piia_engram.isolated_store import require_contract; require_contract("1") before opening a store. Contract v1 supports admit(..., supersedes=item_id) to admit a replacement and deactivate its predecessor in one completion receipt, with crash-safe retries in both modes. Family, subject and the exact opaque source_decision_point must match. An active version blocks restoration of another version; rollback appends a new version. Recall also returns and seals a deterministic result_sha256 over effective cuts, exclusion counts and ordered content references. Incompatible changes require a new contract version, with continued support or contract_version_unsupported; existing ledgers remain readable.

Offline replays and evaluations that re-feed historical material in chronological order can initialize an isolated store with "mode": "replay_experience" in its launcher configuration. The root mode is immutable. Admission requires timezone-aware admitted_before and now parameters; recall also requires now. Historical admission uses the supplied time while receipts keep real timestamps, and automatic same-family exclusion is disabled. Evidence still stops at the decision point's as_of. Replay admission keeps nonidentical normalized summaries verified even when template similarity is high; exact duplicates and existing tombstone, retired and archived twin rules still apply. Without event keys, production duplicate handling is unchanged; all capacity limits still apply. Replay roots may pin hard_cap up to 10,000 (for example, 1,400); production roots retain the 1,000 default. Native backups and returned entries carry store_mode: replay_experience, and ordinary roots refuse replay roots and marked imports.

The separation prevents accidental mixing, such as using the wrong configuration, attaching another root, or importing an unmarked export. New initialization receipts are bound to the directory identity, and context text retains its replay marker. This is not a tamper-proof boundary against someone who can edit both roots and their ledgers. Existing production roots created before replay mode retain direct attachment without launcher configuration.

For broader release evidence, run the synthetic MCIC benchmark:

python demos/mcic_benchmark.py --json

MCIC v1 contains 10 purpose-labeled continuity scenarios covering explicit recall, implicit personalization signals, false-premise guard signals, public action boundaries, version-chain HEAD selection, negative control, and provenance. Its claim is narrow: Engram makes the right signal available to the next client; live model compliance still needs separate A/B testing.

Trust & Evidence

piia-engram treats trust claims as release artifacts, not marketing copy:

Claim

Public evidence

What it proves

Boundary

Memory retrieval stays measurable

docs/trust-evidence.md, docs/benchmarks/memory-eval-suite-v1.md, python scripts/run_memory_evals.py

Recall/admission fixtures pass deterministic, knowledge-ID-scored checks with no LLM judge

Synthetic regression floor, not a broad live-agent benchmark

Public numbers do not drift silently

python scripts/check_public_fact_sync.py and python scripts/check_public_claim_drift.py

README / registry / architecture facts match docs/public-facts.json

Historical CHANGELOG keeps old release facts

Product boundaries stay explicit

docs/product-boundary.md, python scripts/check_product_boundary.py

Package modules/imports, public facts/tool surface, public docs, exports, release surface, and allowlist stay inside the public contract

Metadata-only guard, not a review of private repositories or untracked branches

Security and privacy wording stays consistent

python scripts/check_public_trust_claims.py

Network, telemetry, endpoint, plaintext, and optional-encryption statements stay aligned across public docs

Prose consistency guard, not a third-party security audit

Releases cannot skip evidence

python scripts/check_release_gate.py

Each release carries structured evidence that required checks passed

Evidence records are maintainer-internal

Verify it yourself (5 minutes)

Don't take the table above on faith — run the checks on your own machine:

  1. Check your setup — engram doctor reports detected tools, store health, and the active capability mode.

  2. See what AI sees — engram preview --as automation renders the exact context a caller would receive (read-only, nothing sent).

  3. Control the surface — set ENGRAM_TOOLS=core (or compose groups) and re-run engram doctor to confirm it reports the expected core surface. See capability modes.

  4. Audit your data — follow the data sovereignty audit runbook to confirm identity and knowledge data stays under your Engram root, with external writes explicit and audited.

  5. Check the claims — each trust claim in trust evidence maps to a deterministic check or inspection path you can run locally.

Configure for Your AI Tool

The snippets use the server name engram, the name engram setup writes. An entry named piia-engram (from earlier instructions) is still recognised, and setup moves it to engram after backing up the file instead of adding a second server.

# Guided setup; confirms before writing external client configs (backed up first)
engram setup
# Skip the confirmation prompt for non-interactive/CI runs
engram setup --apply-external-config
# Or manual (user scope, available in all your projects):
claude mcp add --scope user engram -- piia-engram-mcp

Setup registers Engram through the claude command into Claude Code's user config (~/.claude.json, or $CLAUDE_CONFIG_DIR/.claude.json); it never edits that file itself. If claude is not on your PATH, setup prints the exact command to run. The values passed with -e appear on the claude process command line while it runs. Engram also recognises an entry named piia-engram from earlier instructions. Setup versions before this fix wrote to ~/.claude/.mcp.json, which Claude Code does not read: run engram setup again to register in the right place (it offers to remove the old entry).

Add to ~/.cursor/mcp.json:

{
  "mcpServers": {
    "engram": {
      "command": "piia-engram-mcp",
      "args": ["--transport", "stdio"]
    }
  }
}

Compatible fallback if console scripts are not on PATH:

{
  "command": "python",
  "args": ["-m", "piia_engram.mcp_server"]
}

Add to ~/.codex/config.toml (the file engram setup writes for Codex):

[mcp_servers.engram]
command = "python"
args = ["-m", "piia_engram.mcp_server"]

Plugin manifest note (Codex CLI 0.130.0+): piia-engram ships a .claude-plugin/plugin.json whose schema is also recognized by Codex CLI. Native one-command plugin install via Codex's marketplace flow isn't supported yet (Codex expects a multi-plugin marketplace manifest at the repo root, which would conflict with the single-plugin manifest used by other tools). For now, configure Codex via the ~/.codex/config.toml snippet above — it's the supported path and works on every Codex version.

Add to claude_desktop_config.json (Windows: %APPDATA%\Claude\; macOS: ~/Library/Application Support/Claude/):

{
  "mcpServers": {
    "engram": {
      "command": "python",
      "args": ["-m", "piia_engram.mcp_server"]
    }
  }
}

Any tool that supports MCP over stdio works. Use this config:

{
  "mcpServers": {
    "engram": {
      "command": "python",
      "args": ["-m", "piia_engram.mcp_server"]
    }
  }
}

For tools without MCP support (ChatGPT, Gemini, Kimi): run get_identity_card in any MCP tool and paste the exported Markdown card into your chat.

engram setup detects Trae (~/.trae/mcp.json) and Tencent CodeBuddy (~/.codebuddy/mcp.json) without changing those files by default. To let Engram write those standard mcpServers files for you, run engram setup --apply-external-config; the previous file is backed up under your selected Engram data folder first.

Tongyi Lingma (通义灵码), Baidu Comate (文心快码), and Qoder manage MCP servers through their in-app MCP panel (or a project-level config), so the wizard can't write them for you. Open the tool's MCP settings and paste:

{
  "mcpServers": {
    "engram": {
      "command": "python",
      "args": ["-m", "piia_engram.mcp_server"]
    }
  }
}

Zero-install alternative (no prior pip install needed) — set "command": "uvx" and "args": ["--from", "piia-engram", "piia-engram-mcp"]. They all speak the same standard MCP-over-stdio protocol.

Verify your setup

After setup, run engram doctor to verify everything is connected:

$ engram doctor

  Detected 3 AI tool(s):
    [ok] Claude Code — Engram configured
    [ok] Cursor — Engram configured
    [ok] Codex — Engram configured

  [ok] All configured tools look healthy.

  ── Functional Checks ──
    [ok] piia_engram.core importable
    [ok] Engram initialized (~/.engram)
    [ok] Identity loaded (role: Senior Backend Developer)
    [ok] quick_context.md ready (4096 bytes)
    [ok] MCP server: 19 tools registered

  -- Terminal encoding --

    [ok] stdout/stderr: utf-8 / utf-8
    [ok] PYTHONIOENCODING not set (stdout/stderr already UTF-8)
    [ok] Runtime encodings: preferred=UTF-8, filesystem=utf-8

  -- Config Integrity --

    [ok] MCP configs: 3/13 files found, 3 configured
    [ok] Instruction files: 3/4 found, 3 fresh
    [ok] Project rule files: 1 found
    [ok] Shared instructions: 1 found
    [ok] Claude hooks: 4/4 registered
    [ok] Report is metadata-only (hashes + counts; no rule bodies)

  -- Continuity --

    [--] No saved agent sessions yet
         Run an AI session, then wrap up or stop the tool to create one.
    [ok] Resume brief builds (2 section(s))

For machine-readable compatibility checks, run engram capabilities --json. It reports stable capability codes and contract versions without reading user memory or project content; MCP doctor(output_format="json") includes the same fingerprint.

Upgrading

pip install --upgrade piia-engram

After upgrading, piia-engram automatically migrates any stale MCP configs the next time its server starts (stdio mode). If your AI tool still shows an "MCP disconnected" error after restarting, run:

piia-engram doctor        # show what's wrong
piia-engram doctor --fix  # auto-repair and fix in one step

Then restart the affected AI tool. The doctor command checks Claude Code, Cursor, Codex, Windsurf, Claude Desktop, and community-supported MCP config locations, removes outdated server entries, and prints a metadata-only config integrity summary.

Remote Deployment

Run piia-engram on your own server and connect from anywhere.

Server Setup

# Install with remote support
pip install piia-engram[remote]

# Generate an auth token
python -c "import secrets; print(secrets.token_urlsafe(32))"
# Save the output, e.g. "abc123..."

# Start in SSE mode
ENGRAM_AUTH_TOKEN=abc123... python -m piia_engram.mcp_server --transport sse --host 0.0.0.0 --port 8767

Client Config (Claude Code)

{
  "mcpServers": {
    "engram": {
      "url": "http://your-server:8767/sse",
      "headers": {
        "Authorization": "Bearer abc123..."
      }
    }
  }
}

Client Config (Cursor)

{
  "mcpServers": {
    "engram": {
      "url": "http://your-server:8767/sse",
      "headers": {
        "Authorization": "Bearer abc123..."
      }
    }
  }
}

Security notes:

  • Always use HTTPS in production, behind nginx or caddy with TLS.

  • The auth token protects your identity data. Keep it secret.

  • Default bind is 127.0.0.1 for localhost only. Use 0.0.0.0 only behind a reverse proxy.

  • Set ENGRAM_CORS_ORIGINS to restrict cross-origin access (e.g. https://your-domain.com).

  • Data stays on your server and never touches third-party clouds.

MCP Tools

piia-engram ships 59 MCP tools. By default, only the 19 Tier-1 Core tools are loaded to keep the AI's context clean. Core means "used in most sessions", not "read-only": some core tools write local memory or owner-gated export files, and the governance layer still gates those side effects. Each tool also carries standard MCP hints (read-only, destructive, idempotent, open-world) for the client; they are advice, not access control, which stays with strict mode and governance. For the short operator view, see the MCP cheatsheet. To unlock all 59 tools, add ENGRAM_TOOLS=all to your MCP config:

You can also expose composable capability modes such as knowledge management, governance, admin, or integrations; see the capability modes guide.

{
  "mcpServers": {
    "engram": {
      "command": "python",
      "args": ["-m", "piia_engram.mcp_server"],
      "env": { "ENGRAM_TOOLS": "all" }
    }
  }
}

Importing from other AI tools: Engram never reads other AI tools' memory or rule files on its own: not at server start, not on cold start, not at session end. Run engram import-memories to bring them in; it lists what it found first (--dry-run stops there), then adds them to the review queue after you confirm, and writes a receipt to import_receipts/ in the store. ENGRAM_MCP_STARTUP_SYNC is still accepted but no longer does anything; ENGRAM_RECONCILE=0 turns reading other AI tools' files off entirely. ENGRAM_EPHEMERAL=1 skips the startup config check in container/ephemeral clients.

MCP startup never imports other tools' memories or changes knowledge or identity content. Startup and read tools may still write session checkpoints, usage records, audit records and access metadata; they are not zero-write operations.

Tier-1 Core (19 tools — daily workflow)

Tool

Purpose

get_user_context

Startup — Load identity + knowledge at session start (supports token_budget for context size control)

wrap_up_session

Session end — Save insights + sync at session end

memory_store

Writeback — Unified write endpoint: routes to add_lesson / add_decision / add_playbook by kind

add_lesson

Store a reusable lesson learned

add_decision

Record a key decision with reasoning

add_playbook

Record an operational playbook (multi-step procedure with trigger keywords)

search_knowledge

Retrieval — Search lessons, decisions, and playbooks (supports filters_json for domain/tier/date filtering)

get_relevant_knowledge

Find knowledge relevant to current project

get_recall

Return one structured identity + recent activity + relevant knowledge recall payload

get_knowledge_history

Read one item's revision history (superseded snapshots; exact by-version lookup)

get_identity_card

Owner-gated export: write and return a Markdown identity card for non-MCP tools

update_identity

Propose identity, preference, or quality-standard changes for local review (all modes)

get_project_context

Read a saved project snapshot

save_project_snapshot

Persist project state for future sessions

get_recent_context

Recover lost session context after restart

get_daily_log

Read a human-friendly project timeline for a day

get_resume_brief

Build a cross-session/cross-tool resume brief

get_wrap_up_session_status

Query a closeout operation by its idempotency key before retrying

doctor

Run memory system self-diagnosis

Tier-2 Advanced (40 tools — knowledge management, review, governance, import/export)

Advanced tools include optional local integrations, owner/admin surfaces, and maintenance helpers. Tools that export files, import whole stores, generate review pages, or mutate caller trust are owner/admin/export surfaces even when they are broadly useful product capabilities. Related operations are consolidated into single tools with a mode/action selector (v4.0).

Tool

Purpose

register_tool

Optional local integration governed write: register a local tool, runtime, or CLI to the environment map

find_tool

Optional local integration: look up a registered local tool by name

list_tools

Optional local integration: list registered local tools (optionally filter by category)

save_agent_context

Save AI session checkpoint (also runs automatically)

list_agent_sessions

Browse saved session records across tools

refresh_quick_context

Refresh local quick_context.md snapshot for offline/cross-tool use

get_identity_facets

Read identity facets via facet: profile, preferences, trust_boundaries, work_style, quality_standards, domains, or all

user_portrait

action: get / save / compare the AI-maintained user portrait

preview_context_governance

Advanced owner-gated preview: build safe-context, freshness/conflict, replay, or evidence proposals without applying changes

get_playbooks

Playbook reads via mode: list, get (full content), recent, management (incl. archived/deleted metadata)

manage_playbook

Playbook lifecycle via action: update, archive, delete, restore (mutations stay confirm-gated and need expected_version)

playbook_execution

Guided execution via action: prepare a step plan, update_step, status rollup (passive reference; no auto-execution)

get_lessons

List reusable lessons learned

get_decisions

List key decisions; thread_seed_id / history_question reconstruct decision threads and revision history

get_knowledge_inheritance

Build cross-project knowledge starter pack

list_projects

List saved project snapshots

extract_session_insights

Extract lessons and decisions from session text

ingest_notes

Parse free-form notes into structured knowledge

update_knowledge

Update a lesson, decision or playbook by ID (needs expected_version)

archive_knowledge

Archive a lesson, decision or playbook by ID (needs expected_version)

confirm_knowledge

Owner-only confirmation stamp via human, test, or anchor provenance

onboard_repo

Owner-only repo scan: create staging repo-fact candidates from anchors

onboard_accept

Local only: accepting an onboard candidate is engram onboard-accept <id>; over MCP it answers local_review_only and writes nothing

check_anchors

Owner-only revalidation for existing anchor-backed facts

merge_knowledge

Merge a duplicate into the primary item (needs both items' versions)

manage_relation

action: link / unlink — manage typed relations between knowledge items (decision threads)

explore_knowledge

Knowledge graph exploration via mode: related, similar, merge_candidates

get_knowledge_overview

Knowledge digest, health report, stale checks

get_stale_knowledge

List items that need review

review_staging

Staging review via action: list pending, batch preview (dry_run=true), review_item. Approving, rejecting or archiving pending items is local only (engram review); over MCP it answers local_review_only

export_knowledge_report

Owner-gated export: write a readable Markdown knowledge report

request_outline_review

Owner-gated export: generate an interactive local HTML review page

export_engram

Owner-gated export: write a full backup (format="openclaw" for OpenClaw-compatible files)

import_engram

Owner/admin import preview only (dry_run=True): a metadata-only merge/conflict plan (format="openclaw" supported). Applying an import is local: engram import <backup.json> --apply --yes (OpenClaw: engram import --format openclaw ... --apply --yes)

read_web_content

Fetch a user-provided URL: prefers a local sidecar if running, otherwise uses the self-contained built-in reader (pip install "piia-engram[reader]")

get_audit_log

Get recent audit log entries

start_project

Start a project with inherited knowledge

get_permission_profile

View all callers' trust levels and access boundaries

manage_caller_trust

Owner/admin action: grant / revoke a caller's trust level

export_feedback_report

Maintainer feedback: generate an anonymous aggregate feedback report

Legacy Playbook scope migration (classify / apply / rollback / review queue) moved out of the MCP surface into the owner-only local CLI: engram playbook scope classify|apply|rollback|queue|resolve (previews by default; writes require --apply --yes).

Playbook Auto-Extraction

piia-engram can detect multi-step workflows you complete during a session and automatically draft structured playbooks — no manual recording required.

How It Works

  1. Detection — When you call wrap_up_session or save_agent_context, piia-engram scans for procedural workflow signals: checkpoint steps, action verbs, and trigger keywords.

  2. Draft generation — If a workflow is detected, a playbook draft is created with steps, pitfalls, trigger keywords, and preconditions. Sensitive information (API keys, tokens, absolute paths) is automatically redacted before storage.

  3. Staging — The draft is saved to a staging area, never auto-promoted to verified. You review and confirm before it becomes a trusted playbook.

  4. Schema contract — Stored playbooks are normalized into a versioned contract: trigger keywords, preconditions, pitfalls, structured steps, and optional required_tools declarations. Thin drafts remain reviewable, but carry machine-readable quality warnings.

  5. Tool resolution — Playbooks declare tool needs by name or purpose, while local paths stay in the tools registry. playbook_execution (action prepare) returns resolved_tools, tools_ready, and missing_tools at runtime so the host AI can see which local tools are available without storing resolved paths in the Playbook.

  6. Reuse and outcome — Next time an AI tool encounters a similar task, search_knowledge matches the trigger keywords and returns the playbook as a passive reference. The host AI walks through the steps with you and playbook_execution (action status) reports an outcome rollup (pending, partial, succeeded, or failed) instead of treating skipped steps as silent success.

Design Philosophy: Engram Starts, You Confirm, AI Applies

Playbook auto-extraction is not fully automatic. piia-engram detects the workflow and generates a rough draft — but the draft stays in staging until you explicitly confirm it. Once confirmed, AI tools can use the playbook as a governed, passive reference and record step outcomes; Engram does not silently execute the workflow for them. This keeps humans in the loop for quality control while eliminating the manual work of writing operational procedures.

Confidence Levels

Level

Signal

AI Behavior

high

3+ checkpoint steps from save_agent_context

AI notifies you: "Detected a reusable workflow, draft playbook generated."

medium

Text-based detection (trigger keywords + action verbs)

AI saves silently to staging, no notification.

Sensitive Info Redaction

Before any draft is stored, piia-engram automatically redacts:

  • API keys and tokens (Bearer, sk-, ghp_, etc.)

  • Absolute file paths (Windows and Unix)

  • Email addresses

  • Environment variable secrets

Kill Switch

Users can disable or re-enable playbook auto-extraction at any time:

  • Disable: Tell your AI "关闭 playbook" / "stop playbook" / "disable playbook auto-extraction"

  • Enable: Tell your AI "开启 playbook" / "start playbook" / "enable playbook auto-extraction"

The AI can propose a playbook_auto_extract change with update_identity(field="preferences", ...); it takes effect only after you approve it locally with engram review. Default is enabled.

Manual Playbook Creation

You can always create playbooks manually with add_playbook, regardless of the auto-extraction setting. The kill switch only affects automatic detection during wrap_up_session.

Data Layout

~/.engram/
|-- schema_version.json
|-- identity/
|   |-- profile.json
|   |-- preferences.json
|   |-- quality_standards.json
|   `-- trust_boundaries.json
|-- knowledge/
|   |-- lessons.json
|   |-- decisions.json
|   `-- domains.json
|-- playbooks/
|   |-- _index.json
|   `-- {playbook_id}.json
|-- tools/
|   `-- registry.json
|-- projects/
|   `-- {project_id}.json
|-- contexts/
|   `-- {tool_name}/
|       `-- {session_id}.md
|-- exports/
`-- compat/
    `-- openclaw/

Own & export your data

Everything lives in local JSON you own — inspect, edit, back up, or delete it directly. Three explicit export paths, each with a different boundary:

Want

Tool

What it includes

A portable card to paste into ChatGPT/Gemini/Kimi

get_identity_card

Curated Markdown: who you are, how you work, recent verified lessons/decisions. Excludes raw config-file knowledge and caps recent items.

A readable knowledge report

export_knowledge_report

Active lessons/decisions grouped by domain/month (Markdown).

A full local backup

export_engram / import_engram(dry_run=True) / engram import <backup.json>

The whole store as JSON. Treat the file as sensitive — it is a complete backup, including staging and labelled items. Preview imports first to see add/skip/conflict counts without writing data.

OpenClaw files

export_engram (format="openclaw")

SOUL.md / MEMORY.md / USER.md.

A committable AGENTS.md/CLAUDE.md digest

engram export-agents-md

Verified, non-sensitive lessons/decisions only, as a summary block. Staging and sensitive items are excluded by construction; refuses to overwrite an existing file.

Exports are owner-gated when ENGRAM_GOVERNANCE=1 (see docs/governance.md). There is no cloud copy and no hidden memory: what you export is exactly what is on your disk.

Storage limits. Reviewed memories are never moved out because the store is full; unreviewed ones wait in a review queue for at least 7 days, and anything moved out goes to an append-only overflow archive you can restore from (engram retention plan shows the counts, engram retention restore <id> brings an entry back).

Local data sovereignty. Backup and restore cover only the Engram directory — engram backup-plan prints a metadata-only list of what to copy before an upgrade (it reads no stored knowledge bodies and never reaches outside the Engram root). For JSON backups, import_engram(..., dry_run=True) or engram import <backup.json> returns a metadata-only merge plan with add/skip/conflict counts before any write; applying it is local only: engram import <backup.json> --apply --yes (over MCP, import_engram only previews). Same-summary lessons and same-question decisions with divergent semantic fields are previewed as version-chain candidates; they are materialized only when the owner explicitly runs engram import <backup.json> --apply --yes --materialize-version-chain. Engram never backs up, modifies, or deletes files in your project folders. See docs/runbooks/setup-upgrade-safety.md.

Comparison

Feature

piia-engram

Claude Memory

Manual CLAUDE.md

Mem0

Letta (MemGPT)

Primary purpose

User identity across tools

Per-conversation memory

Per-project notes

Agent vector memory

Agent self-editing memory

Cross-tool by design

✅ MCP-native (19 core tools)

❌ Claude only

❌ tool-specific

⚠ requires per-tool wiring

⚠ requires per-tool wiring

Storage

Local JSON in ~/.engram/

Cloud

Local

Vector DB + Mem0 Cloud

Postgres or Letta Cloud

Local-first by default

✅

❌

✅

⚠ Cloud is the default

⚠ Cloud is the default

Encryption at rest

✅ AES-256-GCM, PBKDF2 600k (opt-in)

depends on Cloud

❌ plain Markdown

depends on store config

depends on Postgres config

Knowledge tiers

✅ high-risk staged; strict-mode gates all

❌

❌

❌

❌

Conflict detection

✅

❌

❌

❌

❌

MCP-native

✅

n/a

n/a

⚠ third-party

⚠ third-party

Price

Free, AGPL-3.0

Subscription-bundled

Free

Free / Cloud tiers

Free / Cloud tiers

📊 For the full side-by-side, including when to choose a competitor over piia-engram, see docs/comparison.md.

Built With

piia-engram is a human-directed, AI-assisted open-source project.

Contributor

Role

@Patdolitse

Creator, product direction, strategy, ownership

Claude Code

Architecture, task planning, code review assistance

Codex

Implementation, testing, documentation assistance

FAQ

What MCP server lets me share memory between Claude Code and Cursor? piia-engram. Install with pip install piia-engram && engram setup, and both tools read the same identity, preferences, and lessons from ~/.engram/. No cloud, no sync service — they both read local JSON files through MCP.

What is piia-engram? piia-engram is a local-first AI work identity layer for MCP-compatible coding tools. It stores your identity, preferences, code standards, lessons learned, and key decisions as local JSON files on your machine. Configured tools (Claude Code, Codex, Cursor, Windsurf, Claude Desktop) can read the same user-owned context, so new chats and tool switches can start from the same governed memory and identity base.

How is piia-engram different from the official MCP memory server? The official @modelcontextprotocol/server-memory stores a generic knowledge graph of entities and relations. piia-engram is specialized for developer identity: it has structured fields for your profile, code standards, quality bar, lessons learned, and key decisions — plus 59 tools for knowledge lifecycle management (search, review, merge, inherit across projects). If you need general-purpose entity memory, use the official server. If you want MCP-compatible coding tools to start from the same approved understanding of your preferences and past mistakes, use piia-engram.

How is piia-engram different from agent memory tools like Mem0, Zep, or Letta? Those tools store task context and session history for AI agents — what happened during a workflow. piia-engram stores who you are as a person — your identity, preferences, hard-won lessons, and key decisions. It's a different layer: identity persists across tools, sessions, and projects, while task memory is scoped to a single agent run. Your data is local JSON files you own and can edit directly.

Why not just use AGENTS.md / CLAUDE.md / .cursorrules? Those config files are great for repo-specific rules (build steps, coding conventions). piia-engram is for you — your preferences, lessons, and decisions that can follow you across repos and configured MCP-compatible tools. They complement each other: use AGENTS.md for the project, piia-engram for the person. See the full comparison in docs/comparison.md.

Can I use piia-engram with multiple AI tools at once? Yes. That's the primary use case. piia-engram uses local file storage (~/.engram/) with atomic writes and file locking. Claude Code, Cursor, Codex, and any other MCP client can connect simultaneously. A lesson recorded in Claude Code is immediately available in Cursor.

Which AI tools does piia-engram support? Any MCP-compatible tool: Claude Code, OpenAI Codex, Cursor, Claude Desktop, Windsurf, GitHub Copilot, Cline, Roo Code, Amazon Q, Augment, Zed, and more. For tools without MCP support (ChatGPT, Gemini, Kimi), export a Markdown identity card with get_identity_card and paste it in.

Where is my data stored? All data lives in ~/.engram/ on your local machine as plain JSON and Markdown files. No cloud, no account, no subscription. You can open, edit, back up, or migrate the files yourself. Optional AES-256-GCM encryption is available via pip install piia-engram[secure].

How do I install piia-engram?

pip install piia-engram
engram setup

The setup wizard detects your AI tools without changing their config files by default. To auto-configure MCP entries with backups, run engram setup --apply-external-config, then restart your AI tool. The AI will call get_user_context at the start of each session.

After upgrading, my AI tool shows "MCP server disconnected". How do I fix it? Run engram doctor --fix in a terminal, then restart your AI tool. This command scans all known MCP config files, removes outdated server entries, and repairs broken paths in one step.

Does piia-engram send data to the cloud? Your memories never leave your machine. Engram sends one anonymous usage ping a day by default (random install ID, version, OS, Python version, AI client name, date). No content, prompts or file paths are sent; IP addresses are not stored. Turn it off with engram telemetry off, ENGRAM_TELEMETRY=0 or DO_NOT_TRACK=1 (it is off in CI and in containers); engram telemetry preview shows the exact payload. Setup shows an informational notice without asking about telemetry. Detailed statistics stay off unless explicitly enabled with engram telemetry on; remote sending (engram telemetry remote on) and weekly feedback (engram telemetry feedback on) require separate opt-ins. Setup preserves existing choices. See PRIVACY.md.

How many MCP tools does piia-engram provide? Two tiers, designed so most users only see 19 tools:

Tier

Tools

What they do

Loaded by

Core

19

Identity, knowledge read/write, project context, session recovery, diagnostics

Default

Advanced

40

Knowledge review, merge, decision threads, permission management, tools registry, import/export, audit

ENGRAM_TOOLS=all

Most users never need to enable Advanced tools — Core covers everyday use.

Is piia-engram free? Yes. The open-source core is free software under AGPL-3.0. Personal/local use has no subscription, cloud tier, or vendor lock-in. If you plan closed-source embedding, hosted redistribution, or enterprise packaging, review the AGPL obligations first; piia-engram does not currently ship a separate commercial license.

Limitations

piia-engram is functional and actively used, but some things it intentionally does not do yet:

Area

Current State

Planned

File safety

Atomic JSON writes with a shared portalocker file lock

Broader stress testing

Access control

restricted_fields filters profile output. Optional agent governance (ENGRAM_GOVERNANCE=1) adds trust-level read/write gates, owner-only export/import controls, and a hash-chained disclosure ledger. See docs/governance.md.

Stronger caller identity binding requires MCP/client support

Encryption

Optional field-level AES-256-GCM encryption via ENGRAM_SECRET env var. Install pip install piia-engram[secure].

Full-disk encryption for all files (v4.0)

Audit logging

Local access audit log on by default at ~/.engram/audit.log; opt out with ENGRAM_AUDIT=0. Local file only — never sent anywhere.

Per-caller audit (blocked by MCP spec)

Caller identity

MCP protocol doesn't pass tool identity

Blocked by MCP spec

Concurrent writes

Protected by file lock + atomic replace for piia-engram JSON writes

Network-filesystem edge cases not guaranteed

What this means in practice:

  • Don't store passwords, API keys, or client PII in piia-engram

  • Any process with read access to ~/.engram/ can read your data

  • restricted_fields reduces what piia-engram emits in cold-start context, but it is not encryption or a true ACL

This is not a warning to avoid piia-engram — it's an honest description of what it is: a local memory layer for personal AI context. For personal use, it works well today.

Security Configuration

Field-level encryption (optional)

Encrypt sensitive profile fields (email, phone, location, etc.) at rest:

pip install piia-engram[secure]
export ENGRAM_SECRET="your-strong-passphrase"

Encrypted fields are stored as enc:v2:... in JSON files; legacy enc:v1:... values still decrypt. Unencrypted stores work normally with plaintext (backward compatible).

When store encryption is enabled on the intended root, hook queue bodies and their queue publication intermediates are also protected. This is root-local opt-in: a salt or required queue policy prevents plaintext fallback if only the secret is missing. Every writer must use the intended root; copies must preserve the policy and original salt, with the secret propagated to each host. Incomplete restores that omit both local signals can select plaintext. Quiesce writers during enablement or use the shared policy gate described in the hook queue scope and recovery guide. Downstream archives, digests, quick-context, project snapshots and some knowledge metadata remain plaintext; this is not whole-store or end-to-end encryption.

Audit logging (on by default)

A local audit log records all read/write operations to ~/.engram/audit.log in JSON-lines format. It is a local file only — never sent anywhere. Query it with the get_audit_log tool or grep.

To opt out:

export ENGRAM_AUDIT=0

Agent governance (advanced, optional)

Enable per-caller trust levels and disclosure receipts:

export ENGRAM_GOVERNANCE=1
export ENGRAM_CLIENT_TYPE=claude_code

Governance is off by default. When enabled, known local coding agents are filtered to public/work knowledge, unknown callers fail closed to public-only, and owner-only exports/imports/grant changes require private-self. See docs/governance.md for the exact trust levels, gates, honest boundaries, and ledger commands.

Recommended rollout: keep the global default compatible, but enable governance in each MCP client env when you use Engram across multiple AI tools, automation, or any remote-facing bridge. engram status and engram doctor report whether this layer is on. Caller identity is still supplied by MCP environment variables, not cryptographic authentication, so governance is a practical local policy boundary rather than a hardened sandbox.

CLI Commands

engram setup            # Interactive install wizard (confirms before writing client configs)
engram setup --apply-external-config  # Skip the confirm prompt (non-interactive/CI); writes with backups
piia-engram doctor           # Check config health + governance state
piia-engram status           # Redacted install + memory/governance summary
piia-engram status --html    # Write a local redacted status page
piia-engram preview          # Show what a simulated AI caller would receive (--as ROLE, --level, --html)
piia-engram continuity       # Prove cross-tool handoff readiness (metadata only)
piia-engram management       # Show a metadata-only review/playbook management view
piia-engram doctor --fix     # Auto-repair any issues found
piia-engram sessions         # List saved cross-tool agent sessions
piia-engram sessions show <id>  # Print one saved session
piia-engram review           # List staging knowledge awaiting review
piia-engram review interactive  # Decide pending proposals one at a time (a/r/s/k/v/q, confirm with y)
piia-engram review show <id> # Inspect one review item
piia-engram review approve <id> --yes  # Promote a staging item
piia-engram review archive <id> --yes  # Archive a review item
piia-engram management action review approve <id> --yes --json  # Structured metadata-only action receipt
piia-engram management action playbook delete <id> --yes --json # Soft-delete a Playbook without body echo
piia-engram management action playbook_scope accept_project <id> --project . --yes --json # Resolve ambiguous Playbook scope
piia-engram management action playbook_scope accept_shared <id> --project ./app-a --project ./app-b --yes --json # Share one Playbook with selected projects
piia-engram dock-status      # Zero-write Dock owner-console status (--json)
piia-engram repair-encoding  # Dry-run scan for garbled / mojibake text
piia-engram repair-encoding --apply  # Repair reversible cases with a backup
piia-engram backup-plan      # Metadata-only plan of what to copy before upgrading (local-only)
piia-engram retention plan   # Read-only: memory counts per pool and what the next write would archive
piia-engram export-agents-md # Export verified, non-sensitive knowledge as an AGENTS.md/CLAUDE.md block
piia-engram stats            # Show project growth metrics (GitHub + PyPI)
piia-engram stats --log      # Append stats snapshot to local log
engram telemetry        # Manage the daily usage ping and opt-in detailed statistics
engram privacy          # Show what data piia-engram stores and where

Contributing

Contributions, issues, and feedback are welcome.

See CONTRIBUTING.md.

License

AGPL-3.0. piia-engram is free software. Your AI work identity and memory belong to you.

Available Tools

19 tools
add_decisionA

记录单条关键决策(用户明确选了某个方案)。 / Record one key decision when the user explicitly chose an option.

**Lifecycle: writeback** — 对话中做出明确决策时调用。
Lifecycle: writeback — call when an explicit decision is made during conversation.

用途:用户说"我们决定用 X"或"以后都用 Y"时调用。
Purpose: Call when the user says they decided to use X or will use Y going forward.

注意:如果用户给了一段会话摘要让你自动提取,请用 extract_session_insights 而不是本工具。
Note: If the user gives a session summary for automatic extraction, use extract_session_insights instead.

决策链(Decision Thread):同一问题改选方案时,新决策是取代旧决策的提案
(pending_supersedes),在任何审批模式下都等主人用 engram review 批准,批准前旧决策照常使用。
也可显式传 supersedes 参数指定被取代的旧决策 ID。
Decision thread: when the same question gets a different choice than a reviewed
decision, the new one is a proposal to replace it (pending_supersedes) that waits for
the Owner's engram review in every approval mode; the old one stays in use until then.
You may also explicitly pass supersedes with the old ID.

Args:
    question: 决策的问题,如"数据库选型"。 / Decision question, such as 'database choice'.
    choice: 做出的选择,如"PostgreSQL"。 / Chosen option, such as 'PostgreSQL'.
    reasoning: 选择的理由(可选)。 / Reasoning for the choice (optional).
    source_tool: 记录来源工具,如 'claude_code', 'codex'(可选,建议填写)。 / Source tool, such as 'claude_code' or 'codex' (optional but recommended).
    project: 关联项目(可选)。 / Related project (optional).
    domain: 技术领域(可选),可填多个,逗号分隔,如 'architecture,database'。 / Technical domain (optional); may contain multiple comma-separated labels such as 'architecture,database'.
    supersedes: 被本决策取代的旧决策 ID(可选)。填写后自动在决策链中建立 supersedes 关系。 / ID of the old decision this one replaces (optional). Creates a supersedes edge in the decision thread.
    supersedes_expected_version: 填写 supersedes 时必填:旧决策的当前版本号(读取结果中的 version)。缺失 → version_required,不匹配 → version_conflict,均零写入。 / Required with supersedes: the old decision's current version (version in a read result). Missing -> version_required; mismatch -> version_conflict; both write nothing.
    source_agent: 产生/校验此决策的 agent 身份(可选)。 / Agent identity that produced or validated this decision (optional).
    run_id: 产生此决策的工作流/会话运行 ID(可选)。 / Workflow/session run id that produced this decision (optional).
    last_validated_at: 最近确认此决策仍然成立的 ISO-8601 时间(可选)。 / ISO-8601 time this decision was last confirmed to still hold (optional).
NameRequiredDescriptionDefault
choiceYes
domainNo
run_idNo
projectNo
questionYes
reasoningNo
supersedesNo
source_toolNo
source_agentNo
project_folderNo
user_confirmedNo
last_validated_atNo
supersedes_expected_versionNo

Output Schema

NameRequiredDescription
resultYes

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only declare the generic mutation profile (readOnly=false, destructiveHint=false, idempotent=false). The description adds real behavioral context beyond that: the pending_supersedes proposal flow waits for Owner review in every approval mode, the old decision stays in effect until approval, and version errors (version_required/version_conflict) cause zero writes. It does not state duplicate-handling or auth requirements, keeping it below a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Content is front-loaded (lifecycle and purpose first) and each point is substantive, but the entire description is duplicated verbatim in Chinese and English, roughly doubling length without adding information. The Args block is also long for a 13-param tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 13-param mutation tool with annotations and an output schema, the description covers the decision lifecycle, the supersedes approval semantics, and nearly all parameters. It leaves project_folder and user_confirmed (which may be safety-relevant, e.g. user confirmation) unexplained, which is the main remaining gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description carries the parameter burden, and it does document 11 of 13 params including the critical supersedes/supersedes_expected_version coupling and its failure modes. Two schema params, project_folder and user_confirmed, are never mentioned, so the coverage is strong but incomplete.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource ('record one key decision') plus the exact trigger ('when the user explicitly chose an option', with quoted examples like 'we decided to use X'). It also names the sibling it is not (extract_session_insights) for the summary-extraction case, so an agent can route without opening schemas.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit when-to-call (explicit decision made in conversation), explicit when-not (user supplies a session summary → use extract_session_insights), and it spells out the alternative approval path via the supersedes decision thread. Nothing is left to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

add_lessonA

记录单条经验教训(你已经知道要记什么)。 / Record one lesson learned when you already know what to save.

**Lifecycle: writeback** — 对话中学到可复用的经验时调用。
Lifecycle: writeback — call when reusable experience is learned during conversation.

用途:用户明确说出一条踩坑经验或技术发现时调用。
Purpose: Call when the user explicitly states a lesson, pitfall, or technical finding.

注意:如果用户给了一段会话摘要让你自动提取,请用 extract_session_insights 而不是本工具。
Note: If the user gives a session summary for automatic extraction, use extract_session_insights instead.

Args:
    summary: 教训的一行摘要。 / One-line lesson summary.
    detail: 详细说明(可选)。 / Detailed explanation (optional).
    domain: 技术领域(可选),可填多个,逗号分隔,如 'python,testing'。 / Technical domain (optional); may contain multiple comma-separated labels such as 'python,testing'.
    source_tool: 记录来源工具,如 'claude_code', 'codex'(可选,建议填写)。 / Source tool, such as 'claude_code' or 'codex' (optional but recommended).
    source_url: 如果教训来自外部内容,填写来源 URL(可选)。 / Source URL when the lesson comes from external content (optional).
    source_agent: 产生/校验此条目的 agent 身份(可选,如 'claude_code',比 source_tool 更细)。 / Agent identity that produced or validated this entry (optional; finer-grained than source_tool).
    run_id: 产生此条目的工作流/会话运行 ID(可选)。 / Workflow/session id that produced this entry (optional).
    last_validated_at: 人/agent 最近确认此条目仍然成立的 ISO-8601 时间(可选)。 / ISO-8601 time this entry was last confirmed to still hold (optional).
    allow_similar_new: 摘要相似但不相同、确属新条目时设为 true:按相关条目写入并互链,而不是作为重复候选进入待审(可选,默认 false)。不能绕过完全相同(规范化后)内容的拒绝;该拒绝会指向已有条目并给出修订方式。 / Set true when a similar but not identical summary is genuinely a NEW fact: it is stored linked as related instead of queued for review as a duplicate candidate (optional, default false). It cannot bypass the refusal of identical content (after normalization); that refusal names the existing entry and how to revise it.
    supersedes: 本条修订的已有 lesson ID(可选)。修订提案总是进入待审,主人批准后旧条目才被取代;被主人钉住的条目只能这样修订。 / ID of the existing lesson this one revises (optional). A revision is always a proposal that waits for the Owner; the old lesson is superseded only on approval. An Owner-pinned lesson can only be revised this way.
    supersedes_expected_version: 填写 supersedes 时必填:旧条目的当前版本号。缺失 → version_required,不匹配 → version_conflict,均零写入。 / Required with supersedes: the old lesson's current version. Missing -> version_required; mismatch -> version_conflict; both write nothing.
NameRequiredDescriptionDefault
detailNo
domainNo
run_idNo
summaryYes
source_urlNo
supersedesNo
source_toolNo
source_agentNo
project_folderNo
user_confirmedNo
allow_similar_newNo
last_validated_atNo
supersedes_expected_versionNo

Output Schema

NameRequiredDescription
resultYes

TDQS

A4.3/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Goes far beyond the annotations by disclosing the write pipeline's consequences: similar summaries are linked as related rather than rejected, normalized-identical content is refused with a pointer to the existing entry, supersedes always creates a pending proposal requiring Owner approval, owner-pinned lessons can only be revised via supersedes, and version mismatch produces version_conflict with zero writes. These are exactly the non-obvious mutation semantics an agent must know before calling.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded and well sectioned (lifecycle, purpose, note, args), and each individual sentence earns its place. However, every sentence is duplicated verbatim in Chinese and English, roughly doubling the token cost with zero added information for a given reader. The arg list is also long relative to what a caller needs at invocation time.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

A 13-parameter mutation tool with an output schema and non-trivial dedup/versioning semantics, and the description covers the routing, dedup policy, revision protocol, and failure modes. Only the two undocumented parameters (project_folder, user_confirmed) leave a gap in what an agent needs to call it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must carry the load, and it does: 11 of 13 parameters get meaning, format hints (comma-separated domains, ISO-8601 timestamps, tool names like 'claude_code'), defaults, and even failure modes (version_required, version_conflict). Two parameters are never mentioned — project_folder and user_confirmed — leaving an agent to guess their effect on write behavior.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource (record a single lesson learned) and qualifies the input state ('when you already know what to save'), which distinguishes it from the extraction sibling. It also enumerates the trigger kinds (lesson, pitfall, technical finding). It does not distinguish itself from other writing siblings such as add_decision, add_playbook, or memory_store, which share the same 'write a knowledge artifact' space.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit positive condition ('call when the user explicitly states a lesson, pitfall, or technical finding') plus an explicit exclusion naming the alternative tool and the scenario that selects it (session summary → extract_session_insights). That is exactly the when/when-not/alternative routing an agent needs.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

add_playbookA

记录操作手册(Playbook)— 结构化的多步骤流程。 / Record an operational playbook — a structured multi-step procedure.

用途:完成一个多步骤操作流程后(如发布到 Registry、上架应用等),将步骤和经验记录为 Playbook,
方便日后调取复用,避免重复摸索。
Purpose: After completing a multi-step operational process (publishing to a registry, app deployment, etc.),
record the steps as a Playbook for future retrieval.

每条 Playbook 独立存储为单个文件,通过 triggers(记忆点关键词)快速调取。
Each Playbook is stored as an individual file, quickly retrievable via trigger keywords.

经 MCP 写入的 Playbook 一律进入待审(任何审批模式),主人用 engram review 批准后才会被使用。
A playbook written over MCP always waits in the review queue (every approval mode); it is used
only after the Owner approves it with engram review.

Args:
    title: 流程名称,如 'MCP Registry 发布流程'。 / Playbook name, e.g., 'MCP Registry publish workflow'.
    triggers: 记忆点关键词,逗号分隔,如 '发布,registry,上架'。 / Trigger keywords (comma-separated) for quick retrieval.
    steps_json: 步骤 JSON 数组,每个元素含 order/action/detail。 / Steps as a JSON array, each with order/action/detail.
    required_tools_json: 工具依赖 JSON 数组(可选),只声明工具名/用途,不写本机路径。 / Tool dependencies JSON array (optional); declares names/purposes, not local paths.
    tool_refs: 简写工具名,逗号分隔(可选)。 / Shorthand tool names, comma-separated (optional).
    description: 流程概述(可选)。 / Brief description (optional).
    domain: 技术领域,逗号分隔(可选)。 / Domain labels, comma-separated (optional).
    preconditions: 前提条件,逗号分隔(可选)。 / Preconditions, comma-separated (optional).
    pitfalls: 常见陷阱,逗号分隔(可选)。 / Common pitfalls, comma-separated (optional).
    outcome: 预期结果(可选)。 / Expected outcome (optional).
    source_tool: 来源工具(可选)。 / Source tool (optional).
    allow_similar_new: 标题相似但不相同、确属另一份手册时设为 true,写入新条目(可选,默认 false)。不能绕过标题完全相同的拒绝;该拒绝会指向已有手册并给出修订方式。 / Set true when a similar but not identical title is genuinely a DIFFERENT playbook, to store it as a new entry (optional, default false). It cannot bypass the refusal of an identical title; that refusal names the existing playbook and how to revise it.
    supersedes: 本手册修订的已有 playbook ID(可选)。修订提案总是进入待审,主人批准后旧手册才归档;被主人钉住的手册只能这样修订。 / ID of the existing playbook this one revises (optional). A revision is always a proposal that waits for the Owner; the old playbook is retired only on approval. An Owner-pinned playbook can only be revised this way.
    supersedes_expected_version: 填写 supersedes 时必填:旧手册的当前版本号。缺失 → version_required,不匹配 → version_conflict,均零写入。 / Required with supersedes: the old playbook's current version. Missing -> version_required; mismatch -> version_conflict; both write nothing.
NameRequiredDescriptionDefault
titleYes
domainNo
run_idNo
outcomeNo
pitfallsNo
triggersYes
tool_refsNo
scope_typeNoglobal
steps_jsonNo[]
supersedesNo
descriptionNo
source_toolNo
source_agentNo
preconditionsNo
project_folderNo
user_confirmedNo
allow_similar_newNo
last_validated_atNo
required_tools_jsonNo[]
supersedes_expected_versionNo

Output Schema

NameRequiredDescription
resultYes

TDQS

A4.1/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare this is a non-read-only, non-destructive, closed-world mutation, but the description adds substantial workflow context. It explains that each playbook is stored as an individual file, retrievable via trigger keywords, and that MCP writes always enter a review queue until the Owner approves. It also documents revision behavior, version conflicts, zero-write failure modes, and pinned-playbook restrictions, which are valuable beyond the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The information is front-loaded with purpose and usage before the argument list, which helps. However, the bilingual duplication roughly doubles the length, and the description repeats concepts already available in the structured review workflow. For a 20-parameter tool the detail is warranted, but the presentation is more verbose than necessary.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of 20 parameters, the approval workflow, and the existence of an output schema, the description covers the essential purpose, storage model, review behavior, revision semantics, and most caller-facing parameters. It leaves several optional or internal-looking parameters undocumented, such as run_id, scope_type, source_agent, project_folder, user_confirmed, and last_validated_at. Output values need not be explained because an output schema exists.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must carry parameter meaning. It documents most parameters with examples and semantics, including title, triggers, steps_json, required_tools_json, tool_refs, description, domain, preconditions, pitfalls, outcome, source_tool, allow_similar_new, supersedes, and supersedes_expected_version. It omits some parameters such as run_id, scope_type, source_agent, project_folder, user_confirmed, and last_validated_at, so it is not fully complete.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states a specific verb and resource: record an operational playbook as a structured multi-step procedure. It gives concrete examples such as publishing to a registry or app deployment. It does not explicitly distinguish itself from siblings like add_lesson or add_decision, so it falls short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives a clear usage condition: after completing a multi-step operational process, record the steps for future retrieval and reuse. It does not name alternative tools or state when not to use this tool versus siblings such as add_lesson, add_decision, or memory_store. The guidance is strong but lacks explicit alternatives or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

doctorA
Read-onlyIdempotent

记忆系统自诊断。 / Memory system self-diagnosis.

用途:检查 Engram 记忆系统健康状态,发现潜在问题(数据碎片、过期知识、冲突决策、
身份层异常等)。这是 MCP doctor;CLI 冲突视图请用 ``engram conflicts list``。
Purpose: Run a comprehensive health check on the Engram memory system —
detects data fragmentation, stale knowledge, conflicting decisions, identity
issues, and more.

Args:
    output_format: "markdown" 或 "json"。 / "markdown" or "json".
NameRequiredDescriptionDefault
output_formatNomarkdown

Output Schema

NameRequiredDescription
resultYes

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint, idempotentHint and destructiveHint=false, so the safety profile is covered; the description adds what the check actually inspects ('data fragmentation, stale knowledge, conflicting decisions, identity issues'), which is genuine context beyond the annotations. It doesn't describe report shape or runtime cost, but the output schema exists for that.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the one-line purpose, then use case, then parameters — a clean shape. It is roughly doubled in length because every sentence is given in both Chinese and English, which is wasteful for a single-locale reader but consistent and still scannable.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present the description needn't document return values, and it covers purpose, scope and the single parameter's allowed values. The only omission is practical guidance about when in a workflow to invoke it, which is minor for a one-parameter read-only diagnostic.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% and the schema has no enum, so the description carries the burden by naming the two legal values ('markdown' or 'json'). That is real added meaning beyond the schema, though it omits any note about the default or output size differences.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Run a comprehensive health check on the Engram memory system') and enumerates the problem classes it detects (fragmentation, stale knowledge, conflicting decisions, identity issues). None of the sibling tools are diagnostic, and it explicitly distinguishes itself from the CLI conflicts view, so an agent can place it without ambiguity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The purpose plus the explicit routing note ('this is MCP doctor; for the CLI conflict view use engram conflicts list') gives clear context for when to select it and what the adjacent alternative is. It stops short of stating triggering conditions such as running it after a session or when recall results look inconsistent.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_daily_logA
Read-onlyIdempotent

读取项目的每日日志(人类可读的会话时间线)。 / Read a project's daily log (human-readable session timeline).

用途:v3.30 新增——每次 wrap_up_session 会在 ``~/.engram/daily/<pid>/<YYYY-MM-DD>.md``
追加一条带时间戳的条目(含 lesson/decision/playbook 计数 + 摘要前 600 字符)。
新会话需要"上次到底干了什么"的快速概览时调本工具,比 search_knowledge 更直观。
Purpose (v3.30): every wrap_up_session appends a timestamped entry to
``~/.engram/daily/<pid>/<YYYY-MM-DD>.md`` with a lesson/decision tally
and the first ~600 chars of the summary. Call this when a new session
needs a glance-able "what happened today" timeline — faster than
search_knowledge for recall.

Args:
    project_folder: 项目文件夹路径。 / Project folder path.
    date: ISO 日期 ``YYYY-MM-DD``(可选,默认今天)。 / ISO date (optional, defaults to today).
NameRequiredDescriptionDefault
dateNo
project_folderYes

Output Schema

NameRequiredDescription
resultYes

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already cover the safety profile (readOnly, idempotent, closed-world), so the description's job is added context — and it delivers: it discloses the on-disk path, the entry format (timestamp + lesson/decision tally), and the ~600-char truncation of summaries, which tells the agent the content is lossy. It does not say what is returned when no entry exists for the requested date, which is the one behavioral gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Content-wise it is front-loaded and every claim is relevant, but the entire description is duplicated in Chinese and English, roughly doubling length for the same information. Efficient in ordering, wasteful in volume.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-parameter read tool with an output schema (so return shape needs no explanation), the definition covers purpose, data source, entry format, and both parameters. The remaining gaps — empty/missing-log behavior and project_folder path resolution — are minor but real.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must carry the payload — and it documents both args: project_folder as a project folder path and date as ISO YYYY-MM-DD with a documented default of today. It stops short of specifying path form (absolute vs. relative) or invalid-date behavior.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Read a project's daily log / human-readable session timeline') and immediately explains the provenance: entries appended by wrap_up_session at a known path. It explicitly distinguishes itself from search_knowledge, so an agent can choose between the two without opening a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit trigger ('when a new session needs a glance-able "what happened today" timeline') and names the alternative with a comparison ('faster than search_knowledge for recall'). The routing decision is fully specified.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_identity_cardA
Idempotent

导出用户的可携带 AI 身份卡(Markdown 格式)。 / Export the user's portable AI identity card as Markdown.

Owner/export surface: writes exports/identity_card.md and is refused for non-owner callers when governance is enabled.

用途:需要把用户身份、工作方式、质量标准、经验教训分享给其它 AI 工具时调用。
Purpose: Call when another AI tool needs a self-contained summary of the user's identity, work style, quality standards, and lessons.

注意:如果本会话只需要运行时上下文,用 get_user_context 更合适。
Note: If the current session only needs runtime context, get_user_context is usually the better choice.
NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription
resultYes

TDQS

A4.6/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Goes well beyond the annotations: it discloses that the tool writes to exports/identity_card.md and that non-owner callers are refused when governance is enabled, which explains why readOnlyHint is false despite the benign framing. What it doesn't cover is what happens on an export collision — overwrite, versioning, or error — for a tool that writes to a fixed path.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The information architecture is strong — purpose, owner/export surface, when to use, when not to — with the operational constraint front-loaded. The only cost is that every sentence is duplicated in Chinese and English, roughly doubling the length for an English-reading agent.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return-value detail is unnecessary, and with no parameters the surface is small. The description still covers purpose, the file side effect, the authorization constraint, and the sibling alternative — nothing material is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool takes zero parameters, so there is nothing to disambiguate and no schema coverage gap; baseline 4 applies. The description correctly implies the call is fully determined by the caller's identity at runtime rather than by arguments.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (export) and resource (the user's portable AI identity card), plus the output format (Markdown). It also enumerates the content of the card — identity, work style, quality standards, lessons — which separates it from get_user_context without the agent needing to open any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit trigger ('when another AI tool needs a self-contained summary') and an explicit exclusion with the named alternative ('if the current session only needs runtime context, use get_user_context'). The routing decision is fully determined by the text.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_knowledge_historyA
Read-onlyIdempotent

查看一个知识条目(lesson/decision/playbook)的修订历史。 / Return the revision history (superseded snapshots) of one knowledge item.

**Lifecycle: retrieval** — 需要追溯某条知识改过什么、何时改的、改前长什么样时调用。
Lifecycle: retrieval — call when you need what changed on an item, when, and what the prior body looked like.

用途:修订后核对旧行为、审计版本链、或找回被改掉的内容。
Purpose: verify prior behavior after a revision, audit a version chain, or recover replaced content.

Args:
    item_id: 条目 ID(稳定 HEAD id,不是快照 id)。 / Item id (the stable HEAD id, not a snapshot id).
    include_bodies: 是否在结果里带快照正文(默认 false 只给元数据)。 / Include snapshot bodies in the result (default false returns metadata only).
    version: 精确按版本号取一个快照(可选);不存在时返回 version_not_found 而不是近似值。 / Exact by-version snapshot lookup (optional); a miss returns version_not_found, never a nearest match.
NameRequiredDescriptionDefault
item_idYes
versionNo
include_bodiesNo

Output Schema

NameRequiredDescription
resultYes

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already cover read-only, idempotent, non-destructive, closed-world. Beyond that, the description discloses the error contract (version miss returns version_not_found, never approximate) and the payload-size tradeoff of include_bodies=false returning metadata only. It does not describe ordering of snapshots or pagination, so it is not a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Content is front-loaded with purpose, then lifecycle, then purpose-in-practice, then args — a clean structure. The cost is that every sentence is duplicated in Chinese and English, roughly doubling length without adding information, which is the only thing keeping it from a 5.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need not be explained. All three parameters are given meaning, the version-miss error path is named, and the HEAD-id-vs-snapshot-id trap is called out — everything an agent needs to invoke this correctly is present.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description carries the full burden and does: item_id is explicitly 'the stable HEAD id, not a snapshot id' — a distinction the schema cannot convey and an easy mistake to make. It also documents include_bodies' default effect (metadata only) and version's exact-match semantics with the version_not_found failure mode instead of a nearest match.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: 'Return the revision history (superseded snapshots) of one knowledge item', and enumerates the item types it applies to (lesson/decision/playbook). This clearly distinguishes it from siblings like search_knowledge or get_relevant_knowledge, which retrieve current content rather than version chains.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The 'Lifecycle: retrieval' line plus three concrete triggers (verify prior behavior after a revision, audit a version chain, recover replaced content) tell the agent exactly when to call it. It does not name an alternative tool or state when NOT to use it, which is why it stops short of a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_project_contextA
Read-onlyIdempotent

读取特定项目的知识快照(项目级,只含该项目的历史)。 / Read the knowledge snapshot for a specific project, containing only that project's history.

用途:想了解某个项目之前的技术栈、已知问题、协作次数时调用。
Purpose: Call when you need a project's previous tech stack, known issues, notes, or collaboration history.

注意:如果想获取用户级完整身份上下文,用 get_user_context;如果想写入项目快照,用 save_project_snapshot。
Note: Use get_user_context for full user-level context; use save_project_snapshot to write a project snapshot.

Args:
    project_folder: 项目文件夹路径。 / Project folder path.
NameRequiredDescriptionDefault
project_folderYes

Output Schema

NameRequiredDescription
resultYes

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so safety and repeatability are covered structurally. The description adds real context beyond that: the result is scoped to a single project's history rather than a merged view. It does not say what happens when no snapshot exists for the folder (empty result vs. error), which is the one behavior an agent might need to branch on.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core purpose, then usage, then alternatives — a good ordering. The cost is full bilingual duplication of every sentence, which roughly doubles length without adding information for a single-language reader, though it does serve mixed-language agents.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a one-parameter read tool, the essentials are present: purpose, trigger conditions, sibling routing, and a meaningful scope constraint, with an output schema available to explain return values. The only gap is the empty/missing-snapshot case, which an agent would otherwise have to discover by calling.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% for the single required parameter, so the schema itself says only 'string'. The description restates it as 'Project folder path', which confirms the parameter is a filesystem folder but gives no format, whether it is absolute or relative, or how to match an existing project name. Partial compensation for a total coverage gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('read the knowledge snapshot for a specific project') and immediately bounds scope ('containing only that project's history'), which cleanly separates it from the user-level sibling. An agent can distinguish it from get_user_context and get_relevant_knowledge without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly names the triggering situations ('previous tech stack, known issues, notes, or collaboration history') and routes the agent elsewhere for the two adjacent needs: get_user_context for user-level identity and save_project_snapshot for writing. This covers both the read-alternative and the write-alternative, leaving nothing to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_recallA
Read-onlyIdempotent

获取结构化 Recall Surface v1 载荷。 / Get a structured Recall Surface v1 payload.

用途:在新任务、跨工具接续或需要"一次拿到可执行记忆包"时调用。
返回身份摘要、最近活动、项目/查询相关知识和治理元数据。
Purpose: Call when a new task or cross-tool handoff needs one structured,
actionable memory bundle: identity slice, recent activity, relevant
knowledge, and governance metadata.

只返回已审核且当前有效的知识;预算裁掉内容时 meta.omitted 给出 {omitted_count, ids, sections, reason}。
Returns reviewed, current knowledge only; when the budget drops items,
meta.omitted reports {omitted_count, ids, sections, reason} (no content).

注意:该聚合视图可能组合多类知识和最近上下文,因此治理开启时仅 owner
(private-self) 可读;非 owner 会在读取前被拒绝,不触发搜索或遥测写入。
Note: Because this aggregate view can combine multiple knowledge classes and
recent context, it is owner-only when governance is enabled. Non-owners are
refused before any search or telemetry side effect runs.

Args:
    project_folder: 项目文件夹路径(可选)。 / Project folder path (optional).
    query: 可选搜索焦点。 / Optional search focus.
    limit: 最多返回多少条知识(默认 8,上限 20)。 / Max knowledge items (default 8, max 20).
    token_budget: 知识片段的粗略 token 预算(默认 2000)。 / Rough token budget for knowledge items.
    include_freshness: 是否附加 freshness 提示。 / Attach freshness hints.
    collapse_versions: 保留兼容;被取代的旧版本、待审和已归档条目一律不进入召回。 / Kept for compatibility; superseded versions, pending and archived items never enter recall.
    include_playbooks: 是否附带 playbook 指针桶(v4.20,默认 False;元数据+240 字描述预览,完整步骤永不入召回,最多 2 条且 ≤25% 知识预算)。 / Attach the playbook pointer bucket (v4.20, default False; metadata + 240-char description preview, full steps never enter recall, max 2 items and <=25% of the knowledge budget).
NameRequiredDescriptionDefault
limitNo
queryNo
token_budgetNo
project_folderNo
collapse_versionsNo
include_freshnessNo
include_playbooksNo

Output Schema

NameRequiredDescription
resultYes

TDQS

A4.4/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the annotations, the description discloses that only reviewed/current knowledge is returned, that superseded/pending/archived items are excluded, that meta.omitted reports {omitted_count, ids, sections, reason} when the budget trims, and that owner-only governance refusal happens before any search or telemetry side effect — a meaningful safety disclosure.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Content is front-loaded and every clause is substantive, but the full Chinese/English duplication roughly doubles the length of a description that is already dense. The information is useful; the delivery is bloated.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Return shape, omission metadata, governance gating, and every parameter are covered, and an output schema exists to carry the response structure. An agent has everything needed to decide and call correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% for 7 parameters, and the Args block compensates fully: limit default 8 with max 20, token_budget default 2000, include_playbooks v4.20 default False with a 240-char preview cap and <=25% budget ceiling, and collapse_versions' compatibility semantics. This is exactly the added meaning the schema lacks.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

It states a concrete verb+resource ("Get a structured Recall Surface v1 payload") and enumerates the payload's components: identity slice, recent activity, relevant knowledge, governance metadata. That distinguishes it from narrow siblings like get_identity_card or get_knowledge_history, though it never names an alternative outright.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The 'Purpose' line gives an explicit trigger condition: new task, cross-tool handoff, or needing an actionable memory bundle in one shot. No explicit when-not or named alternative, but the aggregate framing implicitly routes simple lookups to the narrower sibling tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_recent_contextA
Read-onlyIdempotent

找回最近的 AI 对话上下文。 / Retrieve the most recent AI conversation context.

用途:上下文丢失时(工具重启、会话断开)调用,找回之前的工作状态。
Purpose: Call after context loss (tool restart, session disconnect) to recover previous work state.

不会自动加载到新会话 — 只在你需要时才读取。
Does NOT auto-load into new sessions — only reads when you ask.

Args:
    tool: 工具名(可选)。留空则搜索所有工具的上下文。 / Tool name (optional). Empty searches all tools.
    limit: 最多返回几个会话(默认 1 = 最近一次)。 / Max sessions to return (default 1 = most recent).
NameRequiredDescriptionDefault
toolNo
limitNo
project_folderNo

Output Schema

NameRequiredDescription
resultYes

TDQS

A3.8/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint/idempotentHint/destructiveHint=false, so the safety profile is covered; the description adds genuinely new behavioral facts — that nothing is auto-injected into new sessions and that reads are on-demand only. It doesn't discuss result shape, but an output schema exists, so that omission is acceptable.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose and the 'does not auto-load' caveat are front-loaded and earn their place, but every sentence is duplicated in Chinese and English, roughly doubling length without adding information. The Args block is efficiently formatted, so the waste is redundancy rather than tangential content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With annotations covering safety, an output schema covering return values, and zero required parameters, the description does nearly all the remaining work: purpose, trigger, and the non-auto-load caveat are all present. The only shortfall is the undocumented 'project_folder' parameter.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must carry all three parameters; it explains 'tool' (empty = search all tools) and 'limit' (default 1 = most recent) with useful semantics. It says nothing about 'project_folder', leaving one of three parameters completely undefined — a real gap for an agent scoping a recovery query.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource ('Retrieve the most recent AI conversation context') and frames the scope as conversation history rather than user, project, or knowledge state, which is what separates it from get_user_context / get_project_context / get_relevant_knowledge. It never names a sibling explicitly, so the differentiation is inferred rather than stated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives a concrete trigger ('Call after context loss — tool restart, session disconnect') and adds a negative rule ('Does NOT auto-load into new sessions — only reads when you ask'), which prevents the agent from assuming the context is already present. No alternative tool is named for the cases this one doesn't cover.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_relevant_knowledgeA
Read-onlyIdempotent

按项目路径自动推荐最相关的经验教训(无需搜索词)。 / Automatically recommend the most relevant lessons for a project path, without search keywords.

**Lifecycle: retrieval** — 在对话中需要项目相关的历史知识时调用。
Lifecycle: retrieval — call mid-conversation when project-relevant past knowledge is needed.

用途:你知道当前项目路径但不知道该搜什么词时调用,Engram 根据项目技术栈自动筛选。
Purpose: Call when you know the current project path but not the right search terms; Engram filters by project tech stack.

注意:如果用户给了明确搜索词,用 search_knowledge 更直接。只返回已审核且当前有效的经验(待审、被取代、已归档的不返回)。
Note: If the user provides explicit search keywords, search_knowledge is more direct. Returns reviewed, current lessons only (no pending, superseded or archived items).

Args:
    project_folder: 当前项目文件夹路径。 / Current project folder path.
    limit: 最多返回多少条(默认 8)。 / Maximum number of items to return (default 8).
    include_freshness: 为每条结果附加 freshness/新鲜度提示(默认 False,保持旧输出不变)。 / Attach a per-item freshness hint (default False; output is unchanged when omitted).
NameRequiredDescriptionDefault
limitNo
project_folderYes
include_freshnessNo

Output Schema

NameRequiredDescription
resultYes

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare a safe read (readOnlyHint, idempotent, non-destructive), so the bar is lower, yet the description still adds real behavior: filtering is by inferred project tech stack, and only reviewed/current lessons are returned while pending, superseded and archived are excluded. It also notes include_freshness leaves output unchanged when omitted, which prevents surprises. Return shape is left to the output schema, which is acceptable.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with purpose and lifecycle, then usage, then caveats, then args — a clean hierarchy. The full bilingual duplication doubles the token cost for any single-language reader, which is the main inefficiency, though the added lines are at least the highest-value ones.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present, return values need no explanation, and the three-parameter surface is fully documented. What remains unexplained is how the project tech stack is inferred and what happens if the folder path is unrecognized — minor given the retrieval-only, read-only nature of the call.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description carries the full burden and mostly does: every parameter is defined with meaning and default value (project_folder as current project path, limit default 8, include_freshness default False with its effect on output). It stops short of stating path format expectations (absolute vs relative) or behavior when the path is unknown.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('recommend the most relevant lessons for a project path') plus the distinguishing mechanism ('without search keywords'). The 'Purpose' paragraph further contrasts it with search_knowledge, so an agent can separate it from the sibling without reading either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit trigger ('call mid-conversation when project-relevant past knowledge is needed') and an explicit exclusion with named alternative ('If the user provides explicit search keywords, use search_knowledge more directly'). This is the when/when-not/alternative triad at full strength.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_resume_briefA
Read-onlyIdempotent

跨会话/跨工具接续简报(v3.30 新增)。 / Cross-session, cross-tool resume brief.

**用途:v3.30 行业首家"一次调用拿到完整接续简报"的高层 API。**
用户切换工具(Claude Code → Codex/Cursor)或开新对话时,AI 调用本工具
一次即可拿到:用户身份 + 当前项目状态 + 今日日志 + 最近会话上下文 +
最近经验/决策 + 建议阅读的项目文档清单。结果用
``<engram-resume priority="high">`` XML 标签包裹,提示客户端 AI 优先遵守。

Purpose (v3.30): the "what does the next AI need to know in 30 seconds"
high-level endpoint. When users switch tools or open a new chat,
calling this once returns identity + project state + today's daily log
+ recent context + top lessons/decisions + suggested project docs to
read. Result is wrapped in ``<engram-resume priority="high">`` so client
AIs (Claude Code additionalContext, Codex system prompt, etc.) treat
it as high-priority reference context.

Lifecycle: **session start** — call before the first user message in a
new session when continuing prior work, or whenever the user says
things like "接着上次", "继续之前", "what were we doing".

Args:
    project_folder: 项目文件夹路径(可选)。留空只返回身份卡。 /
        Project folder (optional). Empty returns identity-only.
    token_budget: 输出 token 软上限(默认 2000,约 8000 字符)。超出时结果带 omitted,正文末尾注明省略了什么。 /
        Soft cap for output tokens (default 2000 ≈ 8000 chars). When it cuts content,
        the result carries ``omitted`` and the brief ends with one line naming what was left out.
    include_resume_pack: Include structured ``project_resume_pack.v1`` in
        the JSON response. Defaults to false to preserve existing output.
    include_agent_context_pack: Include structured
        ``agent_context_pack.v1`` for delegated sub-agent briefing.
        Defaults to false to preserve existing output.
    agent_role: Role used to shape the optional agent context pack.
    task_summary: Current delegated task summary for agent-pack selection.
NameRequiredDescriptionDefault
agent_roleNoorchestrator
task_summaryNo
token_budgetNo
project_folderNo
include_resume_packNo
include_agent_context_packNo

Output Schema

NameRequiredDescription
resultYes

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already cover read-only/idempotent/non-destructive, and the description adds real context beyond them: the output is wrapped in <engram-resume priority="high"> for client AI prioritization, and truncation over token_budget is signaled via an `omitted` field plus a trailing explanatory line. The one gap is that it does not describe latency/cost of the aggregate call or what happens when no project_folder is supplied beyond 'identity-only'.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the key purpose and lifecycle, but the entire body is duplicated in Chinese and English, roughly doubling length without adding information; the 'v3.30 行业首家' marketing line is pure filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a six-parameter aggregate read tool with an output schema, the description supplies everything needed: trigger conditions, per-parameter semantics and defaults, output wrapping convention, and truncation signaling. Return value structure is covered by the output schema, so nothing critical is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description carries the full burden — and it documents all six parameters, including defaults and effects: project_folder (empty = identity-only), token_budget (default 2000 ≈ 8000 chars, truncation behavior), include_resume_pack and include_agent_context_pack (default false to preserve existing output shape), agent_role, and task_summary (used to shape/select the agent pack).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource (returns a complete resume brief in one call) and explicitly frames it as the high-level aggregate endpoint versus the finer-grained siblings in the list (get_identity_card, get_project_context, get_daily_log, get_recent_context, get_relevant_knowledge). The enumerated contents (identity + project state + daily log + recent context + lessons/decisions + suggested docs) make the scope unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives a concrete trigger — 'session start, before the first user message when continuing prior work' — plus example user phrases ('接着上次', '继续之前'). It does not explicitly say when to prefer it over sibling tools like get_user_context or get_recent_context, which it partly subsumes, so an agent must infer the routing.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_user_contextA
Read-onlyIdempotent

获取用户的个性化上下文(冷启动,分层延迟可控)。 / Get tiered cold-start user context with latency control.

**Lifecycle: startup** — 对话开始时调用,为 AI 注入用户身份和上下文。
Lifecycle: startup — call at conversation start to inject user identity and context.

用途:在每次新对话开始时调用,了解用户是谁、如何工作、学到了什么、质量标准是什么。
Purpose: Call at the start of each new conversation to understand who the user is, how they work, what they have learned, and their quality bar.

分层说明 / Tiered behaviour:
- "quick": 仅身份画像 + 工作偏好(纯 JSON 读取,无文件扫描,最低延迟)。
  Profile + preferences only — pure JSON reads, no filesystem scans. Lowest latency.
- "standard"(默认): 加上质量标准、经验领域、相关教训/决策、项目快照。
  Default. Adds quality, domains, top lessons/decisions, project snapshot.
- "full": 完整上下文,含冲突检测、过期/暂存提醒。仅在用户明确要求"全量回顾"时使用。
  Full context including conflict detection and stale/staging warnings. Use only when the user explicitly asks for a comprehensive memory review.

任何级别都只读:不扫描、不导入其它 AI 工具的文件(那是用户在终端运行的 `engram import-memories`)。
Every level only reads: other AI tools' files are never scanned or imported here (that is the user's `engram import-memories` command in a terminal).

注意:默认 "standard" 已覆盖绝大多数冷启动需求;只有用户问"我们之前所有决定/经验"或要做记忆健康检查时才用 "full"。
Note: "standard" covers most cold-start needs. Use "full" only when the user asks for a comprehensive memory review.

Args:
    project_folder: 当前项目文件夹路径(可选)。 / Current project folder path (optional).
    level: "quick" | "standard" | "full",默认 "standard"。 / Tier — defaults to "standard".
    token_budget: 上下文 token 预算(可选)。设定后按优先级裁剪 section,低优先级 section 先丢弃,末尾一行注明省略了什么。不设则返回全量。
        Optional token budget. When set, sections are included by priority until budget is exhausted;
        a cut ends the context with one line naming what was left out.
    user_prompt: 用户当前提问(可选)。传入后会追加到上下文末尾,并与已存 Playbook 的
        triggers 关键词匹配,命中时浮现「相关 Playbook」小节(标题 + ID;用 get_playbooks(mode="get") 查看完整步骤)。
        Optional current user prompt. Appended to the context and matched against stored
        playbook trigger keywords; hits surface a "Matched Playbooks" section (title + id;
        call get_playbooks(mode="get") for the full steps).
NameRequiredDescriptionDefault
levelNostandard
user_promptNo
token_budgetNo
project_folderNo

Output Schema

NameRequiredDescription
resultYes

TDQS

A4.9/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already cover read-only, idempotent and closed-world, but the description goes further: it discloses that no level touches the filesystem or other tools' files, that token_budget drops low-priority sections and appends a line naming what was omitted, and that user_prompt triggers playbook keyword matching. These are behavioral traits an agent could not infer from the structured fields.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well front-loaded with the lifecycle trigger, then tiers, then cautions, then args; every block is scannable. The only waste is the line-by-line Chinese/English duplication, which roughly doubles the token cost without adding information for a single-language reader.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-required-parameter read tool with an output schema, nothing an agent needs is missing: trigger, tier contents, default, truncation behavior, and the downstream call for full playbook steps are all stated. The output schema can handle return-shape detail.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% and the level enum is absent from the schema, so the description carries the full burden — and it does: all four parameters are explained, including the three concrete 'level' values with what each contains, the priority-based truncation semantics of token_budget, and the playbook-matching side effect of user_prompt.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a concrete verb and resource ('Get tiered cold-start user context with latency control') plus a plain-language purpose ('understand who the user is, how they work, what they have learned, and their quality bar'). The tier breakdown makes the scope of this tool distinguishable from narrower siblings like get_identity_card or get_project_context.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit trigger ('call at the start of each new conversation'), an explicit default ('standard' covers most cold-start needs), and an explicit exclusion for 'full' ('use only when the user asks for a comprehensive memory review'). It also pre-empts a likely mistake by noting that importing other AI tools' files is not done here but via the terminal command.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_wrap_up_session_statusA
Read-onlyIdempotent

读取 wrap_up_session 的阶段状态。 / Read metadata-only stage status for a wrap_up_session operation.

用途:当 MCP 客户端在会话收尾时遇到 transport timeout,可用调用前已知的
idempotency_key,或成功返回过的 operation_id,查询最后阶段和终态。长期未更新的
running 会只读标记为 stale_running。该工具不返回会话摘要正文或项目本地路径。
Purpose: after a session-closeout transport timeout, query metadata-only
state by the caller-known idempotency_key or a returned operation_id.
Long-unupdated running records are projected as stale_running without
mutating the record. No summary text or local project path is returned.
NameRequiredDescriptionDefault
operation_idNo
idempotency_keyNo

Output Schema

NameRequiredDescription
resultYes

TDQS

A4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the readOnly/idempotent annotations, it discloses two non-obvious behaviors: long-unupdated running records are *projected* as stale_running without mutating the record, and the response deliberately omits summary text and local project paths. That is genuine added context rather than restatement of the annotation flags.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded in the first sentence, which is good, but the entire description is duplicated verbatim in Chinese and English, doubling length without adding a single new fact. The remaining sentences mix purpose, trigger condition, and response exclusions into one block without separation.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-optional-parameter read tool with a rich annotation set and an output schema, the description covers trigger, inputs, staleness projection, and output omissions well. The only real hole is the empty-arguments / conflicting-arguments case, which an agent could plausibly hit given zero required parameters.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description carries the burden, and it does explain the provenance of each parameter: idempotency_key is caller-known before the call, operation_id is one previously returned. However, with zero required parameters it never states what happens when both are empty or both are supplied, leaving the disambiguation and conflict behavior unaddressed.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opening sentence states a specific verb and resource ('read metadata-only stage status for a wrap_up_session operation') and names the sibling operation it belongs to, so an agent can immediately distinguish it from wrap_up_session itself. The scope is further narrowed ('metadata-only', 'no summary text or local project path') rather than left as a generic 'status' tool.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives an explicit triggering condition ('after a session-closeout transport timeout') and tells the caller which identifiers to supply depending on what they have on hand. It does not say when NOT to call it (e.g., while the operation is still in flight, or before ever calling wrap_up_session), so it is clear context without full exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

memory_storeA

统一知识写入入口 — 根据 kind 自动路由到 add_lesson / add_decision / add_playbook。 Unified knowledge write endpoint — routes to add_lesson / add_decision / add_playbook based on kind.

**Lifecycle: writeback** — 对话中产生值得长期保留的知识时调用。
Lifecycle: writeback — call when the conversation produces knowledge worth persisting.

这是 Provider 兼容的统一写入接口。如果你已经明确知道要写 lesson/decision/playbook,
也可以直接调用对应的专用工具。本工具的优势在于:调用方不需要知道 Engram 内部的分类体系。
This is a provider-compatible unified write interface. You may also call the specialized
tools directly. The advantage here: callers don't need to know Engram's internal taxonomy.

Args:
    kind: 知识类型 — 'lesson' | 'decision' | 'playbook'。批量模式下作为各条目的类型(playbook 不支持批量)。 / Knowledge type; in batch mode, the item type for every item (playbook not supported in batch).
    content_json: 知识内容 JSON 字符串(单条模式必填)。格式因 kind 而异:
        - lesson: {"summary": "...", "detail": "...", "domain": "..."}
        - decision: {"question": "...", "choice": "...", "reasoning": "..."}
        - playbook: {"title": "...", "triggers": "...", "steps_json": "[...]"}
        Content JSON string (required in single mode). Schema varies by kind (see above).
    source_tool: 调用来源工具(可选),如 'claude_code', 'cursor'。 / Source tool (optional).
    items_json: 条目 JSON 数组;给了就走批量写入(一次导入多条 lesson/decision)。 / JSON array of items; when provided, batch-writes multiple lessons/decisions in one call.
    allow_similar_new: 单条 lesson/playbook:内容相似但不相同、确属新条目时设为 true(可选,默认 false);不能绕过完全相同内容的拒绝。 / Single lesson/playbook: set true when similar but not identical content is genuinely new (optional, default false); it cannot bypass the refusal of identical content.

取代提案:内容(或批量中的某一条)带 supersedes=<已有条目 ID> 时,必须同时带 supersedes_expected_version=<该条目当前版本>;缺失 → version_required,不匹配 → version_conflict,整次调用零写入。
Supersede proposals: content (or a batch item) carrying supersedes=<existing id> must also carry supersedes_expected_version=<that entry's current version>; missing -> version_required, mismatch -> version_conflict, and the whole call writes nothing.
NameRequiredDescriptionDefault
kindYes
items_jsonNo
source_toolNo
content_jsonNo
project_folderNo
user_confirmedNo
allow_similar_newNo

Output Schema

NameRequiredDescription
resultYes

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond annotations it discloses important non-obvious behavior: identical-content refusal, allow_similar_new limits, and the supersede protocol with version_required/version_conflict errors plus all-or-nothing atomicity. Strong disclosure; deductions only because the two undocumented params (project_folder, user_confirmed) leave some behavioral surface unexplained.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Content is front-loaded and well-sectioned, but it is presented twice in Chinese and English, roughly doubling length without adding information. Effective but not tight.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

A mutation tool with annotations and an output schema, so return values and safety profile are covered elsewhere; the description adds the routing contract, payload shapes, and error semantics. The undocumented project_folder/user_confirmed params are the remaining gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema coverage the description must carry parameter meaning, and it documents kind, content_json's per-kind payload shapes, source_tool, items_json batch semantics, and allow_similar_new. However, project_folder and user_confirmed receive no explanation anywhere, leaving 2 of 7 params opaque.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Unified knowledge write endpoint') and explicitly names the three specialized targets it routes to (add_lesson / add_decision / add_playbook) based on kind. This lets an agent distinguish it from the sibling add_* tools without opening schemas.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit trigger ('call when the conversation produces knowledge worth persisting'), names the alternative ('you may also call the specialized tools directly'), and states the selection advantage (callers needn't know Engram's taxonomy). This is a full when/when-else/why rubric.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

save_project_snapshotA
Destructive

写入或更新项目的知识快照(写操作,不是读取)。 / Write or update a project's knowledge snapshot; this is a write operation, not a read.

用途:保存或更新当前项目的技术栈、已知问题、注释等信息。
Purpose: Call to save or update a project's tech stack, known issues, notes, and related metadata.

注意:读取项目快照用 get_project_context,不是本工具。
Note: Use get_project_context to read a project snapshot; this tool writes one.

Args:
    project_folder: 项目文件夹路径。 / Project folder path.
    data_json: JSON 字符串,支持字段 title、tech_stack、known_issues、notes。 / JSON string supporting fields: title, tech_stack, known_issues, and notes.
NameRequiredDescriptionDefault
data_jsonYes
project_folderYes

Output Schema

NameRequiredDescription
resultYes

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=false, destructiveHint=true, and idempotentHint=false. The description confirms the tool mutates data and lists the fields it writes, but it does not add beyond-annotation specifics such as whether an existing snapshot is replaced vs merged, or the exact data-loss implications of the destructive write.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded and the Args section is useful, but the entire content is duplicated in Chinese and English. That duplication inflates length without adding information, so it is only moderately concise.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-parameter write tool with an output schema and rich annotations, the description supplies the purpose, both parameter meanings, the supported data fields, and the read alternative. A minor gap remains around overwrite vs merge semantics, which is relevant for a destructive write.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate, and it does document both required parameters: project_folder as the project folder path and data_json as a JSON string supporting title, tech_stack, known_issues, and notes. It lacks format examples or constraints, keeping it below a top score.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: write/update a project's knowledge snapshot. It explicitly says this is a write operation, not a read, and names get_project_context as the read counterpart, making it easy to distinguish from siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It clearly identifies when to use the tool: saving or updating tech stack, known issues, notes, and related metadata. It also explicitly names when not to use it and which alternative to use instead: get_project_context for reading.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_knowledgeA
Read-onlyIdempotent

搜索知识库(lessons/decisions/playbooks)。 / Search lessons, decisions, and playbooks by keyword.

**Lifecycle: retrieval** — 在对话中需要检索历史知识时调用。
Lifecycle: retrieval — call during conversation when past knowledge is needed.

Call when the user asks to find knowledge about a specific topic,
or recalls a procedure ('X how to' / 'X steps').

Result groups: "lessons" / "decisions" / "playbooks" hold reviewed, current
items only. Items still waiting for the user's review come back separately
under "pending" (same three lists, each item flagged pending_untrusted=true):
treat them as unconfirmed proposals, not as the user's rules. Items replaced
by a newer version are left out unless include_superseded=true, which adds a
separate "superseded" group (each item names superseded_by).

If you only have a project path and no query, use get_relevant_knowledge;
if you have an existing knowledge ID, use explore_knowledge(mode="similar").

Args:
    query: Search query keywords.
    scope: Search scope: 'all', 'lessons', 'decisions', or 'playbooks'.
    limit: Maximum number of items to return (default 10).
    filters_json: Optional JSON string with filter criteria. Supported keys:
        - "domain": str — only items whose domain contains this value
        - "tier": str — only items matching this tier ('staging' or 'verified')
        - "date_after": str — ISO date string, only items created after this date
        Example: '{"tier": "verified", "domain": "python"}'
    include_freshness: Attach a per-item freshness hint (fresh/aging/stale)
        to each returned item. Default False keeps the response unchanged.
    max_field_chars: Per-field size cap. Every string field in each returned
        item (detail/reasoning/description/steps/...) longer than this is
        clipped with a "[+N chars truncated]" marker so a few large bodies
        cannot blow up the client. Item shape, ids, and headlines are kept.
        Set 0 for full untruncated bodies (default 400).
    include_superseded: Also return items replaced by a newer version, in a
        separate "superseded" group (default False).
NameRequiredDescriptionDefault
limitNo
queryYes
scopeNoall
filters_jsonNo
project_folderNo
max_field_charsNo
include_freshnessNo
include_supersededNo

Output Schema

NameRequiredDescription
resultYes

TDQS

A4.4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already establish readOnly/idempotent/non-destructive, but the description still adds real value: 'pending' items are flagged pending_untrusted=true and should be treated as unconfirmed proposals, and superseded items are excluded by default. However, it doesn't disclose freshness-hint scoring criteria or how truncation interacts with item shape beyond a one-line note.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads purpose, trigger, and routing before the long args block, and every args entry earns its place given 0% schema coverage. Slightly bloated by bilingual duplication and a prose 'Result groups' paragraph that overlaps with the include_superseded arg description.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite an output schema existing, it goes further and explains the group structure, pending_untrusted flagging, and clipping markers, which is exactly the behavioral context an agent needs. Only project_folder is unaccounted for, a minor omission in an otherwise complete definition.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description carries the full semantic burden, and it does this well: scope values, filters_json keys with types and an example, freshness and superseded behavior, and max_field_chars truncation semantics are all spelled out. The one gap is project_folder, which appears in the schema but is never mentioned.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb ('Search') and resource (lessons/decisions/playbooks) with the exact item types enumerated, so an agent can distinguish it from get_relevant_knowledge and explore_knowledge by resource scope alone rather than opening schemas.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly names the trigger ('when the user asks to find knowledge about a specific topic, or recalls a procedure') and gives concrete routing rules for other cases: project path with no query -> get_relevant_knowledge, existing ID -> explore_knowledge(mode="similar").

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

update_identityA

提议修改一个身份字段,等待本地审核。 / Propose an identity change for local review.

用途:需要修改 profile、preferences、trust_boundaries、work_style 或 quality_standards 时调用。
Purpose: Call when changing profile, preferences, trust_boundaries, work_style, or quality_standards.

所有模式只创建 pending 身份提案;Owner 用 engram review 查看旧值/新值并批准或拒绝。
All modes create pending identity proposals only; the Owner compares old/new values in engram review.
批准前自动上下文继续使用已批准身份。trust_boundaries 的变更也需要审核。
Automatic context uses approved identity until approval, including trust_boundaries changes.

Args:
    field: 字段名:profile、preferences、trust_boundaries、work_style 或 quality_standards。 / Field name: profile, preferences, trust_boundaries, work_style, or quality_standards.
    updates_json: 包含要更新字段的 JSON 字符串。 / JSON string containing the fields to update.
    source_tool: 调用来源工具(如 'claude_code', 'codex', 'cursor'),用于字段级溯源。 / Source tool for field-level provenance tracking.

Field-specific keys / 字段专用键:
    profile: role, language, technical_level, description / role、language、technical_level、description。
    preferences: work_patterns (dict), communication (str), tool_preferences (dict), playbook_auto_extract (bool, default true) / work_patterns(字典)、communication(字符串)、tool_preferences(字典)、playbook_auto_extract(布尔,默认 true)。
    trust_boundaries: default_sharing, tool_access, private_fields, restricted_fields / default_sharing、tool_access、private_fields、restricted_fields。
    work_style: preferences (dict), communication (str) / preferences(字典)、communication(字符串)。
    quality_standards: acceptance_threshold (1-5), rules (list) / acceptance_threshold(1-5)、rules(列表)。
NameRequiredDescriptionDefault
fieldYes
source_toolNo
updates_jsonYes

Output Schema

NameRequiredDescription
resultYes

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the annotations (readOnlyHint=false, destructiveHint=false, idempotentHint=false), the description discloses the critical non-obvious behavior: no change is applied directly—everything becomes a pending proposal that the Owner approves or rejects. It also explains that approved identity stays in effect until approval, and that trust_boundaries changes also require review.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The key behavior (pending proposal, Owner review) is front-loaded, and the structured Args/Field-specific-keys layout scans well. The bilingual duplication roughly doubles the length without adding information, which is the only waste.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a three-parameter mutation tool with an output schema, it covers what matters: mutation semantics, approval workflow, valid field values, and the per-field JSON payload keys. Nothing an agent needs to invoke it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description carries the full burden, and it does: the valid values of 'field' are enumerated, 'source_tool' is explained as field-level provenance with examples, and 'updates_json' is documented per-field with allowed keys and types/defaults (e.g. acceptance_threshold 1-5, playbook_auto_extract default true). This adds substantial meaning beyond the bare schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The first sentence gives a specific verb ('propose') plus resource ('identity change') and the immediate effect ('for local review'). The field enumeration further pins scope, and the distinction from read-only siblings like get_identity_card is implicit but obvious because this tool is explicitly a proposal workflow.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It states exactly when to call ('Call when changing profile, preferences, trust_boundaries, work_style, or quality_standards') and clarifies that all modes produce only pending proposals requiring Owner approval in engram review. It does not name alternatives (e.g. get_identity_card to inspect current values), so it falls short of the 5 bar for explicit alternatives/exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

wrap_up_sessionA
Destructive

会话结束一键收尾:自动提取知识、操作流程并保存项目快照。 / Wrap up a session in one step: extract knowledge, detect playbooks, and save a project snapshot.

**Lifecycle: session-end** — 对话结束时调用,完成知识提取和上下文保存。
Lifecycle: session-end — call at conversation end to extract knowledge and persist session context.

用途:一次对话结束时调用,把会话摘要交给 Engram 自动提取 lessons、decisions 和 Playbook 草稿,并可选更新项目快照。
Purpose: Call at the end of a conversation to let Engram extract lessons, decisions, and playbook drafts from the summary and optionally update the project snapshot.

Playbook 自动提取:如果摘要描述了一个多步骤操作流程(3+ 步骤,含顺序标记和操作动词),会自动生成 Playbook 草稿存入 staging。返回值中会包含 playbook_draft 字段(含 confidence: high/medium),AI 工具应根据 confidence 决定是否提示用户。可通过 update_preferences(playbook_auto_extract=false) 关闭此功能。
Playbook auto-extraction: If the summary describes a multi-step operational workflow (3+ steps with sequential markers and action verbs), a Playbook draft is auto-generated into staging. The return value includes a playbook_draft field (with confidence: high/medium); AI tools should decide whether to notify the user based on confidence. Disable via update_preferences(playbook_auto_extract=false).

注意:如果只想提取知识不用保存项目,用 extract_session_insights;如果只想保存项目快照,用 save_project_snapshot。
Note: Use extract_session_insights when you only want extraction, and save_project_snapshot when you only want to save a project snapshot.

Args:
    summary: 会话摘要(自由文本,段落或要点列表均可)。 / Session summary in free text; paragraphs or bullet lists both work.
    project_folder: 项目文件夹路径(可选,不填则只提取知识不保存快照)。 / Project folder path (optional; omit it to extract knowledge without saving a snapshot).
    source_tool: 调用来源工具,如 'claude_code', 'codex'。 / Calling source tool, such as 'claude_code' or 'codex'.
    project_title: 项目名称(可选,仅在首次保存快照时需要)。 / Project title (optional; mainly needed when first saving a snapshot).
    tech_stack: 技术栈(可选,逗号分隔)。 / Tech stack (optional, comma-separated).
    known_issues: 已知问题(可选,逗号分隔)。 / Known issues (optional, comma-separated).
    run_reconcile: 兼容保留,不再导入任何内容;其它 AI 工具的记忆只能由用户在终端运行 `engram import-memories` 导入。 / Kept for compatibility and imports nothing; memories in other AI tools are imported only by the user running `engram import-memories` in a terminal.
    idempotency_key: 可选幂等键;重试同一键只返回既有 operation 状态,不重复写入。 / Optional idempotency key; retrying the same key returns the existing operation status without duplicate writes.
    reconcile_scope: 兼容保留(只回显在 maintenance.reconcile_scope)。 / Kept for compatibility (echoed in maintenance.reconcile_scope only).
NameRequiredDescriptionDefault
summaryYes
tech_stackNo
source_toolNo
known_issuesNo
project_titleNo
run_reconcileNo
project_folderNo
user_confirmedNo
idempotency_keyNo
reconcile_scopeNoproject

Output Schema

NameRequiredDescription
resultYes

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Adds substantial behavior beyond the annotations: the summary feeds automatic lessons/decisions extraction, playbook drafts land in staging only when 3+ ordered steps are detected, returns a playbook_draft with confidence the agent should act on, and can be disabled via update_preferences. It does not disclose the destructive/overwrite implications that destructiveHint=true and idempotentHint=false imply, nor what happens to an existing snapshot, which is the main remaining gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well front-loaded and organized into purpose, playbook behavior, alternatives, then args — but every section is duplicated in Chinese and English, roughly doubling length and diluting signal. The prose itself has no filler; the bilingual mirroring is the cost.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Handles a 10-param mutation tool well: lifecycle, side effects, alternatives, and per-parameter meaning are all present, and the output schema excuses it from explaining return values. The omissions are the undisclosed user_confirmed flag and the destructiveness of snapshot updates.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage the description carries the full load, and it does so for 9 of 10 params, including the high-value warnings that run_reconcile imports nothing and reconcile_scope is echo-only, plus idempotency retry semantics. It leaves user_confirmed entirely undocumented, which matters for a tool annotated destructive.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and compound resource: wrap up a session by extracting knowledge, detecting playbooks, and saving a project snapshot. It explicitly contrasts itself with extract_session_insights and save_project_snapshot, so an agent can distinguish the composite tool from its narrower siblings without opening a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit trigger ('Lifecycle: session-end — call at conversation end') plus explicit exclusions with named alternatives for the two partial-use cases (extraction only, snapshot only). Nothing about when to select this tool is left to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 4 tool updatesv4.26.0
    • Changedadd_decision1 field changed
      • addedInput schema / properties / supersedes_expected_version
        Added value: +{
        +  "anyOf": [
        +    {
        +      "type": "integer"
        +    },
        +    {
        +      "type": "null"
        +    }
        +  ],
        +  "default": null,
        +  "title": "Supersedes Expected Version"
        +}
    • Changedadd_lesson2 fields changed
      • addedInput schema / properties / supersedes
        Added value: +{
        +  "default": "",
        +  "title": "Supersedes",
        +  "type": "string"
        +}
      • addedInput schema / properties / supersedes_expected_version
        Added value: +{
        +  "anyOf": [
        +    {
        +      "type": "integer"
        +    },
        +    {
        +      "type": "null"
        +    }
        +  ],
        +  "default": null,
        +  "title": "Supersedes Expected Version"
        +}
    • Changedadd_playbook2 fields changed
      • addedInput schema / properties / supersedes
        Added value: +{
        +  "default": "",
        +  "title": "Supersedes",
        +  "type": "string"
        +}
      • addedInput schema / properties / supersedes_expected_version
        Added value: +{
        +  "anyOf": [
        +    {
        +      "type": "integer"
        +    },
        +    {
        +      "type": "null"
        +    }
        +  ],
        +  "default": null,
        +  "title": "Supersedes Expected Version"
        +}
    • Changedsearch_knowledge1 field changed
      • addedInput schema / properties / include_superseded
        Added value: +{
        +  "default": false,
        +  "title": "Include Superseded",
        +  "type": "boolean"
        +}
  2. 1 tool updatev4.20.0
    • Changedget_recall1 field changed
      • addedInput schema / properties / include_playbooks
        Added value: +{
        +  "default": false,
        +  "title": "Include Playbooks",
        +  "type": "boolean"
        +}
  3. 6 tool updatesv4.19.1
    • Changedadd_lesson1 field changed
      • addedInput schema / properties / allow_similar_new
        Added value: +{
        +  "default": false,
        +  "title": "Allow Similar New",
        +  "type": "boolean"
        +}
    • Changedadd_playbook1 field changed
      • addedInput schema / properties / allow_similar_new
        Added value: +{
        +  "default": false,
        +  "title": "Allow Similar New",
        +  "type": "boolean"
        +}
    • Addedget_knowledge_history
    • Addedget_wrap_up_session_status
    • Changedmemory_store1 field changed
      • addedInput schema / properties / allow_similar_new
        Added value: +{
        +  "default": false,
        +  "title": "Allow Similar New",
        +  "type": "boolean"
        +}
    • Changedwrap_up_session2 fields changed
      • addedInput schema / properties / idempotency_key
        Added value: +{
        +  "default": "",
        +  "title": "Idempotency Key",
        +  "type": "string"
        +}
      • addedInput schema / properties / reconcile_scope
        Added value: +{
        +  "default": "project",
        +  "title": "Reconcile Scope",
        +  "type": "string"
        +}
  4. 7 tool updatesv4.13.0
    • Changedadd_decision2 fields changed
      • addedInput schema / properties / project_folder
        Added value: +{
        +  "default": "",
        +  "title": "Project Folder",
        +  "type": "string"
        +}
      • addedInput schema / properties / user_confirmed
        Added value: +{
        +  "default": false,
        +  "title": "User Confirmed",
        +  "type": "boolean"
        +}
    • Changedadd_lesson2 fields changed
      • addedInput schema / properties / project_folder
        Added value: +{
        +  "default": "",
        +  "title": "Project Folder",
        +  "type": "string"
        +}
      • addedInput schema / properties / user_confirmed
        Added value: +{
        +  "default": false,
        +  "title": "User Confirmed",
        +  "type": "boolean"
        +}
    • Changedadd_playbook1 field changed
      • addedInput schema / properties / user_confirmed
        Added value: +{
        +  "default": false,
        +  "title": "User Confirmed",
        +  "type": "boolean"
        +}
    • Changedget_recent_context1 field changed
      • addedInput schema / properties / project_folder
        Added value: +{
        +  "default": "",
        +  "title": "Project Folder",
        +  "type": "string"
        +}
    • Changedget_resume_brief4 fields changed
      • addedInput schema / properties / agent_role
        Added value: +{
        +  "default": "orchestrator",
        +  "title": "Agent Role",
        +  "type": "string"
        +}
      • addedInput schema / properties / include_agent_context_pack
        Added value: +{
        +  "default": false,
        +  "title": "Include Agent Context Pack",
        +  "type": "boolean"
        +}
      • addedInput schema / properties / include_resume_pack
        Added value: +{
        +  "default": false,
        +  "title": "Include Resume Pack",
        +  "type": "boolean"
        +}
      • addedInput schema / properties / task_summary
        Added value: +{
        +  "default": "",
        +  "title": "Task Summary",
        +  "type": "string"
        +}
    • Changedmemory_store2 fields changed
      • addedInput schema / properties / project_folder
        Added value: +{
        +  "default": "",
        +  "title": "Project Folder",
        +  "type": "string"
        +}
      • addedInput schema / properties / user_confirmed
        Added value: +{
        +  "default": false,
        +  "title": "User Confirmed",
        +  "type": "boolean"
        +}
    • Changedwrap_up_session2 fields changed
      • addedInput schema / properties / run_reconcile
        Added value: +{
        +  "default": false,
        +  "title": "Run Reconcile",
        +  "type": "boolean"
        +}
      • addedInput schema / properties / user_confirmed
        Added value: +{
        +  "default": false,
        +  "title": "User Confirmed",
        +  "type": "boolean"
        +}
  5. 1 tool updatev4.11.0
    • Changedsearch_knowledge1 field changed
      • addedInput schema / properties / max_field_chars
        Added value: +{
        +  "default": 400,
        +  "title": "Max Field Chars",
        +  "type": "integer"
        +}
  6. 5 tool updatesv4.6.2
    • Addedget_identity_card
    • Addedget_project_context
    • Addedget_relevant_knowledge
    • Addedget_user_context
    • Addedsearch_knowledge
  7. 5 tool updatesv4.6.1
    • Removedget_identity_card
    • Removedget_project_context
    • Removedget_relevant_knowledge
    • Removedget_user_context
    • Removedsearch_knowledge

TDQS

A4/5.0

Scored across 19 tools

Disambiguation3/5

Write side is clearly split (add_lesson/add_decision/add_playbook vs memory_store routing), but the read side is crowded: get_user_context, get_resume_brief, get_recall, get_relevant_knowledge, search_knowledge, get_recent_context, and get_daily_log all return overlapping memory bundles. The descriptions do offer 'use X when Y' guidance that helps, but an agent still has to reason carefully to pick the right aggregator for a cold start.

Naming Consistency4/5

Nearly everything follows verb_noun snake_case (get_*, add_*, save_*, update_*, search_*), which is predictable. Minor deviations are 'doctor' (bare noun) and 'wrap_up_session' / 'get_wrap_up_session_status', which break the pattern slightly but stay readable.

Tool Count3/5

19 tools is in the heavy end of the acceptable band; most serve a genuine lifecycle stage (startup, retrieval, writeback, session-end, diagnostics), but several aggregator reads (resume_brief, recall, user_context, relevant_knowledge) could plausibly be consolidated. It is defensible for a full memory system yet feels broad.

Completeness4/5

Covers startup context, keyword/path retrieval, all three knowledge write types, revision history, identity read/update, project snapshot read/write, session wrap-up with status polling, daily logs, and diagnostics — a full lifecycle. The main gap is the absence of any delete/forget/archive operation over MCP, which is deferred to the CLI owner workflow.

Maintenance

ActivityNo data
ResponsivenessOutdated data

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    Provides long-term local memory for AI coding agents via MCP, enabling persistent recall of preferences and project facts across chat sessions.
    1
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Provides a local-first persistent memory layer for coding assistants, enabling cross-project user preferences, per-project durable and working memory, session archives, and reflective recommendations through MCP tools.
    43 npm
    MIT