Skip to main content
Glama

brain_search

Search a markdown vault by keyword, returning hits ranked by relevance with authority indicators, and listing excluded notes with reasons.

Instructions

Keyword search across the vault. Returns { hits, excluded }. Each hit has path, title, folder, status, snippet, and authority.

IMPORTANT — ranking is by keyword relevance, NOT by truth. A superseded document repeats the query words just as often as the live one, so it can outrank it. Every hit carries an authority: authoritative (source of truth — prefer it), current, provisional (draft/proposed — never quote as settled), superseded, archived. Rank order is a suggestion; authority is the signal.

excluded is the explainable-rejection list: notes that matched the query but were withheld because they are archived, superseded, or expired (past their valid_until), each with a reason (e.g. "superseded by price-live", "expired 2026-06-01"). When you deliberately ignore a stale note, cite its excluded entry — say what you skipped and why, instead of quoting it. If you need a withheld note, re-search with includeInvalid: true (superseded/expired) or includeArchive: true.

Before quoting a price, guarantee, contract term, or any other single-valued fact, open the authoritative note. If two live notes disagree on such a fact, that is a defect in the vault — report it rather than averaging them.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNomax hits (default 20)
queryYessearch query — a few keywords beat a full sentence
folderNorestrict to one top-level folder, e.g. 'decisions'
includeArchiveNoreturn archived notes as hits (default false → they go to `excluded`)
includeInvalidNoreturn superseded/expired notes as hits, still demoted (default false → `excluded`)
Behavior5/5

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

With no annotations, the description fully discloses ranking behavior (by relevance, not truth), authority levels, excluded list details, and the need to open authoritative notes for factual claims. It also explains the effect of parameters like includeArchive and includeInvalid.

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?

The description is verbose and contains many sentences, though it is well-structured with sections. Some repetition could be trimmed (e.g., the authority explanation is given twice). It is informative but not concise.

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?

Given the tool's complexity and lack of output schema, the description fully covers return structure, ranking nuances, authority meanings, excluded list, parameter behavior, and factual verification guidance. It leaves no significant gaps.

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?

The input schema has 5 parameters with 100% description coverage. The description reinforces their usage (e.g., re-search with includeInvalid if needed), adding context beyond the schema. However, the schema descriptions are already detailed, so the description adds moderate incremental value.

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 clearly states it is a keyword search tool across the vault, returning hits and excluded items. It distinguishes from sibling tools like brain_read and brain_list by emphasizing search behavior and authority filtering.

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?

The description provides explicit guidance on when to use the tool (for keyword search), how to interpret results (prefer authoritative notes), and when to use alternatives (re-search with includeInvalid/includeArchive). It also advises on handling stale notes and reporting defects.

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

Install Server

Other Tools

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/rwnalds/engram'

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