Skip to main content
Glama
zahrafatima9432

MCP Toolbox

search_documents

Find relevant documents by keyword search, returning ranked matches with titles, tags, and snippets. Retrieve full text by ID when needed.

Instructions

Keyword-search the stored documents and return ranked matches.

Each result includes an id, title, relevance score, tags, and a snippet. Use get_document with a returned id to read the full text.

Args: query: Words to search for. limit: Maximum number of results (default 5).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
queryYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the burden and discloses the result shape (id, title, relevance score, tags, snippet), the ranked nature, and that full text is read separately via get_document. It does not discuss edge cases such as empty results or limit enforcement, but the core behavior is transparent.

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 core action and result shape are front-loaded, the follow-up get_document hint is earned, and the Args block is compact. No unnecessary detail.

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?

For a simple two-parameter search tool, the description covers trigger, result records, follow-up, and parameters. It lacks only edge-case behavior like empty matches or pagination, which are not essential given the tool's simplicity.

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?

Since the schema has no descriptions, the description compensates by defining query as 'Words to search for' and limit as 'Maximum number of results (default 5).' It adds meaning beyond type and default, although it omits query syntax and any range constraints.

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 uses 'Keyword-search the stored documents and return ranked matches,' which names a specific verb, resource, and output. It also tells the agent to use get_document on a returned id for full text, distinguishing this search tool from the read-by-id sibling.

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?

It clearly frames the tool for finding stored documents by keyword, and explicitly routes the follow-up from results to get_document. It does not spell out when to prefer list_documents or web_search, but the 'stored documents' scope makes the context clear.

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