Skip to main content
Glama

search_documents

Search Outline wiki documents by keyword to find relevant information quickly, with support for pagination to browse results efficiently.

Instructions

Search documents by keyword. Supports pagination.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
collectionIdNo
limitNo
offsetNo

Implementation Reference

  • The core handler function for the 'search_documents' tool. It calls the Outline API's '/documents.search' endpoint with the provided query parameters and formats the returned search results.
    async search_documents(args: SearchDocumentsInput) { const { data } = await apiCall(() => apiClient.post<SearchResult[]>('/documents.search', { query: args.query, collectionId: args.collectionId, limit: args.limit, offset: args.offset, }) ); return formatSearchResults(data || [], baseUrl); },
  • Zod schema defining the input parameters for the 'search_documents' tool: query (required string), optional collectionId, limit, and offset.
    export const searchDocumentsSchema = z.object({ query: z.string().min(1, 'Query is required'), collectionId: collectionId.optional(), limit: limit.default(10), offset, });
  • src/lib/tools.ts:36-40 (registration)
    Registers the 'search_documents' tool in the allTools array by calling createTool with its name, description, and schema key.
    createTool( 'search_documents', 'Search documents by keyword. Supports pagination.', 'search_documents' ),
  • Maps the tool name 'search_documents' to its Zod schema in the toolSchemas lookup object.
    search_documents: searchDocumentsSchema,

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/huiseo/outline-wiki-mcp'

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