Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
PYTHONUTF8NoOptional Python UTF-8 mode setting included in the generated .mcp.json env.1
PROJECT_PATHYesAbsolute path to the project. Passed as --project_path to mcp_server.py so the server opens that project's memory.db and raw_data/.
PYTHONIOENCODINGNoOptional Python I/O encoding setting included in the generated .mcp.json env.utf-8
MEMORY_ROUTER_HOMENoOptional fallback project root when --project_path is not provided. Normally not needed for MCP configuration.

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

NameDescription
search_memoryA

在记忆索引中检索,返回摘要列表(不含原文)。

这是访问历史记忆的第一步。不要跳过它直接猜。

Args: keyword: 关键词,匹配标题、关键词标签和记录 ID。留空则按时间倒序返回最近记录。 type: 可选,按类型过滤。常用值:decision / code_change / issue / note / reference。 limit: 最多返回条数,1–50,默认 10。

Returns: JSON:{ok, count, results:[{id, type, title, keywords, created_at, update_version}]} 拿到 id 后,如需全文再调 read_raw_data。

read_raw_dataA

按记录 ID 读取单条记忆的完整原文。

只能对 search_memory 已经定位到的具体 ID 调用。 不要用它来遍历历史 —— 那正好是本系统要避免的行为。

Args: record_id: 记录 ID,形如 D_0001。 max_chars: 可选。>0 时只返回前 N 个字符(长文先看开头再决定)。

Returns: JSON:{ok, id, type, title, content, size_bytes, truncated, relations}

save_memoryA

把一条新的记忆写入长期库。

什么时候必须调用(Rule 里也有同样的约束):

  • 做了一个影响后续架构/方案的决策

  • 完成了一次代码修改,且改动原因从代码本身看不出来

  • 排查清楚了一个非显而易见的缺陷

  • 得到了一个以后会反复用到的结论

Args: type: 记录类型。decision / code_change / issue / note / reference。 title: 一行摘要,要能脱离原文独立读懂(例:「改用独立浏览器上下文修复跨站污染」)。 content: 完整原文。建议包含:背景、做了什么、为什么这样做、还有什么没做。 keywords: 逗号分隔的关键词,用于以后检索(例:playwright,context,假阴性)。 relates_to: 可选,关联到已有记录,格式 ID:关系类型(例:D_0002:supersedes)。

Returns: JSON:{ok, id, ...}。拿到的 id 可以用于后续 relations。

link_memoryB

建立两条记忆之间的有向关系。

Args: source_id: 起点 ID,如 D_0003。 target_id: 终点 ID,如 D_0001。 relation_type: 关系名,如 supersedes / caused_by / related_to / implements。

Returns: JSON:{ok, source_id, target_id, relation_type}

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.8/5.0

Scored across 4 tools

Disambiguation4/5

The four tools target distinct phases: search (summary list), read (full content by ID), save (new record), and link (relations between records). The only minor overlap is that save_memory can optionally create relations via relates_to, which slightly blurs with link_memory, but the descriptions clarify the intended usage.

Naming Consistency4/5

All tools use snake_case with a consistent verb_noun pattern: search_memory, read_raw_data, save_memory, link_memory. 'read_raw_data' is slightly less consistent than a hypothetical 'read_memory', but the overall convention is clear and predictable.

Tool Count5/5

With 4 tools, the server provides a focused, non-redundant set that covers the core memory operations. This is well within the ideal range, and each tool has a clear, distinct purpose.

Completeness3/5

The set covers create, read, search, and link, but lacks update and delete operations for existing memories. While the supersedes relation may mitigate some needs, there is no direct way to modify or remove a record, which is a notable gap.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues