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)
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states the action but lacks critical behavioral details: it doesn't mention permissions required, whether unarchiving is reversible, what happens to thread visibility or notifications, or if there are rate limits. For a mutation tool with zero annotation coverage, this leaves significant gaps in understanding its effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core action in the first sentence, followed by a brief parameter explanation. It's efficient with no wasted words, though the structure could be slightly improved by integrating the parameter info more seamlessly rather than as a separate 'Args:' section.

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 the complexity of a mutation tool with no annotations and no output schema, the description is incomplete. It lacks details on behavioral traits, error conditions, return values, and how it fits with sibling tools. For a tool that modifies thread state, this leaves too much undefined for reliable agent use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds minimal semantics beyond the input schema: it specifies that 'id' is 'The ID of the thread to unarchive,' which clarifies the parameter's purpose. However, with 0% schema description coverage and only one parameter, this is adequate but not insightful—it doesn't explain ID format or sourcing, leaving room for improvement.

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 verb ('Unarchives') and resource ('a thread'), making the purpose immediately understandable. However, it doesn't differentiate from its sibling 'twist_inbox_archive' beyond the obvious opposite action, missing an opportunity to clarify the relationship between archiving and unarchiving in this specific system.

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?

No guidance is provided on when to use this tool versus alternatives. With siblings like 'twist_inbox_get' and 'twist_threads_getone' that might retrieve thread status, there's no indication of prerequisites (e.g., whether the thread must be archived first) or context for when unarchiving is appropriate versus other actions like moving or updating threads.

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