Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions apps/mcp/src/server/tools/get-document.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,12 @@ export function register(deps: ToolDeps) {
const effectiveTag = await deps.resolveContainerTag()
const client = deps.getClient()
const document = await client.getDocument(args.documentId)
const docTags = document.containerTags
const docTags = Array.isArray(document.memoryEntries)
? document.memoryEntries
.map((entry: any) => entry.spaceContainerTag)
.filter(Boolean)
: []
if (
Array.isArray(docTags) &&
docTags.length > 0 &&
!docTags.includes(effectiveTag)
) {
Expand Down