Search notes
bm_searchSearch a Basic Memory project by relevance across notes, observations, and relations using text, semantic, title, or permalink queries, with filters for narrowing results.
Instructions
Search a Basic Memory project, ranked by relevance. query supports quoted phrases, AND/OR/NOT and tag:name. mode picks hybrid (the default when semantic search is available), text, semantic, title or permalink (globs with *). Narrow with filters (frontmatter), note_types, items (notes, observations, relations) and since. lines returns the matching lines of each hit with that many lines of context, like grep. path limits the search to a folder; identifier searches one note. Read full notes with bm_read.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Search mode. | |
| page | No | Page number. | |
| path | No | Search only this folder and its subfolders. | |
| items | No | What to return: notes, observations, relations, or a mix. Default: notes. | |
| lines | No | Return each hit's matching lines with this many lines of context (0-10), instead of a match excerpt. | |
| query | No | What to search for. Omit to search by filters alone. | |
| since | No | How far back to look: '7d', '24h', '2 days ago', 'last week', or a date. Windows shorter than one day are widened to one day. | |
| compact | No | Omit note bodies and excerpts; keep identifiers and scores. | |
| filters | No | Frontmatter filters as {field: condition}. Nested fields use dot notation ("schema.confidence"). A condition is a value for equality ({"status": "draft"}), null for absent-or-null ({"owner": null}), a list for contains-all ({"tags": ["a", "b"]}), or an operator object with $gt, $gte, $lt, $lte, $in, $between, $contains or $exists, e.g. {"priority": {"$in": ["high"]}}. Several operators on one field AND together. | |
| project | No | Project name, 'workspace/project', or project external id. Omit to use the default project. | |
| projects | No | Search these projects together. | |
| valid_at | No | Specialist: only facts whose authored valid time contains this date. | |
| page_size | No | Results per page (1-100). | |
| time_kind | No | Specialist: effective, valid, occurred, due or mentioned. | |
| categories | No | Observation categories to match exactly, e.g. ['decision']. | |
| identifier | No | Search only this note; returns its matching lines. | |
| note_types | No | Frontmatter `type` values, e.g. ['person', 'meeting']. | |
| max_matches | No | Matching lines shown per note with `lines`. | |
| all_projects | No | Search every project you can access. | |
| output_format | No | text | |
| min_similarity | No | Override the semantic similarity floor (0-1). | |
| valid_overlaps | No | Specialist: only facts whose valid range overlaps '[start,end)'. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |