Skip to main content
Glama

clear_memories

Permanently delete all stored memories from the MemoVault personal memory system. Use this tool to remove all saved context and preferences.

Instructions

Clear all stored memories.

Warning: This permanently deletes all memories!

Returns: Confirmation message

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The main MCP tool handler for clear_memories. This function is decorated with @self.mcp.tool() to register it as an MCP tool. It counts the memories using self.vault.count(), then deletes all memories using self.vault.delete_all(), and returns a confirmation message with the count of deleted memories.
    @self.mcp.tool()
    async def clear_memories() -> str:
        """Clear all stored memories.
    
        Warning: This permanently deletes all memories!
    
        Returns:
            Confirmation message
        """
        try:
            count = self.vault.count()
            self.vault.delete_all()
            return f"All {count} memories have been deleted"
        except Exception as e:
            logger.error(f"Error clearing memories: {e}")
            return f"Error clearing memories: {str(e)}"
  • Tool registration: The @self.mcp.tool() decorator registers the clear_memories function as an MCP tool, making it available to MCP clients.
    @self.mcp.tool()
  • Helper method in MemoVault class that implements delete_all(). This method calls the underlying MemCube's delete_all() method to perform the actual deletion of all memories.
    def delete_all(self) -> None:
        """Delete all memories."""
        self._cube.delete_all()
  • Helper method in MemCube class that implements delete_all(). This method delegates to the underlying memory backend implementation (_memory.delete_all()) to perform the actual memory deletion.
    def delete_all(self) -> None:
        """Delete all memories."""
        self._memory.delete_all()
Behavior5/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It clearly states the destructive nature ('permanently deletes all memories'), which is critical for a mutation tool, and specifies the return value ('Confirmation message'). This covers safety, outcome, and response format adequately.

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?

The description is highly concise and well-structured: the first sentence states the purpose, the warning highlights critical behavior, and the return information is clearly separated. Every sentence adds essential value with zero waste, making it easy to parse and understand quickly.

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

Completeness5/5

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

Given the tool's simplicity (0 parameters, no annotations, but with an output schema), the description is complete. It explains the destructive action, warns of permanence, and notes the return type, which complements the output schema. No additional context is needed for this straightforward operation.

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

Parameters4/5

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

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description appropriately omits parameter details, maintaining focus on the tool's action and effects. A baseline of 4 is applied as it efficiently handles the lack of parameters without unnecessary elaboration.

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 specific action ('Clear') and resource ('all stored memories'), distinguishing it from sibling tools like delete_memory (which targets specific memories) and list_memories (which only reads). The verb+resource combination is precise and unambiguous.

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?

The description implicitly provides usage guidance through the warning about permanent deletion, suggesting this tool should be used cautiously and only when complete memory clearance is needed. However, it does not explicitly compare to alternatives like delete_memory for partial removal or mention specific scenarios when this tool is preferred over others.

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/Blvckjs96/MemoVault'

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