Skip to main content
Glama

akb_search

Find documents using hybrid search that fuses semantic and keyword matching, supports natural language or short queries, and filters by vault, collection, tags, or type. Returns URIs for further retrieval.

Instructions

Search documents with hybrid retrieval — dense vector (semantic) fused with BM25 sparse (keyword) via Reciprocal Rank Fusion. Handles both natural-language questions and short keyword queries well. For exact string / regex matches (code, URLs, version numbers) prefer akb_grep. Returns each hit's uri; collection_summary and vault_description describe the hit's parent context but do not affect matching or ranking. Use akb_drill_down or akb_get with that URI for full content. Response reports returned (in results) and total_matches (size of the deduped prefetch pool — NOT a corpus-wide hit count; vector ANN is top-K only). When truncated=true the prefetch pool was capped, meaning the corpus may hold more hits than reported — switch to akb_grep with count_only=true for an exact literal-substring count, or refine the query. When degraded=true the retrieval index hit a transient failure (vector-store outage or a degraded leg), so results may be incomplete or empty — this is NOT a genuine zero-match; degradation_reason names the cause. Retry shortly, or fall back to akb_grep for a literal search.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tagsNoFilter by tags
typeNoFilter by document type (any string). Common values: note, report, decision, spec, plan, session, task, reference, skill.
limitNo
queryYesNatural language search query
vaultNoLimit search to a specific vault
collectionNoLimit search to a specific collection
source_urisNoRestrict the search to a specific set of already-known resources by their canonical akb:// URIs (e.g. from a previous akb_search / akb_browse). Hybrid retrieval (dense + BM25 + ranking) runs only inside this set, intersected with the other filters and your access. Omit for the normal whole-vault search.
include_archivedNoInclude archived documents. Default false — `status: archived` docs are hidden from search.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed2 schema fields changedv2.0.13
    • changedInput schema / properties / type / description
      Previous value: -"Filter by document type"New value: +"Filter by document type (any string). Common values: note, report, decision, spec, plan, session, task, reference, skill."
    • removedInput schema / properties / type / enum
      Removed value: -[
      -  "note",
      -  "report",
      -  "decision",
      -  "spec",
      -  "plan",
      -  "session",
      -  "task",
      -  "reference",
      -  "skill"
      -]
  2. Changed1 schema field changedv2.0.8
    • addedInput schema / properties / source_uris
      Added value: +{
      +  "description": "Restrict the search to a specific set of already-known resources by their canonical akb:// URIs (e.g. from a previous akb_search / akb_browse). Hybrid retrieval (dense + BM25 + ranking) runs only inside this set, intersected with the other filters and your access. Omit for the normal whole-vault search.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
  3. Changed1 schema field changedv2.0.7
    • addedInput schema / properties / include_archived
      Added value: +{
      +  "default": false,
      +  "description": "Include archived documents. Default false — `status: archived` docs are hidden from search.",
      +  "type": "boolean"
      +}
  4. Addedv2.0.4
  5. Removedv2.0.1
  6. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

No annotations are provided, so the description carries the full behavioral burden, and it succeeds admirably. It discloses that total_matches is not a corpus-wide count, explains what truncated=true and degraded=true mean, warns that degraded results are not genuine zero-matches, and names degradation_reason as the cause source. It also clarifies which returned fields affect ranking and which do not.

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?

Although the description is long, every sentence earns its place: retrieval mechanism, sibling distinction, result semantics, truncation behavior, and degradation behavior. It is front-loaded with the core purpose and uses precise, dense phrasing without fluff or repetition.

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?

With no output schema, the description fully explains the response semantics an agent needs: returned fields, total_matches' true meaning, truncation, and degradation. It also tells the agent how to proceed after retrieving URIs and when to fall back to akb_grep. For a complex hybrid search tool with eight parameters and no annotation coverage, this is a complete and reliably actionable definition.

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 coverage is high (88%), which sets a strong baseline. The description adds useful parameter-level nuance beyond the schema's 'Natural language search query' label by noting the query handles both natural-language questions and short keyword queries. It does not elaborate on the remaining filters, but their schema descriptions are already explicit, so no major gap exists.

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 opens with a specific action and resource ('Search documents with hybrid retrieval') and explains the retrieval mechanism in precise terms. It actively distinguishes itself from akb_grep by contrasting hybrid semantic/keyword search with exact string/regex matching, so an agent can separate it from sibling tools 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 Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives explicit when-to-use guidance: use this tool for natural-language and short keyword queries, and prefer akb_grep for exact string/regex matches. It also provides concrete fallback paths for truncated and degraded results, telling the agent exactly when to switch to akb_grep with count_only=true or a literal search.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/dnotitia/akb'

If you have feedback or need assistance with the MCP directory API, please join our Discord server