Skip to main content
Glama

memory_store

Write lessons, decisions, or playbooks to persistent memory using a unified interface. Routes knowledge by type without needing to know the internal taxonomy.

Instructions

统一知识写入入口 — 根据 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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kindYes
items_jsonNo
source_toolNo
content_jsonNo
project_folderNo
user_confirmedNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

No annotations, so description carries full burden. It discloses lifecycle (writeback), routing, batch vs single mode, and constraints (playbook not in batch). Does not detail overwrite behavior but implies additive persistence.

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-structured with Args list, bilingual but not overly verbose. Each sentence adds value. Could omit duplicates between languages but still acceptable.

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 tool complexity (router, batch/single, varying formats), description covers routing, usage modes, and param details for most params. Output schema exists so return values not needed. Missing param explanations for two fields.

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 has 0% description coverage. Description explains kind, content_json format per type, source_tool, and items_json for batch, but omits project_folder and user_confirmed parameters.

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 clearly defines the tool as a unified write endpoint that routes to specialized tools based on 'kind', distinguishing it from siblings like add_lesson, add_decision, add_playbook.

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 states when to call (lifecycle writeback) and provides guidance on alternatives (specialized tools) and advantages (callers don't need Engram taxonomy).

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Patdolitse/piia-engram'

If you have feedback or need assistance with the MCP directory API, please join our Discord server