Skip to main content
Glama

swit-message-comment-create

Add comments to messages in Swit workspaces to provide feedback, ask questions, or share information directly within conversations.

Instructions

Create comment on message

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
message_idYes
contentYes
body_typeNoplain
assetsNo
external_asset_typeNo

Implementation Reference

  • The main handler function for the 'swit-message-comment-create' tool. It validates the input arguments using MessageCommentCreateArgsSchema and delegates to SwitClient.createMessageComment.
    export const handleMessageCommentCreate = async (switClient: SwitClient, args: any) => { const validatedArgs = MessageCommentCreateArgsSchema.parse(args); return await switClient.createMessageComment(validatedArgs); };
  • Zod schema defining the input arguments for creating a message comment: requires message_id and content, optional body_type, assets, external_asset_type.
    export const MessageCommentCreateArgsSchema = z.object({ message_id: z.string(), content: z.string(), body_type: z.enum(['plain', 'markdown']).default('plain').optional(), assets: z.record(z.any()).optional(), external_asset_type: z.string().optional(), });
  • Tool metadata registration including name, description, and input schema (converted to JSON schema for MCP).
    { name: 'swit-message-comment-create', description: 'Create comment on message', inputSchema: zodToJsonSchema(MessageCommentCreateArgsSchema), },
  • Maps the tool name to its handler function within the coreHandlers factory.
    'swit-message-comment-create': (args: any) => handleMessageCommentCreate(switClient, args),
  • The SwitClient method that performs the actual API call to create a message comment via POST to /api/message.comment.create.
    async createMessageComment( args: MessageCommentCreateArgs ): Promise<MessageCommentCreateResponse> { const response = await this.client.post('/api/message.comment.create', args); return response.data; }

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/TykanN/swit-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server