Documentation
¶
Overview ¶
Package twchat exposes a small set of Teamwork Chat API endpoints as MCP tools. The Chat API is served at /chat/v7/... on the same installation host as the Projects API and authenticates with the same bearer token, so these tools reuse the shared twapi.Engine instead of a dedicated SDK.
Index ¶
- Constants
- func ConversationGet(engine *twapi.Engine) toolsets.ToolWrapper
- func ConversationList(engine *twapi.Engine) toolsets.ToolWrapper
- func CurrentUserGet(engine *twapi.Engine) toolsets.ToolWrapper
- func DMGetOrCreate(engine *twapi.Engine) toolsets.ToolWrapper
- func DefaultToolsetGroup(readOnly bool, engine *twapi.Engine) *toolsets.ToolsetGroup
- func MessageList(engine *twapi.Engine) toolsets.ToolWrapper
- func MessageSend(engine *twapi.Engine) toolsets.ToolWrapper
- func PeopleList(engine *twapi.Engine) toolsets.ToolWrapper
- func SendDM(engine *twapi.Engine) toolsets.ToolWrapper
Constants ¶
const ( // MethodCurrentUserGet retrieves the current authenticated chat user. MethodCurrentUserGet toolsets.Method = "twchat-get_current_user" // MethodConversationList lists conversations for the current user. MethodConversationList toolsets.Method = "twchat-list_conversations" // MethodConversationGet retrieves a single conversation. MethodConversationGet toolsets.Method = "twchat-get_conversation" // MethodMessageList lists messages within a conversation. MethodMessageList toolsets.Method = "twchat-list_messages" // MethodPeopleList lists people in the installation. MethodPeopleList toolsets.Method = "twchat-list_people" // MethodMessageSend posts a message to a conversation. MethodMessageSend toolsets.Method = "twchat-send_message" // MethodDMGetOrCreate resolves (or creates) the 1:1 conversation with a person. MethodDMGetOrCreate toolsets.Method = "twchat-get_or_create_dm" // MethodSendDM sends a direct message to a person. MethodSendDM toolsets.Method = "twchat-send_dm" )
Tool method names as exposed to MCP clients.
const ( // ToolsetChat covers reading conversations/messages/people and sending messages. ToolsetChat toolsets.Method = "twchat-chat" )
Sub-toolset key for twchat. This is the valid value for the -toolsets flag when selecting Teamwork Chat functionality.
Variables ¶
This section is empty.
Functions ¶
func ConversationGet ¶
func ConversationGet(engine *twapi.Engine) toolsets.ToolWrapper
ConversationGet retrieves a single Teamwork Chat conversation by ID.
func ConversationList ¶
func ConversationList(engine *twapi.Engine) toolsets.ToolWrapper
ConversationList lists Teamwork Chat conversations for the current user.
func CurrentUserGet ¶
func CurrentUserGet(engine *twapi.Engine) toolsets.ToolWrapper
CurrentUserGet returns the current authenticated Teamwork Chat user.
func DMGetOrCreate ¶
func DMGetOrCreate(engine *twapi.Engine) toolsets.ToolWrapper
DMGetOrCreate resolves the 1:1 conversation with a person, creating it if it does not exist yet, and returns the conversation.
func DefaultToolsetGroup ¶
func DefaultToolsetGroup(readOnly bool, engine *twapi.Engine) *toolsets.ToolsetGroup
DefaultToolsetGroup creates a default ToolsetGroup for Teamwork Chat. Write tools (send_message) are skipped automatically when readOnly is true.
func MessageList ¶
func MessageList(engine *twapi.Engine) toolsets.ToolWrapper
MessageList lists messages within a Teamwork Chat conversation.
func MessageSend ¶
func MessageSend(engine *twapi.Engine) toolsets.ToolWrapper
MessageSend posts a message to a Teamwork Chat conversation.
func PeopleList ¶
func PeopleList(engine *twapi.Engine) toolsets.ToolWrapper
PeopleList lists people in the Teamwork Chat installation.
Types ¶
This section is empty.