Skip to main content
Glama

memory_list_compact

Retrieve a compact list of memories showing only ID, content preview, tags, and creation date. Use filters like text search, tags, and date range to narrow results.

Instructions

[Deprecated] List memories in compact format (id, preview, tags only).

Prefer memory_list which now defaults to compact previews with richer fields and configurable content_mode/preview_chars.

Returns minimal fields: id, content preview (first 80 chars), tags, and created_at.

Args: query: Optional text search query metadata_filters: Optional metadata filters limit: Maximum number of results to return (default: unlimited) offset: Number of results to skip (default: 0) date_from: Optional date filter (ISO format or relative like "7d", "1m", "1y") date_to: Optional date filter (ISO format or relative like "7d", "1m", "1y") tags_any: Match memories with ANY of these tags (OR logic) tags_all: Match memories with ALL of these tags (AND logic) tags_none: Exclude memories with ANY of these tags (NOT logic)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryNo
metadata_filtersNo
limitNo
offsetNo
date_fromNo
date_toNo
tags_anyNo
tags_allNo
tags_noneNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Handler function for memory_list_compact tool. Marked as [Deprecated] in favor of memory_list. Calls _list_memories then converts results to a compact format with id, preview (first 80 chars), tags, and created_at.
    async def memory_list_compact(
        query: Optional[str] = None,
        metadata_filters: Optional[Dict[str, Any]] = None,
        limit: Optional[int] = None,
        offset: Optional[int] = 0,
        date_from: Optional[str] = None,
        date_to: Optional[str] = None,
        tags_any: Optional[List[str]] = None,
        tags_all: Optional[List[str]] = None,
        tags_none: Optional[List[str]] = None,
    ) -> Dict[str, Any]:
        """[Deprecated] List memories in compact format (id, preview, tags only).
    
        Prefer ``memory_list`` which now defaults to compact previews with richer
        fields and configurable ``content_mode``/``preview_chars``.
    
        Returns minimal fields: id, content preview (first 80 chars), tags, and created_at.
    
        Args:
            query: Optional text search query
            metadata_filters: Optional metadata filters
            limit: Maximum number of results to return (default: unlimited)
            offset: Number of results to skip (default: 0)
            date_from: Optional date filter (ISO format or relative like "7d", "1m", "1y")
            date_to: Optional date filter (ISO format or relative like "7d", "1m", "1y")
            tags_any: Match memories with ANY of these tags (OR logic)
            tags_all: Match memories with ALL of these tags (AND logic)
            tags_none: Exclude memories with ANY of these tags (NOT logic)
        """
        try:
            items = _list_memories(query, metadata_filters, limit, offset, date_from, date_to, tags_any, tags_all, tags_none)
        except ValueError as exc:
            return {"error": "invalid_filters", "message": str(exc)}
    
        # Convert to compact format
        compact_items = []
        for item in items:
            content = item.get("content", "")
            preview = content[:80] + "..." if len(content) > 80 else content
            compact_items.append({
                "id": item["id"],
                "preview": preview,
                "tags": item.get("tags", []),
                "created_at": item.get("created_at"),
            })
    
        return {"count": len(compact_items), "memories": compact_items}
  • Input parameters/schema for memory_list_compact tool (defined via function signature + docstring). Accepts query, metadata_filters, limit, offset, date filters, and tag filters.
        query: Optional[str] = None,
        metadata_filters: Optional[Dict[str, Any]] = None,
        limit: Optional[int] = None,
        offset: Optional[int] = 0,
        date_from: Optional[str] = None,
        date_to: Optional[str] = None,
        tags_any: Optional[List[str]] = None,
        tags_all: Optional[List[str]] = None,
        tags_none: Optional[List[str]] = None,
    ) -> Dict[str, Any]:
        """[Deprecated] List memories in compact format (id, preview, tags only).
    
        Prefer ``memory_list`` which now defaults to compact previews with richer
        fields and configurable ``content_mode``/``preview_chars``.
    
        Returns minimal fields: id, content preview (first 80 chars), tags, and created_at.
    
        Args:
            query: Optional text search query
            metadata_filters: Optional metadata filters
            limit: Maximum number of results to return (default: unlimited)
            offset: Number of results to skip (default: 0)
            date_from: Optional date filter (ISO format or relative like "7d", "1m", "1y")
            date_to: Optional date filter (ISO format or relative like "7d", "1m", "1y")
            tags_any: Match memories with ANY of these tags (OR logic)
            tags_all: Match memories with ALL of these tags (AND logic)
            tags_none: Exclude memories with ANY of these tags (NOT logic)
        """
  • Tool registration via @mcp.tool() decorator on the FastMCP server instance. The tool name is derived from the function name memory_list_compact.
    @mcp.tool()
    async def memory_list_compact(
Behavior4/5

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

With no annotations, the description discloses the return format (minimal fields, preview length) and deprecation status, but does not explicitly state read-only behavior or other side effects. Adequate for a list 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?

The description is well-structured with a deprecation warning upfront followed by a concise Args list. Slightly verbose but every sentence adds value; could be tightened slightly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the output schema exists, the description adequately covers purpose, parameters, and deprecation. It lacks scope context (e.g., user/workspace) but is sufficient for a deprecated list tool.

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

Parameters5/5

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

The description provides detailed explanations for all 9 parameters, including data types, defaults, and examples (e.g., relative date formats for date_from/date_to, tag logic), adding significant value beyond the schema's bare titles and types.

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?

The description clearly states the tool lists memories in compact format with specific fields (id, preview, tags only) and explicitly marks it as deprecated, differentiating it from the preferred sibling memory_list.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly advises to prefer memory_list which now defaults to compact previews, providing clear guidance on when not to use this tool and recommending an alternative.

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/agentic-box/memora'

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