Search notes
bm_searchSearch Basic Memory projects by relevance across text, semantic, title, or permalink modes; narrow results with frontmatter filters, date scopes, note types, and line context to find exact notes.
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. Scope every search with project (one project), projects (a list), or all_projects=true. Read full notes with bm_read.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "bm_search"
}
}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 external id. Required for one-project operations; search may instead use `projects` or `all_projects=true`. Project discovery needs no scope. | |
| 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 |