Skip to content

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

Merged
Dhravya merged 4 commits into
mainfrom
feat/mcp-get-profile
Sep 17, 2026
Merged

Dhravya merged 4 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 22s —— View job


Reviewing PR #1665

  • Fetch PR diff and existing review comments
  • Analyze changes for bugs, security issues, and logic errors
  • Review the new get_profile tool implementation
  • Check tool renaming consistency (snake_case)
  • Submit review findings

Overview: Splits profile retrieval from search_memory into a dedicated get_profile tool to reduce token usage when profile context isn't needed, and renames public model tools to snake_case.

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 are consistently applied across all 27 changed files with no lingering references to old camelCase names
  • The searchMemoryOutputSchema keeps profile as optional for backward-compatible output validation
  • Tests cover both the happy path and empty profile edge case ("No profile facts are available")
  • E2E tests, discovery tests, and docs are all updated consistently
  • Error handling follows the existing pattern with try/catch + deps.errorResult()

Score: 10/10


@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 b9bfa7f Sep 13 2026, 11:45 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 b9bfa7f Commit Preview URL

Branch Preview URL
Sep 13 2026, 11:45 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

e2e already covers search_memory and get_profile.
@Dhravya
Dhravya merged commit c927c98 into main Sep 17, 2026
9 checks passed
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