swit-workspace-list
Retrieve and manage Swit workspaces to organize team collaboration projects and access workspace data for integration purposes.
Instructions
Retrieve list of workspaces
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| offset | No | ||
| limit | No | ||
| name | No |
Implementation Reference
- src/handlers/core.handlers.ts:11-14 (handler)The handler function that executes the swit-workspace-list tool logic: validates input args and calls switClient.listWorkspaces.export const handleWorkspaceList = async (switClient: SwitClient, args: any) => { const validatedArgs = WorkspaceListArgsSchema.parse(args); return await switClient.listWorkspaces(validatedArgs); };
- src/schemas.ts:10-14 (schema)Zod schema for input validation of swit-workspace-list tool arguments.export const WorkspaceListArgsSchema = z.object({ offset: z.string().optional(), limit: z.number().min(1).max(100).optional(), name: z.string().optional(), });
- src/tools/core.tools.ts:12-16 (registration)Tool registration in coreTools array, defining name, description, and input schema for ListTools request.{ name: 'swit-workspace-list', description: 'Retrieve list of workspaces', inputSchema: zodToJsonSchema(WorkspaceListArgsSchema), },
- src/handlers/core.handlers.ts:41-48 (registration)Handler factory function that registers the mapping from tool name 'swit-workspace-list' to its handler.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), });