Skip to main content
Glama
mikemc
by mikemc

twist_threads_unpin

Remove a thread from pinned status in Twist workspaces by specifying its ID, helping users organize their workspace by managing pinned content.

Instructions

Unpins a thread.

Args: id: The id of the thread

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes

Implementation Reference

  • The handler function that executes the unpin logic by calling the Twist API 'threads/unpin' endpoint with the provided thread ID.
    def twist_threads_unpin(
        ctx: Context,
        id: int
    ) -> str:
        """Unpins a thread.
    
        Args:
            id: The id of the thread
        """
        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"Unpinning thread with ID: {id}")
            twist_request("threads/unpin", params=params, token=token, method="POST")
            logger.info(f"Successfully unpinned thread with ID: {id}")
            return f"Successfully unpinned thread with ID: {id}"
        except Exception as error:
            logger.error(f"Error unpinning thread: {error}")
            return f"Error unpinning thread: {str(error)}"
  • main.py:42-47 (registration)
    Dynamically discovers and registers all functions starting with 'twist_' from src.threads and src.inbox modules as MCP tools, including 'twist_threads_unpin'.
    # 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?

With no annotations provided, the description carries full burden but offers minimal behavioral insight. It states the action is 'unpins' which implies a mutation, but doesn't disclose permissions needed, whether it's reversible, side effects, or what happens if the thread isn't pinned. No rate limits or error conditions are mentioned.

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 appropriately brief with two sentences: a clear purpose statement followed by parameter documentation. It's front-loaded with the core action. The 'Args:' section is standard but could be integrated more seamlessly.

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?

For a mutation tool with no annotations, no output schema, and 0% schema description coverage, the description is insufficient. It doesn't explain what 'unpinning' means in this context, what the response looks like, error scenarios, or how it interacts with other thread states (e.g., starred, muted).

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?

Schema description coverage is 0%, so the description must compensate but only partially does. It documents the single parameter 'id' and states it's 'The id of the thread', which adds basic meaning. However, it doesn't explain format constraints, where to find thread IDs, or validation rules.

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 ('Unpins') and resource ('a thread'), making the purpose immediately understandable. It distinguishes from obvious opposites like 'twist_threads_pin' but doesn't explicitly differentiate from all sibling tools like 'twist_threads_remove' or 'twist_threads_update'.

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. The description doesn't mention prerequisites (e.g., thread must be pinned first), when not to use it, or how it relates to sibling tools like 'twist_threads_pin' or 'twist_threads_remove'.

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