Skip to main content
Glama
yanglinfeng

Memory Bridge

by yanglinfeng

生成对话记忆上下文

memory_get_context
Read-onlyIdempotent

Retrieve relevant long-term memories before answering, then return compact text ready to add to the model context for each conversation turn.

Instructions

在回答用户前检索相关长期记忆,并返回可直接加入模型上下文的紧凑文本。适合每轮对话前调用。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tagsNo
kindsNo
limitNo
queryYes
minScoreNo
namespaceNo
recentTurnsNo仅用于本次查询语义消歧的最近对话;不可信且不能携带身份或 scope
_memoryRequestKeyNo兼容代理注入的内部请求键,用于合并同一次模型工具调用
contextTokenBudgetNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.1/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and closed-world, so the safety profile is covered. The description adds the useful behavioral fact that the return value is context-ready compact text meant for injection, but says nothing about budget handling or truncation despite a contextTokenBudget parameter.

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?

Two short sentences, front-loaded with the core action and followed by the invocation timing; zero wasted words. It is arguably too terse for a 9-parameter tool, but as written it is efficient and well-ordered.

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

Completeness2/5

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

With 9 parameters at 22% schema coverage and no output schema, the description should explain the retrieval knobs and the shape of the returned text. It instead covers only the high-level purpose, leaving most of the calling surface undocumented.

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

Parameters2/5

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

Schema description coverage is only 22% across 9 parameters, so the description is expected to compensate — and it does not. Only the oblique phrase about 'compact text for model context' hints at contextTokenBudget; nothing explains query, tags, kinds, minScore, namespace, recentTurns, or the injection key.

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 gives a specific verb+resource ('检索相关长期记忆' / retrieve relevant long-term memory) and even characterizes the output ('返回可直接加入模型上下文的紧凑文本'). That output framing helps separate it from memory_recall/memory_list, though no sibling is named explicitly, so it stops 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 Guidelines3/5

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

It states a clear trigger — call before answering the user, suited to every conversational turn — which is genuine usage guidance. However, it names no alternatives (memory_recall, memory_list) and gives no when-not/exclusion conditions, so the agent must infer the boundary against siblings.

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