Skip to main content
Glama

delete_memento

Remove a stored memory and all its associated connections from the MCP Memento server's knowledge base.

Instructions

Delete a memento and all its relationships

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
memory_idYesID of the memory to delete

Implementation Reference

  • The handler function that executes the deletion of a memento in the database.
    async def handle_delete_memento(
        memory_db: SQLiteMemoryDatabase, arguments: Dict[str, Any]
    ) -> CallToolResult:
        """Handle delete_memory tool call.
    
        Args:
            memory_db: Database instance for memory operations
            arguments: Tool arguments from MCP call containing:
                - memory_id: ID of memory to delete
    
        Returns:
            CallToolResult with success message or error
        """
        memory_id = arguments["memory_id"]
    
        success = await memory_db.delete_memory(memory_id)
    
        if success:
            return CallToolResult(
                content=[
                    TextContent(
                        type="text", text=f"Memory deleted successfully: {memory_id}"
                    )
                ]
            )
        else:
            return CallToolResult(
                content=[
                    TextContent(
                        type="text",
                        text=f"Failed to delete memory (may not exist): {memory_id}",
                    )
                ],
                isError=True,
            )
  • The MCP tool definition for delete_memento, including its description and input schema.
    Tool(
        name="delete_memento",
        description="Delete a memento and all its relationships",
        inputSchema={
            "type": "object",
            "properties": {
                "memory_id": {
                    "type": "string",
                    "description": "ID of the memory to delete",
                },
            },
            "required": ["memory_id"],
  • The mapping of the delete_memento tool name to its handler function in the registry.
    "delete_memento": handle_delete_memento,

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/annibale-x/mcp-memento'

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