list_archived_documents
Retrieve and review a formatted list of archived documents to locate specific content, check archive status, or identify items for unarchiving from the MCP Outline Server workspace.
Instructions
Displays all documents that have been archived.
Use this tool when you need to:
- Find specific archived documents
- Review what documents have been archived
- Identify documents for possible unarchiving
- Check archive status of workspace content
Returns:
Formatted string containing list of archived documents
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- The handler function for the 'list_archived_documents' tool, decorated with @mcp.tool(). It retrieves archived documents via the Outline client's post to 'documents.archived' endpoint and formats the result using the _format_documents_list helper.@mcp.tool( annotations=ToolAnnotations( readOnlyHint=True, destructiveHint=False, idempotentHint=True ) ) async def list_archived_documents() -> str: """ Displays all documents that have been archived. Use this tool when you need to: - Find specific archived documents - Review what documents have been archived - Identify documents for possible unarchiving - Check archive status of workspace content Returns: Formatted string containing list of archived documents """ try: client = await get_outline_client() response = await client.post("documents.archived") from mcp_outline.features.documents.document_search import ( _format_documents_list, ) documents = response.get("data", []) return _format_documents_list(documents, "Archived Documents") except OutlineClientError as e: return f"Error listing archived documents: {str(e)}" except Exception as e: return f"Unexpected error: {str(e)}"
- src/mcp_outline/features/documents/__init__.py:50-50 (registration)Registration of the document_lifecycle module's tools, including list_archived_documents, by calling register_tools(mcp) within the documents feature register function.document_lifecycle.register_tools(mcp)
- _format_documents_list helper function that formats the list of archived documents (or trash) into a human-readable markdown string with titles, IDs, and update times.def _format_documents_list(documents: List[Dict[str, Any]], title: str) -> str: """Format a list of documents into readable text.""" if not documents: return f"No {title.lower()} found." output = f"# {title}\n\n" for i, document in enumerate(documents, 1): doc_title = document.get("title", "Untitled") doc_id = document.get("id", "") updated_at = document.get("updatedAt", "") output += f"## {i}. {doc_title}\n" output += f"ID: {doc_id}\n" if updated_at: output += f"Last Updated: {updated_at}\n" output += "\n" return output