Skip to main content
Glama

memory_ingest

Ingests inbound messages into raw and short-term memory layers in one transaction, using msgId as an idempotency key to prevent duplicate records.

Instructions

入站消息落地:原文进原始层、正文进短期记忆,两写一个事务。幂等键是 msgId,重复投递不会产生第二条。

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>",
      "msgId": "<msgId>",
      "text": "<text>"
    },
    "name": "memory_ingest"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindNo
textYes
msgIdYes平台消息 id,幂等键与锚点都由它派生
senderIdNo
createdAtNo
sessionIdYesplatform:scope:id,例如 qq:group:123456
importanceNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden, and it does disclose important behavior: two writes happen in a single transaction, and msgId serves as the idempotency key, so a repeated delivery will not create a second entry. It still does not state error behavior, whether an existing entry is updated or skipped, or what the caller gets back.

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 dense sentences, and both earn their place: the first states the write destinations and atomicity, and the second states the idempotency key and its consequence. The most decision-relevant fact, the two-write transaction, comes first.

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?

For a 7-parameter mutation tool with no annotations and no output schema, this description is too thin. It covers the write semantics and idempotency well, but it never explains most parameters, the meaning of the kind enum, or the default handling for importance and createdAt.

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 29% across 7 parameters, so the description must compensate. It explains msgId's idempotency role, but msgId is already documented in the schema, and the description leaves sessionId, text, kind, importance, senderId, and createdAt unexplained.

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 uses a specific verb (landing/ingest) on a specific resource (inbound message) and names the exact destinations: original text to the raw layer, body to short-term memory. This implicitly distinguishes it from the single-write siblings memory_append and raw_archive, though it never names them.

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?

The description implies usage for inbound message delivery and hints that duplicates need no special handling, but it gives no explicit when-to-use or when-not-to-use guidance against the sibling write tools such as memory_append or raw_archive.

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