Skip to main content
Glama

memory_add

Store shared team preferences and constraints that apply across tasks, eliminating the need to repeat instructions in every prompt.

Instructions

Add a direction-layer memory — the team's shared, cross-task standing preferences.

方向层 = 低频·高价值密度·跨任务长寿命的偏好/纠正/约束/设计意图。每个派出 的 agent 出生即注入方向层,"全中文""完成即汇报"这类偏好不再靠手抄进 prompt。

写入检验(软门槛):这条能影响多少未来任务?只影响单个任务的 → 去 task_memo_add(情景层),不要写这里。 方向层的价值在小而准,不在多—— 每作用域有效条目 ≤ 40、单条 ≤ 400 字,超限会被拒绝并提示用 memory_reconcile 先整理。超长内容改写成「触发条件 + 指向权威文件」的指针条目(如 "涉及生产/集群/DB 时遵守只读铁律,详见 ~/.claude/CLAUDE.md"),正文外置。

kind 四类(决定注入截断优先级 constraint>design>directive>preference):

  • constraint(禁令/护栏):一句话、可机检、终身有效。 如 "所有输出使用中文"、"git 提交绝不自动加 agent 署名"。

  • design(价值排序/设计意图):缺显式指令时的取舍依据。 如 "技术决策偏向质量/简洁/健壮/长期可维护,不看重开发成本"。

  • directive(方法论/工作方式):回答"怎么干"。 如 "完成即按问题→根因→解法→验证汇报,不攒批次"。

  • preference(格式偏好):可选,如 "每句一行便于 diff"。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kindNoconstraint / design / directive / preferencepreference
scopeNoglobal(全局)/ project(当前项目)/ user(用户级)global
contentYes记忆内容(≤ 400 字;超长请改指针条目)
supersedesNo可选,被本条置换失效的旧 memory id(偏好被改 = 新条 supersede 旧条,Zep 失效语义不删除)
source_refsNo可选,溯源 id 列表(回指 memo/report/meeting,蒸馏提升时用)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

No annotations are provided, so the description carries full burden. It discloses enforcement of soft limits (entry count and character length), rejection behavior with guidance to use memory_reconcile, and explains the injection priority of kind categories. This level of detail fully informs an agent of behavioral expectations.

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 description is well-organized with headings and bullet points, making it easy to scan. However, it is relatively long and includes explanatory prose that, while valuable, could be slightly condensed. It earns a 4 for clarity and structure but loses a point for verbosity.

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?

Given the tool's complexity and the presence of an output schema (not shown but noted), the description covers input behavior, constraints, alternatives, and injection priority. It fully equips an agent to use the tool correctly without missing critical details.

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 100%, each parameter has a basic description, but the tool description adds significant context. It explains the semantic meaning of kind categories (constraint, design, directive, preference) with examples, clarifies scope, and elaborates on supersedes and source_refs usage, enriching the schema beyond defaults.

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 adding a 'direction-layer memory' for shared cross-task standing preferences. It explains the concept of 方向层 and explicitly distinguishes from sibling tools like task_memo_add (情景层), making the purpose unambiguous.

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?

The description provides explicit when-to-use and when-not-to-use guidance: '只影响单个任务的 → 去 task_memo_add(情景层),不要写这里。' It also sets constraints (≤40 entries, ≤400 chars) and recommends memory_reconcile for overflows, offering clear decision criteria.

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/CronusL-1141/AI-company'

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