Skip to main content
Glama

twist_inbox_archive

Archive specific threads in Twist workspaces by providing the thread ID. Use this tool to declutter and organize your Twist inbox efficiently.

Instructions

Archives a thread.

Args: id: The ID of the thread to archive

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes

Implementation Reference

  • The main handler function for the 'twist_inbox_archive' tool. It takes a thread ID and sends a POST request to the Twist API's inbox/archive endpoint to archive the specified thread.
    def twist_inbox_archive( ctx: Context, id: int ) -> str: """Archives a thread. Args: id: The ID of the thread to archive """ token = ctx.request_context.lifespan_context.twist_token params = {"id": id} try: logger.info(f"Archiving thread with ID: {id}") result = twist_request("inbox/archive", params=params, token=token, method="POST") logger.info(f"Successfully archived thread with ID: {id}") return f"Successfully archived thread with ID: {id}" except Exception as error: logger.error(f"Error archiving thread: {error}") return f"Error archiving thread: {str(error)}"
  • main.py:42-48 (registration)
    Dynamic registration loop that registers all functions starting with 'twist_' from src.inbox (including twist_inbox_archive) and src.threads modules as MCP tools using FastMCP.tool() decorator.
    # 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