feat(mcp): expose note external_id in list_directory and recent_activity output#1040
Open
jope-bm wants to merge 2 commits into
Open
feat(mcp): expose note external_id in list_directory and recent_activity output#1040jope-bm wants to merge 2 commits into
jope-bm wants to merge 2 commits into
Conversation
…ity output Web-app deep links are built from a note's external_id, and the hosted cloud MCP appends a link template to these tools' results that agents fill with that id on request. Neither tool rendered the id in its text output, so the template referenced a value the model could not see (basicmachines-co/basic-memory-cloud#1437 review). list_directory file rows gain a trailing "| id: <uuid>" column; recent_activity entity rows gain "[id: <uuid>]". Both values were already present in the underlying API payloads (DirectoryNode, EntitySummary) - this only surfaces them in the rendered text. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Joe P <joe@basicmemory.com>
The tools return str | list[dict] depending on output_format; the new id-assertion tests called splitlines() without the isinstance narrowing the sibling tests use, failing ty in CI. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Joe P <joe@basicmemory.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.
Dependency for basicmachines-co/basic-memory-cloud#1437 (flagged by its review): the hosted cloud MCP appends a web-app link template to
list_directoryandrecent_activityresults, telling agents to substitute each note'sexternal_id— but neither tool rendered that id in its text output, so the template referenced a value the model couldn't see.Change
list_directoryfile rows gain a trailing| id: <uuid>column.recent_activityentity rows (single-project output) gain[id: <uuid>].Both values already exist in the underlying API payloads (
DirectoryNode.external_id,EntitySummary.external_id) — this only surfaces them in the rendered text. Directory rows and observation/relation rows are unchanged (no note to link). Discovery-mode output is deliberately untouched: it aggregates multiple projects, and the cloud side will suppress its single-project link template there.Tests
Two new assertions locking the ids into the output format (every
list_directoryfile row carries a UUID id;recent_activityentity rows carry one). Full suites for both tools pass (12 + 17); lint clean.After merge, basic-memory-cloud bumps its pin and PR #1437's template footer becomes fillable end-to-end.
🤖 Generated with Claude Code