Skip to content

Commit a220f12

Browse files
authored
Merge pull request #12 from ebowman/fix-search-database-scoping
2 parents ba83025 + 0ca0a8f commit a220f12

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/tools/search.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,9 @@ const search = async (input: SearchInput): Promise<SearchResult> => {
256256
} catch (e) {
257257
return JSON.stringify({ success: false, error: "Error checking if record is a group: " + e.toString() });
258258
}
259+
} else if (pDatabaseName) {
260+
// If a specific database was provided, use its root group to scope the search
261+
searchScope = targetDatabase.root();
259262
} else {
260263
searchScope = null; // Search all databases
261264
}

0 commit comments

Comments
 (0)