Skip to main content
Glama

swit-channel-list

Retrieve channel lists from Swit workspaces to organize team communication. Filter by type, activity, disclosure, or name to find specific channels.

Instructions

Retrieve list of channels

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workspace_idYes
offsetNo
limitNo
typeNo
activityNo
disclosureNo
nameNo

Implementation Reference

  • Main handler function for the 'swit-channel-list' MCP tool. Validates input arguments and calls SwitClient.listChannels.
    export const handleChannelList = async (switClient: SwitClient, args: any) => { const validatedArgs = ChannelListArgsSchema.parse(args); return await switClient.listChannels(validatedArgs); };
  • SwitClient method that performs the actual API call to list channels via axios GET /api/channel.list.
    async listChannels(args: ChannelListArgs): Promise<ChannelListResponse> { const response = await this.client.get('/api/channel.list', { params: args }); return response.data; }
  • Zod schema defining the input arguments for listing channels (workspace_id required, pagination and filters optional).
    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(), });
  • MCP tool metadata: name, description, and input schema (JSON schema from Zod).
    { name: 'swit-channel-list', description: 'Retrieve list of channels', inputSchema: zodToJsonSchema(ChannelListArgsSchema), },
  • Factory registering 'swit-channel-list' handler among core handlers, used by main server.
    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), });

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