Skip to main content
Glama

search_docs

Read-onlyIdempotent

Search all documents full-text to find relevant passages by keyword, ranked by BM25 with doc_id, section and snippet. Use specific terms like product names or error codes, then read full sections.

Instructions

Full-text search across all documents. Returns the most relevant passages ranked by BM25, each with a doc_id, section and snippet. Specific terms work best (product names, error codes, policy names). Follow up with get_document to read the full section before answering.

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_docs"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesKeywords or a short question, e.g. 'rotate API keys'
top_kNoMaximum results to return
path_prefixNoRestrict search to a sub-folder, e.g. 'runbooks/'

Output Schema

NameRequiredDescriptionDefault
hintYesGuidance for the next step
queryYes
resultsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and a closed-world scope, so the safety profile is covered. The description adds real behavioral context beyond that: results are relevance-ranked passages rather than whole documents, and the tool is a stepping stone rather than a final answer. It does not discuss result limits or empty-result behavior, but top_k and the output schema handle most of that.

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?

Four short sentences, front-loaded with purpose, then output shape, then query tips, then the next step. Every sentence carries actionable information with no restatement of the title or schema.

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?

For a three-parameter read-only search tool with a fully documented schema, rich annotations, and an output schema, the description covers everything an agent needs: what it returns, how to phrase queries, and what to do with the results. Nothing material is missing.

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 both optional parameters (top_k, path_prefix) are already documented. The description still adds meaning to 'query' by specifying that keyword-style, specific terms outperform vague phrasing and giving examples of good term types, which the schema does not convey.

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 across all documents') plus the retrieval mechanics (BM25 ranking of passages) and result shape (doc_id, section, snippet). This is enough for an agent to distinguish it from get_document (full read) and list_documents (enumeration) without opening a 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 concrete query-crafting guidance ('Specific terms work best (product names, error codes, policy names)') and an explicit follow-up workflow ('Follow up with get_document to read the full section before answering'). It does not state when to prefer list_documents or search_docs is inappropriate, so it stops short of full when/when-not coverage.

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

Deploy Server

Other Tools