Skip to main content
Glama

Search brain

search_brain
Read-onlyIdempotent

Search saved Brain memories using focused queries to surface relevant facts, preferences, and linked notes for shared AI agent context.

Instructions

Search saved Brain memories. A memory may be a singular fact or a short Markdown mini-doc. Use a short, focused query with the key people, entities, preferences, or topics needed—not the full user message. Memories are retrieved with semantic + BM25 keyword search, reranked by a MiniLM cross-encoder, then expanded up to two hops along related_to graph links so connected memories surface with the seeds. Each memory includes addedBy (who first saved it) and versionCount (saved revisions). When versionCount is greater than 1, call get_memory_versions for the full history. Call get_memory whenever a result has truncated: true so you read the full note, not a clipped preview. Always pass brain from list_brains.

Input Schema

NameRequiredDescriptionDefault
kindNoOptionally restrict results to work or profile memories.
brainYesBrain id from list_brains. The personal brain is "personal".
limitNoMaximum memories to return (1-64). Score-gated, then padded to at least 10 when candidates exist.
queryYesFocused query for the saved facts needed.
entityTypeNoOptionally restrict results to one memory entity type.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.2

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive), and the description goes well beyond them: it discloses the retrieval pipeline (semantic + BM25, MiniLM cross-encoder rerank, two-hop related_to expansion), the fields attached to each result (addedBy, versionCount, truncated), and the truncation behavior. That is exactly the kind of operational context an agent needs to interpret results correctly.

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

Conciseness5/5

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

Front-loads purpose, then query guidance, then retrieval mechanics, then follow-up routing rules. Six sentences with no repetition of schema or annotation content, and each carries actionable information.

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

Completeness5/5

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

With no output schema, the description fills the gap by naming the salient result fields and the truncation signal, and it explains how to handle each follow-up case. Nothing material for a correct call or correct result interpretation 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 baseline is 3, but the description adds real meaning: it constrains the query parameter's shape (focused key terms, not the whole user message) and reinforces that brain must come from list_brains. It does not explain kind or entityType, which the schema already handles adequately.

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?

Opens with a specific verb+resource ("Search saved Brain memories") and immediately clarifies what a memory is (singular fact or short Markdown mini-doc). This clearly separates it from siblings like get_memory (single fetch by id), list_brains (enumeration), and the mutation tools.

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

Usage Guidelines5/5

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

Gives explicit query-construction advice ("short, focused query with the key people, entities, preferences, or topics... not the full user message") and hard routing rules: call get_memory_versions when versionCount > 1, call get_memory when truncated: true, and always pass brain from list_brains. Both when-to-use and which-alternative conditions are stated.

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