Skip to main content
Glama

Search Notes

search_notes
Read-onlyIdempotent

Search all vault notes for literal phrases, keywords, or code fragments and return matching note paths with line numbers and centered snippets; use get_note to open full bodies.

Instructions

Full-text search across all notes in the vault. Ranks literal matches with title/path focus and repeated-line dampening, then returns matching note paths grouped with the line numbers and query-centered snippet content of each matching line. Use to locate notes containing a phrase, keyword, or code fragment; pair with get_note to retrieve full bodies.

Input Schema

NameRequiredDescriptionDefault
queryYesLiteral search string matched against note body text (not regex)
folderNoRestrict search to this folder relative to the vault root (omit to search entire vault)
maxResultsNoMaximum number of matching notes to return (1-500, default: 20)
caseSensitiveNoIf true, match case exactly; otherwise case-insensitive (default: false)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv4.1.1
    • removedInput schema / additionalProperties
      Removed value: -false
  2. Addedv2.0.0
  3. Removedv1.9.0
  4. Addedv0.1.6
  5. Removedv0.1.4
  6. Changed8 schema fields changedv0.1.2
    • changedInput schema / properties / caseSensitive / description
      Previous value: -"Whether the search should be case sensitive"New value: +"If true, match case exactly; otherwise case-insensitive (default: false)"
    • changedInput schema / properties / folder / description
      Previous value: -"Limit search to a specific folder"New value: +"Restrict search to this folder relative to the vault root (omit to search entire vault)"
    • changedInput schema / properties / maxResults / description
      Previous value: -"Maximum number of results to return"New value: +"Maximum number of matching notes to return (1-500, default: 20)"
    • addedInput schema / properties / maxResults / maximum
      Added value: +500
    • addedInput schema / properties / maxResults / minimum
      Added value: +1
    • changedInput schema / properties / maxResults / type
      Previous value: -"number"New value: +"integer"
    • changedInput schema / properties / query / description
      Previous value: -"Search query string"New value: +"Literal search string matched against note body text (not regex)"
    • addedInput schema / properties / query / minLength
      Added value: +1
  7. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, closed-world), and the description adds real behavioral content: ranking signals (title/path focus, repeated-line dampening) and the shape of results (paths grouped with line numbers and query-centered snippets). It omits truncation/empty-result behavior and how the maxResults cap interacts with ranking.

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?

Three front-loaded sentences with no filler: what it does, how results come back, when to use it. The ranking sentence is dense but earns its place by explaining result ordering.

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 carries the return-value burden and does describe result structure (grouped paths, line numbers, snippets). Missing is what happens with zero matches, result cap/truncation, and whether ordering vs. maxResults is deterministic.

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 description coverage is 100%, so every parameter is already documented, and the description only echoes the 'literal, not regex' point already in the schema. It adds nothing on folder scoping, case sensitivity, or result limits. Baseline 3 for a fully described schema.

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+resource ('full-text search across all notes') and pins the matching model as literal/full-text, which implicitly separates it from search_semantic, search_by_tag, and search_by_frontmatter. An agent can pick this tool 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 clear context ('locate notes containing a phrase, keyword, or code fragment') and a follow-up path ('pair with get_note to retrieve full bodies'). It never explicitly excludes or names the sibling alternatives (search_semantic, search_by_frontmatter), so routing between them is left partly to inference.

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