Skip to main content
Glama

search_docs

Read-only

Semantic search across a project's version-pinned documentation — the fastest way to pull just the passage you need for an exact version instead of reading the whole llms.txt. Returns chunks ranked by relevance, capped by token_budget. Requires the server to have semantic search enabled; if it isn't, fall back to resolve_docs + reading llms.txt.

Input Schema

NameRequiredDescriptionDefault
queryYesNatural-language search query
top_kNoMax results (1-50, default 10)
projectYesProject slug (e.g. "nextjs", "react")
versionYesVersion string or "latest"
snapshotNoImmutable revision_id returned by resolve_docs; omit to use the current capture.
token_budgetNoMax tokens to budget for results (default 4096)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / snapshot
      Added value: +{
      +  "description": "Immutable revision_id returned by resolve_docs; omit to use the current capture.",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
  2. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and openWorldHint, yet the description still contributes real behavioral context: the prerequisite feature flag, the graceful-degradation path, and that results come back relevance-ranked and bounded by token_budget. It stops short of covering edge cases like zero-hit results or how ranking/truncation interacts when the budget is exhausted, so it is strong but not exhaustive.

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?

Three sentences, each doing distinct work: what it does, what it returns and how it is bounded, then the prerequisite and fallback. The core capability is front-loaded and no sentence is redundant with the title or schema.

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?

With no output schema, the description correctly supplies the return shape (relevance-ranked chunks capped by token_budget) and the operational prerequisite, which is the information an agent could not get from structured fields. A small gap remains around the snapshot parameter's relationship to resolve_docs, which is only implied by 'version-pinned'.

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%, so the baseline is 3, but the description adds interpretation the schema cannot: token_budget is framed as the cap on returned content and the output as ranked chunks, telling the agent how query and budget interact in practice. It does not further explain snapshot or top_k beyond what the schema already documents.

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 ('Semantic search across a project's version-pinned documentation') plus the scope constraint (version-pinned) that separates it from generic doc reading. The final clause explicitly contrasts it with reading the whole llms.txt and names the sibling resolve_docs as the fallback, so an agent can route between them without opening either 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?

Gives a positive selection rule ('fastest way to pull just the passage you need for an exact version instead of reading the whole llms.txt') and a negative one ('Requires the server to have semantic search enabled; if it isn't, fall back to resolve_docs + reading llms.txt'). Both the when and the when-not, with the alternative named, are present.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.