Skip to main content
Glama

Search text (BM25)

search_text
Read-only

Search a Markdown vault by full-text query to find notes, decisions, projects, and past work, returning ranked highlighted snippets filterable 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

NameRequiredDescriptionDefault
tagsNo
limitNo
queryYes
folderNo
frontmatterNo
group_by_noteNo
include_supersededNo

Output Schema

NameRequiredDescriptionDefault
queryYes
filtersNo
resultsYes
returnedYes
timings_msNo
index_repairNo
limit_appliedYes
grouped_by_noteNo
truncated_for_tokensYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.1.18
    • addedOutput schema / $defs / SearchResultOutput / properties / source_mount
      Added value: +{
      +  "title": "Source Mount",
      +  "type": "string"
      +}
    • changedOutput schema / $defs / SearchResultOutput / properties / source_vault / enum
      Previous value: -[
      -  "docs",
      -  "memory"
      -]New value: +[
      +  "docs",
      +  "memory",
      +  "extra"
      +]
  2. Changed13 schema fields changedv0.1.17
    • addedOutput schema / $defs / SearchResultOutput / properties / source_vault
      Added value: +{
      +  "enum": [
      +    "docs",
      +    "memory"
      +  ],
      +  "title": "Source Vault",
      +  "type": "string"
      +}
    • addedOutput schema / $defs / SearchResultOutput / properties / writable
      Added value: +{
      +  "title": "Writable",
      +  "type": "boolean"
      +}
    • addedOutput schema / description
      Added value: +"Successful ``search_text`` payload."
    • removedOutput schema / properties / filters / default
      Removed value: -null
    • removedOutput schema / properties / grouped_by_note / default
      Removed value: -null
    • removedOutput schema / properties / index_repair / default
      Removed value: -null
    • removedOutput schema / properties / limit_applied / default
      Removed value: -null
    • removedOutput schema / properties / query / default
      Removed value: -null
    • removedOutput schema / properties / results / default
      Removed value: -null
    • removedOutput schema / properties / returned / default
      Removed value: -null
    • removedOutput schema / properties / timings_ms / default
      Removed value: -null
    • removedOutput schema / properties / truncated_for_tokens / default
      Removed value: -null
    • addedOutput schema / required
      Added value: +[
      +  "query",
      +  "results",
      +  "returned",
      +  "limit_applied",
      +  "truncated_for_tokens"
      +]
  3. Changed1 schema field changedv0.1.11
    • addedOutput schema / $defs / SearchResultOutput / properties / lifecycle
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "title": "Lifecycle"
      +}
  4. 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"
      +}
  5. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, non-destructive, non-idempotent), and the description adds genuine behavioral context beyond them: indexing prerequisite, ranking boost for titles/heading trails, **term** highlighting in sandbox-wrapped snippets, and the default demotion of superseded notes with the include_superseded escape hatch.

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 search-first imperative, then prerequisites, ranking, and parameter behavior in an order an agent can act on. It is dense and mostly waste-free, though the opening clause listing note types is slightly padded.

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?

An output schema exists, so return values need no explanation, and the description covers the index prerequisite and superseded-note demotion default. What remains thin is the untold behavior of query syntax and the limit parameter, minor gaps for a 7-parameter tool.

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 carry the load, and it meaningfully explains folder, tags, frontmatter (cross-referencing list_notes semantics), group_by_note and include_superseded. It leaves query and limit undocumented, though those are largely self-evident.

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?

Names a specific verb and resource ("Full-text BM25 search over the FTS5 index") and states the scope precisely: notes, projects, decisions, past work. It clearly differentiates from siblings like search_regex and list_notes by describing the full-text ranking model and highlighting behavior.

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?

"First stop for any question about the user's notes... search before saying you do not know" gives a strong explicit when-to-use trigger, and the index prerequisite is stated. However, it never names the alternative tools (search_regex, get_backlinks) or when those would be preferred, so one dimension of the guideline is left implicit.

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