twist_threads_mark_unread_for_others
Mark a Twist thread as unread for other users to ensure important messages receive attention. Specify a message index or mark the entire thread unread.
Instructions
Marks the thread as being unread for others.
Args: id: The id of the thread obj_index: The index of the last unread message. A value of -1 marks the whole thread as unread
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| obj_index | Yes |
Implementation Reference
- src/threads.py:371-393 (handler)The MCP tool handler function that executes the logic for marking a thread as unread for others by calling the Twist API.def twist_threads_mark_unread_for_others( ctx: Context, id: int, obj_index: int ) -> str: """Marks the thread as being unread for others. Args: id: The id of the thread obj_index: The index of the last unread message. A value of -1 marks the whole thread as unread """ all_params = locals() token = ctx.request_context.lifespan_context.twist_token params = {k: v for k, v in all_params.items() if k != 'ctx' and v is not None} try: logger.info(f"Marking thread with ID: {id} as unread for others from comment index: {obj_index}") twist_request("threads/mark_unread_for_others", params=params, token=token, method="POST") logger.info(f"Successfully marked thread with ID: {id} as unread for others") return f"Successfully marked thread with ID: {id} as unread for others from comment index: {obj_index}" except Exception as error: logger.error(f"Error marking thread as unread for others: {error}") return f"Error marking thread as unread for others: {str(error)}"