Skip to main content
Glama

search

Run full-text queries against a local SQLite vault index to find notes by title, tags, body, or commit SHA without downloading the vault. Returns best-matching notes first and reports when only partial term matches exist.

Instructions

CHEAP — start here. Full-text search over the local SQLite index of the vault; it never downloads the whole vault. Matches file stem, title, summary, tags and body, folds diacritics, expands synonyms and accepts "quoted phrases". A bare commit sha looks up the notes that mention it. A query that is exactly a note's stem, or its [[stem]] wikilink, puts that note first wherever it lives. Every term is required; when no note has them all, it returns the notes matching the most terms and says so in the header. Inflected forms match through stemming in the vault's languages. Search in the vault's language first; when nothing matches, translate the terms into the vault's other languages and search again, and the reply names them. Excludes the archive and superseded notes unless you ask for them, and reports how many it hid. limit defaults to the vault schema's search.default_limit.

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": {
      "query": "<query>"
    },
    "name": "search"
  }
}

Input Schema

NameRequiredDescriptionDefault
tagNo
areaNo
kindNo
limitNo
queryYes
sinceNo
vaultNo
folderNo
statusNo
path_prefixNo
include_archiveNo
include_supersededNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.15.2
    • addedInput schema / properties / limit / anyOf
      Added value: +[
      +  {
      +    "type": "integer"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / limit / default
      Previous value: -15New value: +null
    • removedInput schema / properties / limit / type
      Removed value: -"integer"
    • addedInput schema / properties / vault
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Vault"
      +}
  2. First observedv0.2.1

TDQS

A4.2/5.0
Behavior5/5

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

With no annotations at all, the description carries the full burden and does so thoroughly: read-only local index access with no full-vault download, diacritic folding, synonym expansion, quoted-phrase support, commit-sha lookup, exact-stem/wikilink ranking boost, and stemming across vault languages. It also discloses two non-obvious behaviors an agent would otherwise be surprised by — the AND-then-partial-match fallback with a header note, and the silent-by-default exclusion of archive/superseded notes with a count of what was hidden.

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?

Dense but front-loaded: the cost/entry-point claim leads, then matching scope, then ranking, then fallback, then exclusions. Nearly every sentence adds operational information, though the single long paragraph would be easier to parse if the ranking and fallback rules were separated from the matching-scope sentence.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/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 not be described, and the core search behavior is covered in depth. But for a twelve-parameter tool with zero annotation coverage, the eight undocumented filter parameters are a real completeness gap that the description never addresses.

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 0%, so the description must compensate, and it does well for the required `query` (phrase syntax, sha lookup, wikilink/stem ranking, all-terms-required semantics) and for `limit`, `include_archive`, and `include_superseded`. However, eight of the twelve parameters — tag, area, kind, since, vault, folder, status, path_prefix — receive no explanation at all, leaving the filter surface undocumented in both schema and prose.

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 search over the local SQLite index of the vault — and immediately distinguishes itself from costlier siblings with 'CHEAP — start here' and 'never downloads the whole vault'. The scope of what is matched (stem, title, summary, tags, body) is explicit, so an agent knows exactly what this tool does 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 when-to-use framing ('start here', the cheap option) and prescribes a concrete workflow: search in the vault's language first, then translate terms into the vault's other languages on failure. It stops short of naming a sibling as the alternative for a different task, but the cost/entry-point guidance is unambiguous.

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