Skip to main content
Glama

write_memory

Store a short fact, note, or summary as a memory record with optional tags and project context. Submit text content and get the generated ID for later retrieval.

Instructions

写入一条记忆短文本(事实/笔记/摘要),可选标签与归属项目;返回 {"id": 记录ID}。 内容为空串或纯空白时返回 {"error": "INVALID_ARGUMENT", "message": 原因}。 v2(2026-08-30):身份由环境承载——client 自动从 MCP 握手 clientInfo 识别 (TraeWork / Claude Code / Cursor),project 为项目/任务归属(连接配置声明, 可空=该客户端默认桶);记录主键由服务端生成。共享知识(add_document/add_webpage) 所有客户端可见。 English: Write a memory short text (fact/note/summary) with optional tags and project; returns {"id": record_id}. Returns {"error": "INVALID_ARGUMENT", "message": reason} when content is empty or blank. v2: identity comes from the environment — client is auto-detected from the MCP clientInfo handshake (TraeWork / Claude Code / Cursor), project is the project/task bucket (declared in the connection config; empty = this client's default bucket). The record primary key is generated server-side. Shared knowledge (add_document/add_webpage) is visible to all clients.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tagsNo
clientNo
contentYes
projectNo
Install Server

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden and does it well: it discloses the success return format ({"id": ...}), the error case for empty/blank content, how identity is derived from the MCP handshake, that the primary key is server-generated, and that shared knowledge is separately namespaced. This is far more transparent than typical tool descriptions.

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 key purpose and return format are front-loaded, and the v2 notes are useful. However, the description duplicates nearly all information in Chinese and English, roughly doubling the length. The structure is organized but not optimally 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 write tool with no output schema and no annotations, the description is quite complete: it covers return values, validation errors, identity/resolution, key generation, and boundary with shared knowledge tools. Minor missing pieces are explicit guidance on when to prefer read/update/delete siblings and any permission requirements.

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. It explains content as the memory text, tags as optional, project as the project/task bucket with empty meaning default, and client as auto-detected from MCP clientInfo. This adds real meaning beyond the bare schema, though it does not specify tag element constraints or content length limits.

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 opens with a clear verb and resource: '写入一条记忆短文本' (write a memory short text) with optional tags and project, and specifies the return shape. It also distinguishes itself from add_document/add_webpage by noting that shared knowledge is visible to all clients, which implies this tool is for non-shared memory.

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 provides context on when the tool is appropriate by explaining the client/project identity model and contrasting shared knowledge tools (add_document/add_webpage) as visible to all clients. It does not explicitly state 'when not to use' or name alternatives for read/update/delete, but the context is clear enough for an agent to choose correctly.

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

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/fish827-08/rag-kb'

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