Skip to main content
Glama

Search Brain

brain_search

Search the local knowledge base by concrete keywords to retrieve ranked notes with exact-phrase matches; load relevant past work context at session start or when a request relates to earlier work.

Instructions

Search the knowledge base by keyword. Matches exact words (with simple stemming), ranked by BM25, with an exact-phrase match on top. It does not match by meaning, so use the words the note probably contains: product, file, table, error-string and command names. Several guessed keywords in one query work well, because any word can match and notes with more of them rank higher. Use at session start to load context, and whenever a request may relate to earlier work.

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": "brain_search"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMax results (default 10)
queryYesKeywords to look for. Concrete names beat a prose description.
projectNoOnly this project
categoryNoOnly this category

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and mostly succeeds: it discloses the ranking algorithm (BM25), stemming tolerance, the exact-phrase boost, and the permissive OR-style matching where any word can match and notes with more matches rank higher. It leaves out return shape, limit/pagination behavior, and whether project/category filters are exact-match.

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

Conciseness4/5

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

Front-loaded with the verb and matching model, then graduated into query advice and usage timing; every sentence contributes. Slightly dense in the middle where matching mechanics and query-crafting advice are interleaved, but no filler.

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 four-parameter read tool with no annotations and no output schema, the description covers the hard part — how matching and ranking work, and which words to supply. Gaps remain around what a result contains and how the project/category filters combine with the keyword query, which an agent would still have to discover by calling it.

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?

Schema coverage is 100%, so all four parameters are already documented, including the guidance that concrete names beat prose in the query parameter. The description largely restates that query advice and says nothing about limit, project, or category semantics, so the 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?

States a concrete verb and resource ("Search the knowledge base by keyword") and immediately specifies the matching mechanism (BM25 with stemming, exact-phrase boosted to the top). The negative clarification "does not match by meaning" cleanly separates it from any recency- or semantics-based retrieval sibling, so an agent can tell what this tool is without opening the schema.

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 explicit usage contexts: "at session start to load context, and whenever a request may relate to earlier work," plus practical query-construction advice (use concrete names, several guessed keywords in one query). It stops short of naming an alternative tool or stating when NOT to use it, so routing against siblings like brain_recent is left to inference.

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