Skip to main content
Glama
mikemc
by mikemc

twist_threads_pin

Pin important threads in Twist workspaces to keep them accessible and organized for team collaboration.

Instructions

Pins a thread.

Args: id: The id of the thread

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes

Implementation Reference

  • The main handler function for the 'twist_threads_pin' tool. It takes a thread ID, constructs parameters, and makes a POST request to the Twist API endpoint 'threads/pin' using the twist_request helper to pin the thread. Handles success and error cases with logging and returns a status message.
    def twist_threads_pin(
        ctx: Context,
        id: int
    ) -> str:
        """Pins 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"Pinning thread with ID: {id}")
            twist_request("threads/pin", params=params, token=token, method="POST")
            logger.info(f"Successfully pinned thread with ID: {id}")
            return f"Successfully pinned thread with ID: {id}"
        except Exception as error:
            logger.error(f"Error pinning thread: {error}")
            return f"Error pinning thread: {str(error)}"
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 only states the basic action ('Pins a thread'). It doesn't disclose behavioral traits such as permissions required, whether this is a destructive/mutative operation, rate limits, or what happens if the thread is already pinned. This leaves significant gaps for a mutation tool.

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

Conciseness3/5

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

The description is very brief with two sentences, but the second sentence ('Args: id: The id of the thread') is redundant with the schema and could be omitted for better conciseness. The first sentence is clear but under-specified, making it efficient but not optimally structured.

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 tool's complexity (a mutation operation with no annotations, no output schema, and low schema coverage), the description is incomplete. It doesn't explain what 'pinning' entails, the expected outcome, error conditions, or how it interacts with sibling tools, leaving the agent with insufficient context for reliable use.

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 description adds minimal but helpful context for the single parameter 'id' by specifying it's 'The id of the thread', which clarifies its purpose beyond the schema's basic type (integer). With 0% schema description coverage and only one parameter, this compensates adequately, though more detail on format or constraints would be beneficial.

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 ('Pins') and resource ('a thread'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'twist_threads_star' or 'twist_threads_unpin' which might have similar conceptual purposes but different effects.

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 like 'twist_threads_unpin' or 'twist_threads_star'. The description lacks context about prerequisites, effects, or typical use cases, leaving the agent without usage direction.

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