Skip to main content
Glama

list_memories

Retrieve recent stored memories from a namespace to enable AI agents to access past interactions and data across sessions.

Instructions

List recent memories in a namespace.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
namespaceNoNamespace to list (default: "default")
limitNoMax results (default 20)

Implementation Reference

  • The handler logic for the 'list_memories' tool, which constructs a query string for the /memories API and formats the response.
    case 'list_memories': {
      const qs = new URLSearchParams();
      if (args.namespace) qs.set('namespace', args.namespace);
      if (args.limit) qs.set('limit', args.limit);
      result = await call('GET', `/memories?${qs}`);
      if (!result.memories?.length) {
        return { content: [{ type: 'text', text: 'No memories found.' }] };
      }
      const text = result.memories.map((r, i) =>
        `[${i + 1}] (id: ${r.id}, ${r.created_at})\n${r.content}`
      ).join('\n\n');
      return { content: [{ type: 'text', text }] };
    }
  • The tool definition for 'list_memories', including its description and input schema.
    {
      name: 'list_memories',
      description: 'List recent memories in a namespace.',
      inputSchema: {
        type: 'object',
        properties: {
          namespace: { type: 'string', description: 'Namespace to list (default: "default")' },
          limit: { type: 'number', description: 'Max results (default 20)' },
        },
      },
    },
Behavior2/5

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

No annotations are provided, so the description carries full burden. It mentions 'recent' but doesn't define the timeframe or sort order. It fails to disclose what gets returned (memory IDs? full content? timestamps?) or namespace isolation behavior.

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

Conciseness3/5

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

Single sentence of six words is efficient and front-loaded, but arguably too terse given the lack of annotations and output schema. No wasted words, but insufficient information density for the context.

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?

With no output schema and no annotations, the description should explain return values and behavioral constraints. It fails to do so, leaving critical gaps in the contract despite the simple 2-parameter schema.

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 coverage is 100%, documenting both 'namespace' and 'limit' parameters. The description mentions 'namespace' aligning with the parameter, but adds no semantic details beyond the schema (e.g., what constitutes a valid namespace). Baseline 3 appropriate given schema completeness.

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 (List) and resource (memories) with scoping (in a namespace). The word 'recent' helps implicitly distinguish from the sibling 'recall' tool, though it doesn't explicitly name alternatives.

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?

Provides no guidance on when to use this versus siblings like 'recall' (likely for specific retrieval) or 'remember'. No prerequisites or exclusion criteria mentioned.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/andrewpetecoleman-cloud/agentmemo-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server