Skip to content

feat(tools): mass forget + bucket tools, and refresh the supermemory skill - #1453

Open
sohamd22 wants to merge 1 commit into
mainfrom
08-10-feat_tools_mass_forget_bucket_tools_and_refresh_the_supermemory_skill
Open

feat(tools): mass forget + bucket tools, and refresh the supermemory skill#1453
sohamd22 wants to merge 1 commit into
mainfrom
08-10-feat_tools_mass_forget_bucket_tools_and_refresh_the_supermemory_skill

Conversation

@sohamd22

@sohamd22 sohamd22 commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

@supermemory/tools had no tool for POST /v4/memories/forget-matching or bucketed profile reads, so agents could forget one memory at a time and read the whole profile or nothing. Adds both — memoryForgetMatchingTool / createMemoryForgetMatchingFunction and getProfileBucketsTool / createGetProfileBucketsFunction — mirrored across the AI SDK and OpenAI surfaces, over fetch: the generated SDK has no forget-matching method and profile()'s params can't express include/buckets. memoryForgetMatching defaults dryRun to true even though the API defaults to false: a model shouldn't be able to bulk-delete in one turn. The intended loop is preview → show the user the returned memories → call again with those memoryIds and dryRun: false.

The Claude skill had drifted further. profile() was called with query instead of q, the profile response shape was invented (context.profile, context.memories), search responses were treated as flat arrays instead of { results, total, timing }, Python used dict access on Pydantic models, and filters used a bare { metadata: {...} } form the API rejects. The reference documented 3 endpoints and never mentioned forgetting, versioning, conversations, container tags, or buckets at all. Rewrote it against the actual route schemas, with a table marking which endpoints have SDK methods and which need a plain HTTP call, and added a shared helper pattern for the HTTP-only paths. Quickstart and use-case examples were updated to match the real response shapes throughout.

…skill

@supermemory/tools had no tool for POST /v4/memories/forget-matching or
bucketed profile reads, so agents could forget one memory at a time and
read the whole profile or nothing. Adds both, mirrored across the AI SDK
and OpenAI surfaces, over fetch — the generated SDK has no
forget-matching method and profile()'s params can't express
include/buckets. memoryForgetMatching defaults dryRun to true even
though the API defaults to false: a model shouldn't be able to
bulk-delete in one turn.

The Claude skill had drifted further. profile() was called with
instead of , the profile response shape was invented, search
responses were treated as arrays, Python used dict access on Pydantic
models, and filters used a form the API rejects. The reference
documented 3 endpoints and never mentioned forgetting at all. Rewrote it
against the route schemas in mono, with a table marking which endpoints
have SDK methods and which need HTTP.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 10, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
supermemory-app dfddc2a Commit Preview URL Aug 10 2026, 01:00 PM

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 10, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
supermemory-mcp dfddc2a Aug 10 2026, 12:59 PM

Copy link
Copy Markdown
Contributor Author

How to use the Graphite Merge Queue

Add the label Main to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@sohamd22
sohamd22 marked this pull request as ready for review August 10, 2026 12:59
@claude

claude Bot commented Aug 10, 2026

Copy link
Copy Markdown

Claude finished @sohamd22's task in 2m 7s —— View job


Review complete for PR #1453

  • Gather PR diff and context
  • Review new tool implementations (memoryForgetMatchingTool, getProfileBucketsTool)
  • Check for bugs, security issues, and logic errors
  • Review skill documentation changes
  • Submit review

Overview: Adds memoryForgetMatching and getProfileBuckets tools to @supermemory/tools, and fixes significant documentation drift in the supermemory skill.

Issues found: None — this looks good to ship.

The new tools are well-implemented with proper safety defaults (dryRun: true for the bulk-delete operation), input validation, and good test coverage. The skill documentation fixes address real problems including incorrect param names (queryq), invented response shapes, Python dict vs attribute access, and invalid filter syntax.

Score: 10/10

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview: Adds memoryForgetMatching and getProfileBuckets tools to @supermemory/tools, and fixes significant documentation drift in the supermemory skill (incorrect param names, invented response shapes, invalid filter syntax).

Issues found: None — this looks good to ship.

Details:

The new tools are well-implemented:

  • memoryForgetMatchingTool defaults dryRun: true which is the right safety default for a bulk-delete operation
  • Input validation requires at least one of query or memoryIds before making the request
  • Both AI SDK and OpenAI surfaces are covered with consistent implementations
  • Good test coverage including the dry-run default behavior and validation

The skill documentation fixes address real problems:

  • queryq for the profile endpoint
  • Invented context.profile / context.memories → actual { profile: { static, dynamic }, searchResults } shape
  • Python dict access → Pydantic model attribute access
  • Bare { metadata: {...} } filters → required AND/OR wrapper
  • Added coverage for endpoints that were never documented (forget-matching, buckets, conversations, versioning)

Score: 10/10

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