Skip to main content
Glama

unarchive_document

Restores archived documents to active status for reuse, access, and visibility in collections. Use to update or reference previously archived content by providing the document ID.

Instructions

    Restores a previously archived document to active status.
    
    Use this tool when you need to:
    - Restore archived documents to active use
    - Access or reference previously archived content
    - Make archived content visible in collections again
    - Update and reuse archived documents
    
    Args:
        document_id: The document ID to unarchive
        
    Returns:
        Result message confirming restoration
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
document_idYes

Implementation Reference

  • The main MCP tool handler function for unarchive_document. It uses get_outline_client to get the client and calls client.unarchive_document, then formats a success message or handles errors.
    @mcp.tool(
        annotations=ToolAnnotations(
            readOnlyHint=False, destructiveHint=False, idempotentHint=True
        )
    )
    async def unarchive_document(document_id: str) -> str:
        """
        Restores a previously archived document to active status.
    
        Use this tool when you need to:
        - Restore archived documents to active use
        - Access or reference previously archived content
        - Make archived content visible in collections again
        - Update and reuse archived documents
    
        Args:
            document_id: The document ID to unarchive
    
        Returns:
            Result message confirming restoration
        """
        try:
            client = await get_outline_client()
            document = await client.unarchive_document(document_id)
    
            if not document:
                return "Failed to unarchive document."
    
            doc_title = document.get("title", "Untitled")
    
            return f"Document unarchived successfully: {doc_title}"
        except OutlineClientError as e:
            return f"Error unarchiving document: {str(e)}"
        except Exception as e:
            return f"Unexpected error: {str(e)}"
  • The OutlineClient helper method that makes the actual API POST request to unarchive the document.
    async def unarchive_document(self, document_id: str) -> Dict[str, Any]:
        """
        Unarchive a document by ID.
    
        Args:
            document_id: The document ID to unarchive.
    
        Returns:
            The unarchived document data.
        """
        response = await self.post("documents.unarchive", {"id": document_id})
        return response.get("data", {})
  • The registration function that defines and registers the unarchive_document tool (and others) when called with an MCP server instance.
    def register_tools(mcp) -> None:
        """
        Register document lifecycle tools with the MCP server.
    
        Args:
            mcp: The FastMCP server instance
        """
        disable_delete = os.getenv("OUTLINE_DISABLE_DELETE", "").lower() in (
            "true",
            "1",
            "yes",
        )
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It discloses the behavioral outcome ('restores to active status') and implies a mutation (since it changes document state), but lacks details on permissions, side effects, or error conditions. It adds basic context but misses operational specifics like rate limits or authentication needs.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with a purpose statement, usage guidelines in bullet points, and parameter/return sections. Every sentence adds value without redundancy, and it's front-loaded with the core functionality. The formatting enhances readability without unnecessary verbosity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (single parameter mutation), no annotations, and no output schema, the description is reasonably complete. It covers purpose, usage, parameters, and returns, but could improve by detailing error cases or behavioral nuances. It adequately supports agent invocation for this straightforward operation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 0%, so the description must compensate. It explicitly documents the single parameter ('document_id: The document ID to unarchive'), adding clear meaning beyond the schema's minimal title. However, it doesn't specify format constraints or examples, leaving some ambiguity.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Restores') and resource ('a previously archived document'), distinguishing it from sibling tools like 'archive_document' (opposite action) and 'restore_document' (likely for trash recovery). It precisely defines the tool's function without being tautological.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit usage scenarios in a bulleted list (e.g., 'Restore archived documents to active use', 'Make archived content visible in collections again'), clearly indicating when to use this tool. It differentiates from alternatives by focusing on archived documents rather than trash or active documents.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Related Tools

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

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