Skip to main content
Glama

search

Read-onlyIdempotent

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

NameRequiredDescriptionDefault
pageNoPage number for note results (default: 1)
tagsNoFilter note results to notes with ALL these tags (by name)
queryYesSearch query string (required)
scopeNoSearch active or archived notes (default: active)
typesNoWhich types to search. Defaults to all three: ['notes', 'containers', 'tags']
tag_idsNoFilter note results to notes with ALL these tags (by ID)
per_pageNoResults per page for notes, max 100 (default: 25)
container_idNoFilter note results to this container (ignored when search_scope is 'all')
include_bodyNoInclude the full note body on each note result (default: false)
search_scopeNoSearch scope: 'all' (default, personal + all teams), 'personal' (personal notes only), or 'team:<id>' (specific team). Applies to note results.
created_afterNoFilter notes created on or after this ISO 8601 datetime (e.g. '2026-04-01T00:00:00Z')
updated_afterNoFilter notes updated on or after this ISO 8601 datetime
created_beforeNoFilter notes created before this ISO 8601 datetime
include_nestedNoInclude notes from sub-containers when container_id is set (default: false)
updated_beforeNoFilter notes updated before this ISO 8601 datetime
include_instructionsNoInclude 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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / include_instructions
      Added value: +{
      +  "description": "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.",
      +  "type": "boolean"
      +}
  2. Changed5 schema fields changed
    • addedInput schema / properties / created_after
      Added value: +{
      +  "description": "Filter notes created on or after this ISO 8601 datetime (e.g. '2026-04-01T00:00:00Z')",
      +  "type": "string"
      +}
    • addedInput schema / properties / created_before
      Added value: +{
      +  "description": "Filter notes created before this ISO 8601 datetime",
      +  "type": "string"
      +}
    • addedInput schema / properties / include_body
      Added value: +{
      +  "description": "Include the full note body on each note result (default: false)",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / updated_after
      Added value: +{
      +  "description": "Filter notes updated on or after this ISO 8601 datetime",
      +  "type": "string"
      +}
    • addedInput schema / properties / updated_before
      Added value: +{
      +  "description": "Filter notes updated before this ISO 8601 datetime",
      +  "type": "string"
      +}
  3. Changed3 schema fields changed
    • addedInput schema / properties / page
      Added value: +{
      +  "description": "Page number for note results (default: 1)",
      +  "type": "integer"
      +}
    • addedInput schema / properties / per_page
      Added value: +{
      +  "description": "Results per page for notes, max 100 (default: 25)",
      +  "type": "integer"
      +}
    • changedInput schema / properties / query / description
      Previous value: -"Search query string"New value: +"Search query string (required)"
  4. First observed

TDQS

A4.4/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the readOnly/idempotent annotations, it discloses non-obvious behavior: the all-words matching rule, the fallback that returns partial matches with match:'partial' plus matched_terms/terms, that results are grouped by type, snippets on notes, and pagination metadata fields. It also explains the inherited_instructions chain and why include_instructions can be set false to save a notes-get round-trip.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Usage guidance is front-loaded, which is good, but the second half is a single dense run-on enumerating all sixteen parameters, duplicating much of the schema text. It could be shortened to the few parameters whose behavior is non-obvious without losing information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 16-parameter tool with no output schema, the description covers result shape (grouped by type), pagination fields, match quality, and the instruction-chain option, which is enough to call it correctly. Container/tag result fields and snippet sizing are left implicit, but nothing critical is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3; the description nevertheless adds rationale the schema does not: container_id is ignored under search_scope 'all', tags/tag_ids use AND logic, include_instructions defaults to include_body and what the chain contains. The remaining parameter text largely restates schema descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Searches notes, containers and tags in one call') and scopes it to a concrete corpus (Hjarni stored knowledge). The opening 'Use this when the user asks to find something saved in Hjarni' distinguishes it from sibling list/get tools and even from generic retrieval.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit when-to-use trigger (stored preferences, workflows, decisions, people, how-tos) and an explicit exclusion ('Do not use it for general knowledge questions their notes would not answer'). It also clarifies a follow-up boundary versus notes-get. It never names an alternative search tool, so the routing is clear but incomplete.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.