Skip to main content
Glama

swit-message-comment-list

Retrieve comments on a specific message in Swit collaboration tools to view discussions and track feedback.

Instructions

Retrieve list of comments on message

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
message_idYes
offsetNo
limitNo

Implementation Reference

  • The primary handler function for the 'swit-message-comment-list' tool. Validates input arguments using Zod schema and delegates to SwitClient's listMessageComments method.
    export const handleMessageCommentList = async (switClient: SwitClient, args: any) => { const validatedArgs = MessageCommentListArgsSchema.parse(args); return await switClient.listMessageComments(validatedArgs); };
  • Zod schema defining the input arguments for the tool: requires message_id, optional offset and limit for pagination.
    export const MessageCommentListArgsSchema = z.object({ message_id: z.string(), offset: z.string().optional(), limit: z.number().min(1).max(100).optional(), });
  • Registration of tool handlers, mapping 'swit-message-comment-list' to its handler function.
    export const coreHandlers = (switClient: SwitClient) => ({ 'swit-workspace-list': (args: any) => handleWorkspaceList(switClient, args), 'swit-channel-list': (args: any) => handleChannelList(switClient, args), 'swit-message-create': (args: any) => handleMessageCreate(switClient, args), 'swit-message-comment-create': (args: any) => handleMessageCommentCreate(switClient, args), 'swit-message-comment-list': (args: any) => handleMessageCommentList(switClient, args), 'swit-project-list': (args: any) => handleProjectList(switClient, args), });
  • src/index.ts:109-109 (registration)
    Final registration of all tool handlers into the MCP server's toolHandlers map after initialization.
    toolHandlers = { ...oauthHandlers(oauthWebServer), ...coreHandlers(switClient) };
  • Tool metadata definition including name, description, and input JSON schema for listTools endpoint.
    { name: 'swit-message-comment-list', description: 'Retrieve list of comments on message', inputSchema: zodToJsonSchema(MessageCommentListArgsSchema), },
  • Underlying SwitClient method that performs the actual API call to retrieve message comments.
    async listMessageComments(args: MessageCommentListArgs): Promise<MessageCommentListResponse> { const response = await this.client.get('/api/message.comment.list', { params: 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