Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat: add delete tools for facts, preferences, entities (extended profile)#98

Open
AhmedHamadto wants to merge 1 commit into
neo4j-labs:mainfrom
AhmedHamadto:feat/delete-tools
Open

feat: add delete tools for facts, preferences, entities (extended profile)#98
AhmedHamadto wants to merge 1 commit into
neo4j-labs:mainfrom
AhmedHamadto:feat/delete-tools

Conversation

@AhmedHamadto
Copy link
Copy Markdown
Contributor

Summary

  • Adds memory_delete_fact, memory_delete_preference, and memory_delete_entity MCP tools to the extended profile.
  • Uses DETACH DELETE to clean up all relationships when deleting a node.
  • Tools are annotated with destructiveHint=True and idempotentHint=True.
  • Core profile is unchanged.

Motivation

The memory system is append-only — wrong facts, stale preferences, and outdated entities cannot be corrected through the MCP interface. The only workaround is raw Cypher via graph_query, which is read-only for safety. These tools provide a safe, structured way to clean up graph data.

Files changed

  • queries.pyDELETE_FACT, DELETE_PREFERENCE, DELETE_ENTITY
  • long_term.pydelete_fact(), delete_preference(), delete_entity()
  • integration.py — delegation methods
  • _tools.py — 3 tools in _register_extended_tools()

…file)

Add memory_delete_fact, memory_delete_preference, and memory_delete_entity
tools to the extended MCP profile. Uses DETACH DELETE to clean up all
relationships. Idempotent — deleting a non-existent ID returns without error.

Addresses the append-only limitation where wrong facts, stale preferences,
and outdated entities could not be corrected through the MCP interface.
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 9, 2026

Someone is attempting to deploy a commit to the lyonwj's projects Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 23, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agent-memory Ready Ready Preview, Comment Apr 23, 2026 0:47am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant