list_recent_documents
Retrieve recently modified documents from Outline wiki to track updates and manage content changes.
Instructions
Get list of recently modified documents.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No |
Implementation Reference
- src/lib/handlers/search.ts:70-79 (handler)Core handler function that executes the tool: queries Outline API for recent documents sorted by updatedAt DESC and formats the output.async list_recent_documents(args: ListRecentDocumentsInput) { const { data } = await apiCall(() => apiClient.post<OutlineDocument[]>('/documents.list', { limit: args.limit, sort: 'updatedAt', direction: 'DESC', }) ); return formatRecentDocuments(data || [], baseUrl); },
- src/lib/schemas.ts:35-35 (schema)Zod input schema definition for the tool, accepting an optional 'limit' parameter defaulting to 10.export const listRecentDocumentsSchema = z.object({ limit: limit.default(10) });
- src/lib/tools.ts:56-60 (registration)Registers the MCP tool definition in the allTools array, providing name, description, and schema reference.createTool( 'list_recent_documents', 'Get list of recently modified documents.', 'list_recent_documents' ),
- src/lib/formatters/document.ts:41-50 (helper)Helper function used by the handler to format the list of recent documents into a standardized output structure.export function formatRecentDocuments(documents: OutlineDocument[], baseUrl: string) { return documents.map((doc) => ({ id: doc.id, title: doc.title, url: buildUrl(baseUrl, doc.url), collectionId: doc.collectionId, updatedAt: doc.updatedAt, updatedBy: doc.updatedBy?.name, })); }