Skip to main content
Glama

brain_search

Search your personal knowledge base using hybrid vector and keyword retrieval. Returns ranked excerpts with file paths and breadcrumbs for quoting, verifying, or exploring what exists on a topic.

Instructions

Search the personal knowledge base with hybrid retrieval (vector similarity fused with BM25 keyword matching). Behavior: returns up to k ranked excerpts, each with file path, heading breadcrumb and similarity score; no LLM call is made. Usage: reach for this when you need source material to quote, verify a claim, or see what exists on a topic; use brain_ask when you want a synthesized answer instead. Results are limited to the indexed sources — run brain_ingest first if recent files are missing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kNonumber of hits to return, 1-20 (default 5)
inNoonly results whose source path contains this substring, e.g. 'docs/en' or 'projects'
tagNoonly results whose frontmatter tags contain this, e.g. 'rag' or 'memory'
queryYeswhat to look for, in any language

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed4 schema fields changedv0.1.2
    • changedInput schema / properties / in / description
      Previous value: -"only hits whose source path contains this substring"New value: +"only results whose source path contains this substring, e.g. 'docs/en' or 'projects'"
    • changedInput schema / properties / k / description
      Previous value: -"number of hits (default 5)"New value: +"number of hits to return, 1-20 (default 5)"
    • changedInput schema / properties / query / description
      Previous value: -"what to look for"New value: +"what to look for, in any language"
    • changedInput schema / properties / tag / description
      Previous value: -"filter by frontmatter tag"New value: +"only results whose frontmatter tags contain this, e.g. 'rag' or 'memory'"
  2. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden and does well: it discloses hybrid retrieval, ranked excerpts with file path, heading breadcrumb and similarity score, no LLM call, and the indexed-source limitation. It does not explicitly state the operation is read-only with no side effects, but 'search' plus 'no LLM call' strongly implies it.

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?

The description is front-loaded with the core behavior, followed by usage guidance and a concrete limitation. Each sentence earns its place, and the labeled Behavior/Usage structure makes scanning easy.

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?

Despite having no output schema, the description covers return values (ranked excerpts with file path, breadcrumb, score), key constraints (k limit, indexed sources), and usage context well. Combined with the schema and sibling names, an agent has enough to select and invoke the tool correctly.

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

Parameters3/5

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

The input schema already documents all four parameters with clear descriptions, so schema coverage is 100%. The description adds context about ranking and results but does not add parameter-level detail beyond the schema; baseline 3 is appropriate.

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?

The description states a specific verb and resource ('Search the personal knowledge base') and specifies the retrieval method (hybrid vector + BM25). It clearly distinguishes itself from sibling tools by naming brain_ask as the alternative for synthesized answers.

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?

Explicitly states when to use this tool: when source material is needed to quote, verify a claim, or see what exists on a topic. It also gives a concrete alternative (brain_ask) and a prerequisite action (brain_ingest) when recent files are missing, leaving no ambiguity about selection.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/IvenKooLab/loci'

If you have feedback or need assistance with the MCP directory API, please join our Discord server