Skip to main content
Glama

search_documents

Find documents in Outline wiki by keyword with pagination support to locate specific information across collections.

Instructions

Search documents by keyword. Supports pagination.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
collectionIdNo
limitNo
offsetNo

Implementation Reference

  • The handler function that executes the search_documents tool logic. It calls the Outline API /documents.search endpoint with the provided query parameters and formats the results using formatSearchResults.
    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 structure for search_documents: required query string, optional collectionId (UUID), limit (default 10), offset (default 0).
    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)
    Tool registration in allTools array: defines the MCP tool with name, description, and references the Zod schema for JSON schema conversion.
    createTool( 'search_documents', 'Search documents by keyword. Supports pagination.', 'search_documents' ),
  • Handler registration: spreads the search handlers (including search_documents) into the complete ToolHandlers object.
    ...createSearchHandlers(ctx),

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-smart-mcp'

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