Skip to main content
Glama

search_notes

Read-onlyIdempotent

Find text or regex matches in Markdown notes across one or all vaults, with result limits and optional before/after context lines.

Instructions

Search .md note contents with ripgrep across one vault or all vaults. regex=True uses ripgrep's Rust syntax (Python re when ripgrep is absent), so lookarounds and backreferences are not portable. limit is clamped 1-200 and the response carries a truncated flag; before/after (0-10) add context lines. With context each hit keeps text (= match_line) plus before_lines/match_line/after_lines, otherwise only text.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
afterNoContext lines after each hit
limitNoMax matches (default 50)
queryYesSearch text (or regex with regex=True)
regexNoTreat query as a regular expression
vaultNoVault name; omit to search all
beforeNoContext lines before each hit
case_sensitiveNoCase-sensitive matching

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.1

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already cover readOnly/idempotent/non-destructive, and the description adds substantial behavioral context beyond them: the ripgrep backend with Python re fallback, the regex engine's lack of lookarounds/backreferences, limit clamping and a truncated flag, and the shape of returned hits with and without context. It stops short of full disclosure on error/authorization behavior, hence a 4.

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 core action and scope, then value-dense detail on regex, limits, and output shape. Every sentence carries information, though the result-format sentence is somewhat packed.

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?

With no output schema, the description usefully compensates by describing the returned hit structure (text plus before_lines/match_line/after_lines). Coverage of search semantics, limits, and results is strong, with only minor gaps around error/pagination behavior.

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, but the description adds real meaning the schema lacks: the regex engine semantics for regex=True, the fact that limit is clamped (with a truncated signal), and exactly how before/after alter the result structure. This goes beyond the terse 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 ('Search'), resource ('.md note contents'), mechanism (ripgrep), and scope (one vault or all vaults). This clearly distinguishes it from siblings like list_notes and read_note without needing to name them.

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

Usage Guidelines3/5

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

The scope note ('one vault or all vaults') and the regex portability warning imply appropriate usage, but the description never states when to choose this tool over read_note or list_notes, nor any prerequisite conditions. Usage must be inferred.

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