search
Use this when the user asks to find something saved in Hjarni, or when the answer depends on their stored knowledge or memories: preferences, workflows, routines, projects, decisions, meeting notes, research, people, how-tos, code snippets, references or journal entries. Do not use it for general knowledge questions their notes would not answer. Searches notes, containers and tags in one call. Returns results grouped by type with pagination metadata (total_count, page, per_page, total_pages). Required: query (string). Optional: types (array, default all three), search_scope ('all'|'personal'|'team:'), scope ('active'|'archived'), container_id (integer, ignored when search_scope is 'all'), tags (array, AND logic), tag_ids (array, AND logic), include_nested (boolean), include_body (boolean, default false — when true each note includes its full body), include_instructions (boolean, defaults to include_body — when true each note carries inherited_instructions, the same user-written instruction chain notes-get returns, so a full-body search hit arrives with the rules that govern it and needs no follow-up notes-get; pass false to omit the chain from a body-only page), created_after / created_before / updated_after / updated_before (ISO 8601 datetime filters on note timestamps), page (integer, default 1), per_page (integer, default 25, max 100). Note results include a snippet of the matching portion. A note matches when it contains every word of the query; when none does, the notes containing most of the words come back instead, with match: 'partial' on the response and matched_terms / terms on each note, so tell the user they are partial matches.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"query": "<query>"
},
"name": "search"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Page number for note results (default: 1) | |
| tags | No | Filter note results to notes with ALL these tags (by name) | |
| query | Yes | Search query string (required) | |
| scope | No | Search active or archived notes (default: active) | |
| types | No | Which types to search. Defaults to all three: ['notes', 'containers', 'tags'] | |
| tag_ids | No | Filter note results to notes with ALL these tags (by ID) | |
| per_page | No | Results per page for notes, max 100 (default: 25) | |
| container_id | No | Filter note results to this container (ignored when search_scope is 'all') | |
| include_body | No | Include the full note body on each note result (default: false) | |
| search_scope | No | Search scope: 'all' (default, personal + all teams), 'personal' (personal notes only), or 'team:<id>' (specific team). Applies to note results. | |
| created_after | No | Filter notes created on or after this ISO 8601 datetime (e.g. '2026-04-01T00:00:00Z') | |
| updated_after | No | Filter notes updated on or after this ISO 8601 datetime | |
| created_before | No | Filter notes created before this ISO 8601 datetime | |
| include_nested | No | Include notes from sub-containers when container_id is set (default: false) | |
| updated_before | No | Filter notes updated before this ISO 8601 datetime | |
| include_instructions | No | Include inherited_instructions (brain, space root, ancestor and container instruction layers, outermost first) on each note result — the same chain notes-get returns. Defaults to the value of include_body, so full-body results carry their governing instructions unless you pass false. |