Skip to main content
Glama

wiki_search

Search all wiki pages with full-text keyword search, returning ranked results with snippets. Filter by type or tags, get inline content, or combine search with reading top pages in one call.

Instructions

Full-text keyword search across all wiki pages. Returns paths, scores, and snippets sorted by relevance. Uses BM25 by default; switches to hybrid BM25+vector re-ranking when search.hybrid: true is set in .agent-wiki.yaml (requires wiki_admin action:rebuild to build the vector index first). Set include_content=true for simple inline content (with optional inline_budget cap). Set read_top_n to additionally read the top N unique matching pages (deduplicated) — enables combined search+read in one call; returns a pages array with full content and nextReads for unread matches. Use type or tags to narrow results without a separate wiki_list call. When no results are found, returns a knowledge_gap field with a suggested page slug, title, type, and tags — use it to decide what to create with wiki_write.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query (keywords)
limitNoMax results (default: 10)
typeNoFilter results to a specific entity type (person, concept, event, artifact, code, comparison, summary, how-to, note, synthesis). Applied after BM25 ranking.
tagsNoFilter results to pages that have at least one of these tags. Applied after BM25 ranking.
include_contentNoIf true, include page content inline in results. When a section matched, returns that section; otherwise returns first 200 lines. Saves a follow-up batch read. Default: false.
inline_budgetNoMax total characters of inlined content across all results (only with include_content=true). Greedy — top-scoring results get content first; lower-scoring ones fall back to snippet-only when budget is exhausted. Omit for no limit.
read_top_nNoHow many unique top-scoring pages to read in full (default: unset). When set, activates combined search+read mode: deduplicates search hits, reads up to N unique pages, and returns a `pages` array alongside `results`. Max: 10.
sectionNoSection heading filter applied to all page reads when read_top_n is set (e.g. '## Installation'). Case-insensitive partial match.
per_page_limitNoMax lines per page when read_top_n is set (default: 200, max: 500). Pages exceeding this are truncated with metadata.
include_tocNoInclude table of contents for truncated pages when read_top_n is set (default: false).
Behavior5/5

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

With no annotations, the description fully discloses behavioral traits: default BM25, hybrid mode conditional on config and rebuild action, greedy inline_budget, deduplication in read_top_n, section case-insensitive partial match, and knowledge_gap return on no results.

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?

Well-structured with core purpose first, then detailed parameter explanations. Slightly long but each sentence adds value. Could be slightly more concise, but no wasted words.

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?

Given 10 parameters and no output schema, description covers all parameters and important behaviors (hybrid mode, inline_budget, read_top_n, knowledge_gap). Agent can fully understand tool capabilities and make informed calls.

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 100% (baseline 3), but description adds value beyond schema: hybrid mode requires config and rebuild, inline_budget is greedy, read_top_n deduplicates and returns pages array, section is case-insensitive partial match, knowledge_gap field for no results.

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 clearly states it's a full-text keyword search across all wiki pages, returns paths, scores, snippets sorted by relevance. It distinguishes from siblings like wiki_list, wiki_read, and wiki_write by specifying its search functionality and the ability to combine search+read.

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?

Provides explicit guidance on when to use hybrid search, include_content, read_top_n, and filtering by type/tags. Mentions handling no-results with knowledge_gap. Does not explicitly list when not to use, but context implies its primary role for searching, not listing or reading specific pages.

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

Install Server

Other Tools

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/xinhuagu/agent-wiki'

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