Skip to main content
Glama

memory_context_head

Generates a session's stable, cache-safe context prefix from long-term memory, relationships, emotions, and slang; bytes stay unchanged within a checkpoint so cached prompts can be reused.

Instructions

产出稳定前缀(【长期记忆】【关系】【情绪】【黑话】)。同一断点内逐字节不变,可安全复用缓存。

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "sessionId": "<sessionId>"
    },
    "name": "memory_context_head"
  }
}

Input Schema

NameRequiredDescriptionDefault
forceNo强制重建,忽略断点窗口
sessionIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It usefully discloses the key behavioral trait that output is byte-for-byte stable within a checkpoint and safe for cache reuse, but it omits whether the call is read-only or mutating, what force does behaviorally, and any side effects.

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 compact sentences with the core output description front-loaded and the caching guarantee second. No wasted wording, though it could be slightly more explicit about the checkpoint concept.

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

Completeness3/5

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

For a 2-param tool with no annotations and no output schema, the description explains the return content and caching stability but leaves the sessionId parameter and the force/checkpoint interaction unexplained, and gives no sibling routing.

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 coverage is 50%: force is documented in the schema as 'force rebuild, ignore checkpoint window', but sessionId is undocumented. The description adds no meaning about either parameter, so it does not compensate for the sessionId gap.

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?

States a specific verb (产出/produce) and resource (稳定前缀/stable prefix) and enumerates the prefix contents (long-term memory, relations, emotions, slang). It is clear what the tool returns, but it does not distinguish itself from siblings like memory_context_compose or memory_context_render, which likely also produce context.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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

The only usage hint is that the output is cache-safe to reuse within a checkpoint. There is no guidance on when to call this versus memory_context_compose/render/tail, nor when to set force versus rely on the cached prefix.

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