swit-message-comment-list
Fetch comments associated with a specific message in Swit workspaces using message ID. Supports pagination to manage large datasets efficiently.
Instructions
Retrieve list of comments on message
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| message_id | Yes | ||
| offset | No |
Implementation Reference
- src/handlers/core.handlers.ts:31-34 (handler)The handler function that implements the core logic for 'swit-message-comment-list': validates args with MessageCommentListArgsSchema and calls switClient.listMessageComments.export const handleMessageCommentList = async (switClient: SwitClient, args: any) => { const validatedArgs = MessageCommentListArgsSchema.parse(args); return await switClient.listMessageComments(validatedArgs); };
- src/schemas.ts:95-99 (schema)Zod schema for input validation of the tool: requires message_id, optional pagination params.export const MessageCommentListArgsSchema = z.object({ message_id: z.string(), offset: z.string().optional(), limit: z.number().min(1).max(100).optional(), });
- src/tools/core.tools.ts:32-36 (schema)Tool specification object defining name, description, and input JSON schema for MCP protocol.{ name: 'swit-message-comment-list', description: 'Retrieve list of comments on message', inputSchema: zodToJsonSchema(MessageCommentListArgsSchema), },
- src/handlers/core.handlers.ts:46-46 (registration)Registers the tool name to its handler function in the coreHandlers factory.'swit-message-comment-list': (args: any) => handleMessageCommentList(switClient, args),
- src/index.ts:109-109 (registration)Merges coreHandlers (containing this tool) into the server's global toolHandlers.toolHandlers = { ...oauthHandlers(oauthWebServer), ...coreHandlers(switClient) };