Skip to main content
Glama

Extract & Store Memories

memory_extract

Extracts memory-worthy facts from conversation text using an LLM and stores each one automatically, so you can capture user details without manual memory addition.

Instructions

Runs automatic fact extraction (PRD section 9) over a chunk of conversation text using an LLM, then stores each memory-worthy fact found. Requires ANTHROPIC_API_KEY to be configured on the server; otherwise returns an error explaining to use memory_add manually.

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": {
      "text": "<text>"
    },
    "name": "memory_extract"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesRaw conversation text to extract memories from
user_idNo
namespaceNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.7/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 does disclose the LLM dependency and the ANTHROPIC_API_KEY precondition plus the resulting error behavior, which is valuable. It leaves out mutation traits such as whether facts are deduplicated, whether they are attributed to user_id/namespace, and what is returned on success.

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 tightly written sentences, front-loading the action and then the prerequisite. The 'PRD section 9' citation is a minor non-functional detail but costs little.

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?

It covers the prerequisite and failure mode, but with no output schema and no annotations, an agent still cannot tell what comes back (extracted facts, counts), whether repeated runs duplicate memories, or how the two scoping parameters affect storage.

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 only 33%; only 'text' is documented there. The description never explains what user_id or namespace do (scoping/ownership of the resulting memories), so the two undocumented parameters remain opaque in both schema and prose.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (automatic fact extraction), the resource (a chunk of conversation text), and the mechanism (LLM), then says the extracted facts are stored. The reference to falling back to memory_add makes the boundary with the manual-add sibling explicit.

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?

Conveys the selection condition clearly: use this for bulk conversation text where facts should be found automatically, and use memory_add manually when the API key is absent. It does not state explicit exclusions (e.g., when to prefer memory_add even with a key, or single-fact cases).

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