[integrations] delete_thought MCP#229
Open
txcfi-scott wants to merge 2 commits intoNateBJones-Projects:mainfrom
Open
[integrations] delete_thought MCP#229txcfi-scott wants to merge 2 commits intoNateBJones-Projects:mainfrom
txcfi-scott wants to merge 2 commits intoNateBJones-Projects:mainfrom
Conversation
Adds a standalone MCP Edge Function that exposes a single delete_thought tool. Hard-deletes a thought by UUID with a pre-flight fetch so callers see a clear not-found outcome rather than a silent success. Deploys as its own Supabase Edge Function — the core server/index.ts is untouched. README documents an optional audit hook for installs that also use the thought_audit schema. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Rewords the step 5 verification from a bullet list into a short numbered sequence (capture → delete → delete-again → table-editor check) so the Verify section has explicit top-level numbered steps. This matches the update-thought-mcp README's verification style and makes the intended end-to-end happy-path + not-found path obvious to a first-time follower of the guide. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What it does
Adds a standalone MCP Edge Function that exposes a single new tool:
delete_thought(id).The core Open Brain MCP server does not expose a delete path. As a result, thoughts accumulate forever — there is no way for an AI client to remove a test entry, a duplicate, or something captured in error without dropping into the Supabase SQL editor.
This integration deploys a second Edge Function with exactly one tool, and the core
server/index.tsis not modified.Safety
thoughts. Recovery depends on your Supabase project's backup tier (daily backups on paid tiers; Point-in-Time Recovery on higher tiers).Thought not found: <id>instead of silently succeeding.schemas/thought-auditschema is installed, the README documents how to extend this function to write an audit row (with prior content + metadata) before the delete so the operation is recoverable from the audit trail. Left out of the base integration to keep its dependencies minimal.What it requires
thoughtstable from the getting-started guide).No LLM provider is required — this tool does not read or write embeddings.
Tested
Deployed against a live Supabase Open Brain instance. Verified:
Deleted thought <id> (prior content length: N chars).and the row disappears from the table.Thought not found: <id>withisError: true.search_thoughts,list_thoughts, andcapture_thoughttools from the core server continue to work — this integration is additive and side-effect-free for existing connectors.Files touched
Only
integrations/delete-thought-mcp/— stays within the contribution scope check.Attribution
Adapted from a multi-participant capture design used across live Claude / ChatGPT / Codex sessions.