Skip to content

feat(mcp): add get_profile and use snake_case for public tools - #1665

Open
Dhravya wants to merge 3 commits into
mainfrom
feat/mcp-get-profile
Open

feat(mcp): add get_profile and use snake_case for public tools#1665
Dhravya wants to merge 3 commits into
mainfrom
feat/mcp-get-profile

Conversation

@Dhravya

@Dhravya Dhravya commented Sep 12, 2026

Copy link
Copy Markdown
Member

search_memory was fetching and dumping the full space profile on every recall. That burns tokens even when the model only needed matching memories.

This splits the two:

  • search_memory returns matching memories only. includeProfile is gone.
  • New get_profile returns stable and recent profile facts for the active (or named) space.
  • Tool descriptions tell the model to search first, then call get_profile if it still needs who-the-user-is / preferences / recent context.

Public model tools are snake_case so Claude/Codex server prefixes stay readable:

search_memory, get_profile, add_memory, list_documents, get_document, list_memories, list_spaces, who_am_i

Widget tools stay kebab-case (select-space, guided-save).

who_am_i stays account identity and access. The supermemory://profile resource is unchanged.

search_memory now returns matching memories only. Models that need
stable or recent profile context should call get_profile after search.
@mintlify

mintlify Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
supermemory 🟢 Ready View Preview Sep 12, 2026, 11:36 PM

💡 Tip: Enable Automations to automatically generate PRs for you.

@claude

claude Bot commented Sep 12, 2026

Copy link
Copy Markdown

Claude finished @Dhravya's task in 1m 30s —— View job


Reviewing PR

  • Fetching PR diff and existing review comments
  • Analyzing changes for bugs, security issues, and logic errors
  • Submitting review

Summary

Reviewed the PR for bugs, security issues, and logic errors. The implementation is clean — no issues found.

Key observations:

  • get_profile correctly reuses the existing getProfile() client method
  • Tool renames to snake_case are breaking but intentional per commit history
  • Tests cover happy path and edge cases
  • E2e tests, discovery tests, and docs updated consistently

Score: 10/10 — Ready to ship.


@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 12, 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 7616c85 Sep 12 2026, 11:36 PM

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 12, 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 7616c85 Commit Preview URL

Branch Preview URL
Sep 12 2026, 11:37 PM

@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: Splits profile retrieval from search_memory into a dedicated get_profile tool to reduce token usage when profile context isn't needed.

Issues found: None — this looks good to ship.

The implementation is clean:

  • get_profile correctly reuses the existing getProfile() client method that's already called without a query in resources/profile.ts and prompts/context.ts
  • The searchMemoryOutputSchema keeps profile as optional for backward-compatible output validation
  • Tests cover both the happy path and empty profile edge case
  • E2e tests, discovery tests, and docs are all updated consistently
  • Error handling follows the existing pattern with try/catch + deps.errorResult()

Score: 10/10

Claude and Codex prefix the server name, so search_memory became a
long snake pile. Public tools are now searchMemory, getProfile, and
addMemory to match listDocuments and whoAmI. Widget tools stay kebab-case.

@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: Splits profile retrieval from searchMemory into a dedicated getProfile tool to reduce token usage when profile context isn't needed.

Issues found: None — this looks good to ship.

The implementation is clean:

  • getProfile correctly reuses the existing getProfile() client method (called without a query) that's already used in resources/profile.ts and prompts/context.ts
  • Tool renames (search_memorysearchMemory, add_memoryaddMemory) are breaking changes but appear intentional per PR description to align with Cursor/Hermes naming
  • The searchMemoryOutputSchema keeps profile as optional for backward-compatible output validation
  • Tests cover both the happy path and empty profile edge case
  • E2e tests, discovery tests, and docs are all updated consistently
  • Error handling follows the existing pattern with try/catch + deps.errorResult()

Score: 10/10

Claude and Codex prefix the server name, so camelCase still reads
awkwardly. Public tools are now search_memory, get_profile, add_memory,
list_documents, get_document, list_memories, list_spaces, and who_am_i.
Widget tools stay kebab-case.
@capy-ai capy-ai Bot changed the title feat(mcp): add get_profile and stop bundling profile into search feat(mcp): add get_profile and use snake_case for public tools Sep 12, 2026

@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: Splits profile retrieval from search_memory into a dedicated get_profile tool to reduce token usage when profile context isn't needed.

Issues found: None — this looks good to ship.

The implementation is clean:

  • get_profile correctly reuses the existing getProfile() client method (called without a query) that's already used in resources/profile.ts and prompts/context.ts
  • Tool renames to snake_case (listSpaceslist_spaces, whoAmIwho_am_i, etc.) are breaking changes but appear intentional per the commit history
  • The searchMemoryOutputSchema keeps profile as optional for backward-compatible output validation
  • Tests cover both the happy path and empty profile edge case
  • E2e tests, discovery tests, and docs are all updated consistently
  • Error handling follows the existing pattern with try/catch + deps.errorResult()

Minor note: The PR description mentions camelCase (searchMemory, getProfile) but the final code uses snake_case (search_memory, get_profile). The commit history shows this was intentional (commit 37ce9187616c85), so the description is just outdated.

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