Skip to main content
Glama
mikemc
by mikemc

twist_threads_clear_unread

Clear unread threads in your Twist workspace to manage your inbox and reduce notification clutter.

Instructions

Clears unread threads in workspace.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function that implements the tool logic by making a POST request to the Twist API endpoint 'threads/clear_unread' to clear unread threads in the specified workspace.
    def twist_threads_clear_unread(
        ctx: Context
    ) -> str:
        """Clears unread threads in workspace.
        """
        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"Clearing unread threads for workspace ID: {workspace_id}")
            twist_request("threads/clear_unread", params=params, token=token, method="POST")
            logger.info("Successfully cleared unread threads")
            return "Successfully cleared unread threads"
        except Exception as error:
            logger.error(f"Error clearing unread threads: {error}")
            return f"Error clearing unread threads: {str(error)}"
  • main.py:43-47 (registration)
    Dynamic registration loop that registers all functions starting with 'twist_' from src.inbox and src.threads modules as MCP tools, including twist_threads_clear_unread.
    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)
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. While 'Clears unread threads' implies a mutation operation, it doesn't specify whether this requires permissions, affects other users, is reversible, or has side effects. The description lacks critical behavioral context for a tool that modifies thread states.

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 extremely concise with a single sentence that directly states the tool's purpose. There is zero wasted language, and it's front-loaded with the core action. Every word earns its place.

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

Completeness2/5

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

Given that this is a mutation tool with no annotations and no output schema, the description is incomplete. It doesn't explain what 'clears' means operationally, what the tool returns, or how it differs from similar sibling tools. For a tool that likely modifies thread states, more context is needed.

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 tool has 0 parameters, and schema description coverage is 100%, so there are no parameters to document. The description doesn't need to compensate for any parameter gaps, earning a baseline score of 4 for this dimension.

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

Purpose4/5

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

The description clearly states the action ('Clears') and resource ('unread threads in workspace'), providing a specific verb+resource combination. However, it doesn't distinguish this tool from sibling tools like 'twist_threads_mark_all_read' or 'twist_threads_mark_read', which likely serve similar unread management purposes.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. With siblings like 'twist_threads_mark_all_read' and 'twist_threads_mark_read', it's unclear whether this tool clears unread status for all threads, specific threads, or has other differentiating behavior. No context or exclusions are mentioned.

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

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