Skip to main content
Glama

swit-channel-list

Retrieve a filtered list of channels from Swit workspaces by specifying workspace ID, channel type, activity, disclosure, and name. Integrate with Swit MCP Server for efficient channel management.

Instructions

Retrieve list of channels

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
activityNo
disclosureNo
limitNo
nameNo
offsetNo
typeNo
workspace_idYes

Implementation Reference

  • The main handler function for the 'swit-channel-list' tool. It validates the input arguments using ChannelListArgsSchema and calls SwitClient.listChannels to execute the logic.
    export const handleChannelList = async (switClient: SwitClient, args: any) => { const validatedArgs = ChannelListArgsSchema.parse(args); return await switClient.listChannels(validatedArgs); };
  • Zod schema defining the input arguments for the 'swit-channel-list' tool.
    export const ChannelListArgsSchema = z.object({ workspace_id: z.string(), offset: z.string().optional(), limit: z.number().min(1).max(100).optional(), type: z.string().optional(), activity: z.string().optional(), disclosure: z.string().optional(), name: z.string().optional(), });
  • Tool specification registration including name, description, and input schema for listTools request.
    { name: 'swit-channel-list', description: 'Retrieve list of channels', inputSchema: zodToJsonSchema(ChannelListArgsSchema), },
  • Factory function that registers the handler functions for core tools, including 'swit-channel-list', used in main server setup.
    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), });
  • Supporting utility in SwitClient that makes the actual API request to retrieve the list of channels.
    async listChannels(args: ChannelListArgs): Promise<ChannelListResponse> { const response = await this.client.get('/api/channel.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