twist_inbox_mark_all_read
Clear your Twist workspace inbox by marking all threads as read. Use this tool to maintain inbox organization and focus on unread messages.
Instructions
Marks all inbox threads in the workspace as read.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/inbox.py:148-171 (handler)The main handler function implementing the twist_inbox_mark_all_read tool. It retrieves the workspace ID from environment, makes a POST request to Twist API 'inbox/mark_all_read', and returns success or error message.def twist_inbox_mark_all_read( ctx: Context ) -> str: """Marks all inbox threads in the workspace as read. """ token = ctx.request_context.lifespan_context.twist_token workspace_id = os.getenv("TWIST_WORKSPACE_ID") if not workspace_id: logger.error("TWIST_WORKSPACE_ID environment variable is required") return "Error: TWIST_WORKSPACE_ID environment variable is required" params = {"workspace_id": workspace_id} try: logger.info(f"Marking all inbox threads as read for workspace ID: {workspace_id}") result = twist_request("inbox/mark_all_read", params=params, token=token, method="POST") logger.info("Successfully marked all inbox threads as read") return "Successfully marked all inbox threads as read" except Exception as error: logger.error(f"Error marking all inbox threads as read: {error}") return f"Error marking all inbox threads as read: {str(error)}"