Skip to main content
Glama

Extract Memories

memory-extract

Extract structured memories from conversation messages using an LLM or heuristic fallback, with an option to return only procedural rules.

Instructions

Extract memories from a conversation. Uses LLM or heuristic fallback. Set rulesOnly=true to extract procedural rules only.

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": {
      "messages": "<messages>"
    },
    "name": "memory-extract"
  }
}

Input Schema

NameRequiredDescriptionDefault
messagesYesConversation messages, oldest → newest.
rulesOnlyNoIf true, only extract procedural rules.
conversationIdNoSession/conversation identifier.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.6.0

TDQS

B3.3/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, and it does disclose something useful beyond structure: extraction uses an LLM with a heuristic fallback, implying variable quality/nondeterminism. It does not state whether extracted memories are persisted (a write side effect), whether duplicates are merged, or what permissions are needed, which are the key behavioral facts for a memory-extraction tool.

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?

Three short sentences with the core action front-loaded and no filler. The middle sentence on LLM/heuristic is informative rather than wasteful, though the rulesOnly sentence partially duplicates the schema.

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?

There is no output schema and no annotations, so the description is the only place an agent could learn what extraction returns, whether results are stored, and how rules-only mode differs in output shape. None of that is covered, leaving a meaningful gap for a tool whose side effects (persisting extracted memories) are central to calling it correctly.

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

Parameters3/5

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

Schema description coverage is 100%, so all three parameters are already documented, including ordering for messages and the role enum values. The description only restates the rulesOnly semantics already present in the schema and says nothing about conversationId, so baseline 3 is appropriate.

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 clear verb+resource: extract memories from a conversation, and adds a mode qualifier (procedural rules only). It is understandable on its own, but it does not differentiate this tool from plausible siblings like memory-ingest or memory-rules, so an agent must infer the boundary.

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 gives one concrete usage cue ('Set rulesOnly=true to extract procedural rules only'), which is helpful. However, there is no guidance on when to choose this tool over memory-ingest, memory-rules, or memory-scratch-promote, and no stated preconditions for the messages input.

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