Skip to main content
Glama

memory_context_compose

Compose a complete memory injection block from a reusable head, a newly assembled tail, and the combined text so a bridge can retrieve the full context in one call.

Instructions

一次拿到完整注入块:head(可复用)+ tail(本轮新拼)+ 拼接结果 text。桥接通常只用这一个。

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_compose"
  }
}

Input Schema

NameRequiredDescriptionDefault
bodyNo本轮用户消息,拼在尾部末尾
forceNo
recallNo外部召回片段(可为空)
sessionIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations and no output schema, the description carries the full disclosure burden, and it does deliver the return shape (head, tail, text) which is genuinely useful. However, it says nothing about whether composing persists state, whether the tail is written back to memory, idempotency, or what happens when sessionId is unknown. Useful but incomplete for a mutation-capable tool with zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two compact clauses, front-loaded with the return composition, then the routing hint. No filler or redundancy.

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 4-parameter tool with no annotations and no output schema, the description covers the output composition but omits side effects, the meaning of force, and any failure/empty-recall behavior. Adequate to call the tool in the happy path, but not complete.

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 50%: body and recall are documented in the schema, while sessionId and force are not. The description mentions no parameter by name and only hints at "this round" for the tail content, leaving force (the one flag that likely changes behavior) completely unexplained in both schema and description. It adds little meaning beyond the schema.

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 concrete verb+resource: compose a complete injection block made of head (reusable) + tail (newly assembled this round) + the concatenated text. That implicitly distinguishes it from the head-only and tail-only siblings without naming them, so an agent can tell what it returns. It stops short of a fully disambiguating statement against every sibling, but the purpose is unambiguous.

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?

"桥接通常只用这一个" (for bridging, usually just use this one) gives a clear positive usage context and steers the agent away from calling head and tail separately. There are no explicit when-not conditions or named alternatives, so it falls short of a 5.

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