You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: merge search_by_metadata into search_notes with optional query
Make `query` optional in `search_notes` so it becomes the single search tool.
Remove `search_by_metadata` entirely — it was unreleased and redundant since
`search_notes` already supports `metadata_filters`, `tags`, and `status`.
- 🔧 `query` param is now `Optional[str] = None`
- 🛡️ Added None guards for project detection and URL resolution
- ✅ Added `no_criteria()` validation with helpful error message
- 🗑️ Deleted `search_by_metadata` tool, imports, tests, and contract entry
- 📝 Updated docs, README, and v0.19.0 release notes
Closes#605
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: phernandez <paul@basicmachines.co>
Copy file name to clipboardExpand all lines: docs/metadata-search.md
+13-47Lines changed: 13 additions & 47 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,14 +2,9 @@
2
2
3
3
Basic Memory automatically indexes custom frontmatter fields so you can query them with structured filters. Any YAML key in a note's frontmatter beyond the standard set (`title`, `type`, `tags`, `permalink`, `schema`) is stored as `entity_metadata` and becomes searchable.
4
4
5
-
## Two Ways to Query
5
+
## Querying with `search_notes`
6
6
7
-
| Tool | Use When |
8
-
|------|----------|
9
-
|`search_by_metadata`| You only need metadata filters (no text query) |
10
-
|`search_notes`| You want to combine a text query with metadata filters |
11
-
12
-
Both tools accept the same filter syntax.
7
+
`search_notes` is the single search tool for all queries — text, metadata filters, or both. The `query` parameter is optional, so you can use metadata filters alone without passing an empty string.
13
8
14
9
## Filter Syntax
15
10
@@ -88,45 +83,16 @@ This queries the `version` key inside a `schema` object in frontmatter.
88
83
-`$in` and array-contains require non-empty lists.
89
84
-`$between` requires exactly two values `[min, max]`.
90
85
91
-
## MCP Tools
92
-
93
-
### `search_by_metadata` — metadata-only search
94
-
95
-
Searches entities by structured frontmatter metadata without a text query. Results are scoped to entity-level items.
### `search_notes` with metadata — combined text + metadata
86
+
## MCP Tool — `search_notes`
121
87
122
-
The `search_notes` tool accepts `metadata_filters`, `tags`, and `status` parameters alongside the text `query`. This lets you combine full-text search with structured filtering.
88
+
`search_notes`is the single search tool for text queries, metadata filters, or both. The `query` parameter is optional.
123
89
124
90
**Relevant parameters:**
125
91
126
92
| Parameter | Type | Description |
127
93
|-----------|------|-------------|
128
-
|`query`| string | Text search query (can be empty when using only filters)|
0 commit comments