Skip to main content
Glama

search_sections

Search documentation sections by relevance using hybrid lexical and semantic ranking, returning concise summaries for quick identification of useful content.

Instructions

Search sections by relevance. Hybrid (BM25 lexical + semantic embedding) fusion when the index was built with use_embeddings=true; falls back to lexical-only otherwise. Returns summaries only — use get_section for full content.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repoNoRepository identifier
queryYesSearch query
doc_pathNoOptional: limit search to a specific document
path_globNov1.36+ — fnmatch glob restricting results to matching doc_paths (e.g. 'api/**/*.md'). Stacks with doc_path.
max_resultsNoMaximum number of results to return
semanticNonull/omit (auto — hybrid when embeddings exist), true (force hybrid), false (force lexical-only). Zero performance cost when the index has no embeddings.
semantic_onlyNoSkip lexical scoring; rank purely by embedding cosine similarity.
semantic_weightNoWeight (0.0–1.0) of semantic component in hybrid fusion. Lexical gets 1 - weight. Default 0.5.
roleNoOptional v1.19+ role filter. Values: concept, tutorial, how_to, reference, api, example, troubleshooting, changelog, faq, other.
profileNov1.32+ — task-aware retrieval profile. install/debug/explain/api each boost a small role set so matching sections rank ahead. Explicit role= overrides.
dedupeNov1.34+ — collapse near-duplicate sections to a single representative based on the v1.34 cluster sidecar. _meta.deduped reports suppressed member ids.
min_answerabilityNov1.42+ — drop results whose v1.33 _answerability score is below this threshold (0–1). _meta.quality_filtered reports drop count.
min_quotabilityNov1.42+ — drop results whose v1.33 _quotability score is below this threshold (0–1). Stacks with min_answerability.
min_levelNov1.44+ — restrict to sections at heading level >= this. Inclusive.
max_levelNov1.44+ — restrict to sections at heading level <= this. Inclusive. Stacks with min_level.
tagsNov1.45+ — restrict to sections whose Section.tags contains every listed tag (AND semantics). Case-insensitive.
exclude_tagsNov1.51+ — drop sections whose Section.tags contains ANY listed tag (negative ANY-match). Stacks with `tags`. Case-insensitive.
rolesNov1.52+ — restrict to sections whose metadata.role matches ANY listed role (positive OR-match). Differs from singular `role` (which is exact). Case-insensitive.
exclude_rolesNov1.52+ — drop sections whose metadata.role matches ANY listed role. Case-insensitive. Stacks with `roles` (the result must match an included role and not match any excluded role).
min_byte_lengthNov1.53+ — drop sections shorter than this many bytes (byte_end - byte_start). Use to filter out stubs / one-liners.
max_byte_lengthNov1.53+ — drop sections longer than this many bytes. Use to filter out oversized dumps. Stacks with min_byte_length.
repo_groupNov1.26+ — fan out across the named repo group (defined via define_repo_group). When set, the per-repo `repo` arg is ignored; results from each member repo are fused via RRF.
Behavior4/5

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

With no annotations, the description carries the full burden for behavioral disclosure. It accurately describes the hybrid search algorithm, fallback to lexical-only, and version-specific parameter behavior. It does not mention rate limits or side effects, but as a read-only search tool, the described behavior is sufficient.

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?

The description is extremely concise—two sentences—with no unnecessary words. It front-loads the primary action and follows with key behavioral detail and a direct pointer to an alternative tool.

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?

Given 22 parameters (all with schema descriptions) and no output schema, the description adequately explains the search behavior, return type (summaries only), and version dependencies. It does not describe the output format, but that is partially covered by the mentioned return value ('summaries only').

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 100%, so baseline is 3. The description adds value by explaining the hybrid fusion (BM25 + semantic) and noting that semantic flags have zero performance cost when no embeddings exist, which goes beyond the schema descriptions.

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 'Search sections by relevance' and specifies the hybrid search mode (BM25 + semantic embedding). It distinguishes itself from sibling tools like get_section (full content) by noting 'Returns summaries only — use get_section for full content.'

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?

The description gives clear guidance on when to use this tool vs. get_section for full content. It also describes fallback behavior when embeddings are not available. However, it does not compare with other search-like siblings such as search_titles or find_similar_sections.

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/jgravelle/jdocmunch-mcp'

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