Skip to main content
Glama
mikemc
by mikemc

twist_inbox_unarchive

Restore archived threads to your active inbox in Twist workspaces using thread IDs. Manage your workflow by bringing important conversations back into view.

Instructions

Unarchives a thread.

Args: id: The ID of the thread to unarchive

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes

Implementation Reference

  • The handler function that executes the unarchive logic by calling the Twist API to unarchive a thread by its ID.
    def twist_inbox_unarchive(
        ctx: Context,
        id: int
    ) -> str:
        """Unarchives a thread.
    
        Args:
            id: The ID of the thread to unarchive
        """
        token = ctx.request_context.lifespan_context.twist_token
    
        params = {"id": id}
    
        try:
            logger.info(f"Unarchiving thread with ID: {id}")
    
            result = twist_request("inbox/unarchive", params=params, token=token, method="POST")
    
            logger.info(f"Successfully unarchived thread with ID: {id}")
            return f"Successfully unarchived thread with ID: {id}"
        except Exception as error:
            logger.error(f"Error unarchiving thread: {error}")
            return f"Error unarchiving thread: {str(error)}"
  • main.py:42-48 (registration)
    Dynamic registration of all twist_* functions from inbox and threads modules as MCP tools using FastMCP.
    # Register all tools from tool modules
    for module in [src.inbox, src.threads]:
        for name, func in inspect.getmembers(module, inspect.isfunction):
            if name.startswith('twist_') and func.__module__ == module.__name__:
                logger.info(f"Registering tool: {name}")
                mcp.tool()(func)

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/mikemc/twist-mcp-server'

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