Skip to main content
Glama
mikemc
by mikemc

twist_threads_update

Modify an existing thread by updating its content, title, attachments, or mentions within Twist workspaces.

Instructions

Updates an existing thread.

Args: id: The id of the thread actions: List of action buttons to the thread attachments: List of attachments to the thread content: The content of the thread direct_group_mentions: The groups that are directly mentioned direct_mentions: The users that are directly mentioned title: The title of the thread

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
actionsNo
attachmentsNo
contentNo
direct_group_mentionsNo
direct_mentionsNo
titleNo

Implementation Reference

  • The core handler function for the 'twist_threads_update' tool. It collects parameters, authenticates using the context token, calls the Twist API 'threads/update' endpoint via twist_request, and handles success/error responses.
    def twist_threads_update(
        ctx: Context,
        id: int,
        actions: Optional[List[Dict[str, Any]]] = None,
        attachments: Optional[List[Dict[str, Any]]] = None,
        content: Optional[str] = None,
        direct_group_mentions: Optional[List[int]] = None,
        direct_mentions: Optional[List[int]] = None,
        title: Optional[str] = None
    ) -> Union[str, Dict[str, Any]]:
        """Updates an existing thread.
    
        Args:
            id: The id of the thread
            actions: List of action buttons to the thread
            attachments: List of attachments to the thread
            content: The content of the thread
            direct_group_mentions: The groups that are directly mentioned
            direct_mentions: The users that are directly mentioned
            title: The title 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"Updating thread with ID: {id}")
            thread_data = twist_request("threads/update", params=params, token=token, method="POST")
            logger.info(f"Updated thread with ID: {id}")
            return thread_data
        except Exception as error:
            logger.error(f"Error updating thread: {error}")
            return f"Error updating thread: {str(error)}"
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 'Updates an existing thread' which implies a mutation operation, but doesn't disclose behavioral traits like required permissions, whether updates are partial or complete, side effects (e.g., notifications), or error handling. 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.

Conciseness4/5

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

The description is appropriately sized and front-loaded with the core purpose in the first sentence. The parameter list is structured but could be more concise (e.g., combining related parameters). No redundant information is present, making it efficient overall.

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 a mutation tool with 7 parameters, 0% schema description coverage, no annotations, and no output schema, the description is incomplete. It covers parameters superficially but misses critical context like behavioral effects, error cases, and return values, leaving the agent under-informed for safe invocation.

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?

Schema description coverage is 0%, so the description must compensate. It lists all 7 parameters with brief explanations (e.g., 'id: The id of the thread', 'content: The content of the thread'), adding meaningful context beyond the schema's titles. However, it lacks details on formats (e.g., what 'actions' or 'attachments' objects contain) and defaults (parameters are nullable with defaults).

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

Purpose3/5

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

The description states 'Updates an existing thread' which provides a clear verb ('Updates') and resource ('thread'), but it's vague about what specifically gets updated. It doesn't distinguish this from sibling tools like twist_threads_add (creates new) or twist_threads_remove (deletes), though the verb 'Updates' implies modification rather than creation or deletion.

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., needing thread ID), compare to twist_threads_add for creation, or specify use cases like editing content versus adding attachments. Without this, the agent lacks context for tool selection.

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