Skip to main content
Glama

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)}"

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