Skip to main content
Glama

search_docs

Read-only

Find relevant passages from indexed Markdown, text, and PDF documents by semantic query and return file and section citations for answering questions from your own sources.

Instructions

Searches the indexed documents by meaning and returns the most relevant passages, with their file and section. Use it to answer questions from the user's own documents, and cite the files you used.

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
topKNoHow many passages to return, from 1 to 20.
queryYesWhat to look for, as a question or a short phrase.
folderNoOptional. Only search files inside this folder.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, so safety is covered. The description adds real context beyond that: retrieval is semantic rather than keyword-based, and results carry file and section metadata for citation. It says nothing about ranking behavior, truncation, or what happens when nothing matches, so it adds value but not richness.

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?

Two sentences, both front-loaded and free of filler: the first covers mechanism and return shape, the second covers usage and citation. Nothing is repeated from the schema or annotations.

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?

Three simple parameters with full schema coverage and no output schema, so the description needs to cover purpose, usage, and return shape, all of which it does. Minor gaps remain around empty-result behavior and result ranking, but nothing an agent needs in order to call it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, including defaults and ranges for topK, so the schema already carries parameter meaning. The description adds no parameter-level detail (no guidance on phrasing the query, no note on how folder interacts with the index) beyond what the schema provides, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Names a specific verb and resource ('Searches the indexed documents') and qualifies the retrieval mode ('by meaning'), which distinguishes it from indexing or listing siblings. It also states what comes back ('the most relevant passages, with their file and section'). It does not explicitly name a sibling it must not be confused with, so it stops short of 5.

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 a clear usage context: 'Use it to answer questions from the user's own documents, and cite the files you used.' That tells the agent the appropriate scenario and a follow-up obligation. There is no explicit when-not guidance or named alternative, which keeps it out of 5 territory.

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