Skip to main content
Glama

search_text

Read-onlyIdempotent

Find plain text or regex matches across an Obsidian vault, returning surrounding line context with optional folder or glob filters, and searching non-Markdown files when needed.

Instructions

Grep the vault: plain text or regex, with N lines of context, optional file glob/folder. Also searches non-markdown text files when all_files is true.

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": {
      "pattern": "<pattern>"
    },
    "name": "search_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMax results (default 200)
regexNo
vaultNoVault name, id or folder path (see list_vaults). Default: OBSIDIAN_VAULT or the vault open in Obsidian.
folderNoLimit to this folder (vault-relative)
contextNoLines of context (default 0)
patternYes
all_filesNo
whole_wordNo
case_sensitiveNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so the safety profile is covered and the description adds the genuine extra that non-Markdown text files are included only when all_files is true. However it also advertises an "optional file glob" that has no corresponding parameter in the schema, and says nothing about result volume or how matches are returned.

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?

Two dense sentences, front-loaded with the core capability and then the qualifier, with no filler or repetition. Every clause carries distinct information.

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 9-parameter read-only tool with no output schema, the description covers the mode of search, context lines, scoping and the Markdown/non-Markdown distinction, which is the bulk of what an agent needs. Remaining gaps (result cap behavior, how matches are returned) are minor given the schema documents most of them.

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 44%, so the description must carry weight; it usefully defines the undocumented `regex` and `all_files` flags and clarifies that `context` means lines around a match. It leaves `limit`, `whole_word`, `case_sensitive` and `vault` to the schema, and the stray "file glob" reference creates a parameter that does not exist.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ("Grep the vault") plus the two search modes (plain text or regex) and the all_files extension, which is far more informative than a bare name. It does not explicitly differentiate itself from the sibling `search`/`search_ranked` tools, so an agent must infer that this is literal/substring matching rather than ranked search.

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?

Usage is only implied: "Grep the vault" suggests literal-match lookups, and the all_files clause hints at when to reach for it over a Markdown-only search. There is no explicit when-to-use/when-not statement and no mention of the obvious alternatives (`search`, `search_ranked`, `search_by_date`, `search_by_property`), leaving routing to inference.

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

Deploy Server

Other Tools