Skip to main content
Glama

Search text (BM25)

search_text
Read-only

Search your Markdown vault by query to find relevant notes with ranked snippets and term highlighting. Filter by folder, tags, or frontmatter to narrow results.

Instructions

First stop for any question about the user's notes, projects, decisions, or past work - search before saying you do not know. Full-text BM25 search over the FTS5 index; note titles and heading trails carry extra weight. Returns ranked sandbox-wrapped snippets with term highlighting. Narrow the scope with folder, tags, or frontmatter (same semantics as list_notes); group_by_note=true keeps the best chunk per note. Requires datacron index to have been run first. By default, explicitly superseded notes are demoted; set include_superseded=true to inspect historical notes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tagsNo
limitNo
queryYes
folderNo
frontmatterNo
group_by_noteNo
include_supersededNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryNo
filtersNo
resultsNo
returnedNo
timings_msNo
index_repairNo
limit_appliedNo
grouped_by_noteNo
truncated_for_tokensNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changedv0.1.6
    • addedInput schema / properties / folder
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Folder"
      +}
    • addedInput schema / properties / frontmatter
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Frontmatter"
      +}
    • addedInput schema / properties / group_by_note
      Added value: +{
      +  "default": false,
      +  "title": "Group By Note",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / tags
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Tags"
      +}
    • addedOutput schema / $defs / SearchFiltersOutput
      Added value: +{
      +  "description": "Scope filters actually applied to one ``search_text`` call.",
      +  "properties": {
      +    "folder": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Folder"
      +    },
      +    "frontmatter": {
      +      "additionalProperties": {
      +        "type": "string"
      +      },
      +      "title": "Frontmatter",
      +      "type": "object"
      +    },
      +    "tags": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "title": "Tags",
      +      "type": "array"
      +    }
      +  },
      +  "title": "SearchFiltersOutput",
      +  "type": "object"
      +}
    • addedOutput schema / $defs / SearchResultOutput / properties / note_matches
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "title": "Note Matches"
      +}
    • addedOutput schema / properties / filters
      Added value: +{
      +  "anyOf": [
      +    {
      +      "$ref": "#/$defs/SearchFiltersOutput"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
    • addedOutput schema / properties / grouped_by_note
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "boolean"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Grouped By Note"
      +}
  2. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

Rich behavioral disclosure beyond the read-only annotation: ranking by BM25, title/heading weighting, snippet format with **term** highlighting, grouping by note, default demotion of superseded notes, and the prerequisite index requirement. No contradiction with annotations; it complements the readOnlyHint/destructiveHint.

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?

Four dense sentences with the primary purpose front-loaded ('First stop...') followed by mechanism, return format, parameter semantics, and prerequisites. Every sentence adds operational value; no filler.

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?

For a 7-parameter search tool with an output schema, the description covers the behavior, scoping, grouping, superseded handling, and setup prerequisite. The output schema already exists, so return-value details don't need to be repeated. Only an explicit alternative-routing statement is absent, which is minor given the 'first stop' framing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description compensates by explaining group_by_note, include_superseded, and scope-narrowing via folder/tags/frontmatter with shared list_notes semantics. It also contextualizes query as BM25 over FTS5. Only 'limit' is left to its schema default, which is low-risk and self-explanatory.

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 and resource: full-text BM25 search over the FTS5 index. Positions itself as the 'First stop' for questions about notes/projects/decisions/past work, and the BM25 versus regex mechanism differentiates it from search_regex in the sibling list. Also ties to list_notes semantics, reinforcing its role.

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?

Clear when-to-use guidance: use this first for any question about the user's notes before saying you don't know. It gives prerequisites ('datacron index') and scoping options, but does not explicitly state when to prefer alternatives like search_regex or when not to use it. Thus a clear context with no explicit exclusions.

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