Skip to main content
Glama

search_documents

Find documents in Outline wiki by keyword with paginated results for efficient information retrieval.

Instructions

Search documents by keyword. Supports pagination.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
collectionIdNo
limitNo
offsetNo

Implementation Reference

  • Core handler function implementing the search_documents tool logic: performs API call to search documents by query (optionally scoped to collection), supports pagination, formats and returns 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 input parameters for search_documents: query (required 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:37-40 (registration)
    Tool registration in allTools array: creates MCP tool definition from schema with name 'search_documents' and description.
    'search_documents', 'Search documents by keyword. Supports pagination.', 'search_documents' ),
  • Mapping of tool name 'search_documents' to its Zod schema in the central toolSchemas record.
    search_documents: searchDocumentsSchema,
  • Tool schema registration in toolSchemas map used by tool definitions.
    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-smart-mcp'

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