Skip to main content
Glama

search_documents

Read-onlyIdempotent

Search your knowledge base for documents containing specific keywords or phrases. Use full-text search across all document content and titles, with results ranked by relevance.

Instructions

Searches for documents using keywords or phrases across your knowledge base.

IMPORTANT: The search performs full-text search across all document content and titles. Results are ranked by relevance, with exact matches and title matches typically ranked higher. The search will return snippets of content (context) where the search terms appear in the document. You can limit the search to a specific collection by providing the collection_id.

PAGINATION: By default, returns up to 25 results at a time. If more results exist, use the 'offset' parameter to fetch additional pages. For example, use offset=25 to get results 26-50, offset=50 for 51-75, etc.

Use this tool when you need to:

  • Find documents containing specific terms or topics

  • Locate information across multiple documents

  • Search within a specific collection using collection_id

  • Discover content based on keywords

  • Browse through large result sets using limit and offset

Args: query: Search terms (e.g., "vacation policy" or "project plan") collection_id: Optional collection to limit the search to limit: Maximum results to return (default: 25, max: 100) offset: Number of results to skip for pagination (default: 0)

Returns: Formatted string containing search results with document titles, contexts, and pagination information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
collection_idNo
limitNo
offsetNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

Adds full-text search behavior, relevance ranking, snippet inclusion, and pagination. Annotations already indicate read-only and idempotent, so no contradiction.

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?

Well-organized with sections (IMPORTANT, PAGINATION, Use when, Args, Returns). No wasted sentences; every line adds value.

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?

Covers pagination, snippets, ranking, and return format. Output schema exists but description enhances understanding. Complete for a search tool.

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

Parameters5/5

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

Schema coverage 0%, but description provides full parameter explanations (query terms, collection_id optional, limit default/max, offset default).

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?

Searches for documents using keywords/phrases across knowledge base; verb 'searches' and resource 'documents' are specific. Distinguished from siblings (e.g., read_document, list_collections).

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?

Explicit when-to-use scenarios listed (find terms, locate info, search within collection, browse results). Sibling tools are distinct, but no when-not-to is needed given clarity.

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/fastmcp-me/mcp-outline'

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