Skip to main content
Glama

Search text (BM25)

search_text
Read-only

Find answers buried in your Markdown vault with ranked full-text search that highlights matching terms and lets you narrow by folder, tags, or frontmatter.

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. Changed1 schema field changedv0.1.11
    • addedOutput schema / $defs / SearchResultOutput / properties / lifecycle
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "title": "Lifecycle"
      +}
  2. 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"
      +}
  3. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already cover readOnly and destructive safety, and the description adds substantial behavioral context: BM25 ranking, title/heading weighting, highlighted snippets, group_by_note behavior, demotion of superseded notes, and the index prerequisite. No contradiction with annotations.

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?

Five sentences, front-loaded with the primary use case, then mechanism, scoping options, prerequisite, and a key default. Every sentence earns its place with no filler or repetition.

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?

Covers use case, prerequisite, scoping, grouping, and superseded behavior, while the output schema handles return shape. Missing explicit routing to search_regex and minor limit/query syntax details, but the tool is still safely invokable.

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 description coverage is 0%, so the description must compensate. It explains folder/tags/frontmatter scoping, group_by_note=true, and include_superseded=true. It delegates frontmatter semantics to list_notes and omits details about limit and query syntax, leaving some gap.

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 states a specific verb and resource: full-text BM25 search over the FTS5 index of the user's notes, projects, decisions, and past work. The phrase 'First stop' positions it among siblings, and the BM25 mechanism implicitly distinguishes it from search_regex.

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?

Explicitly tells the agent when to use it: 'First stop for any question... search before saying you do not know.' It also gives a prerequisite (datacron index) and explains default behavior for superseded notes. It does not explicitly name alternatives or exclusions such as 'use search_regex instead'.

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