get_workspace_seats
Retrieve details about user licenses in a ClickUp workspace, including seat allocation and availability.
Instructions
Get information about seats (user licenses) in a ClickUp workspace. Returns details about seat allocation and availability.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workspace_id | Yes | The ID of the workspace to get seats information for |
Implementation Reference
- src/tools/task-tools.ts:17-35 (handler)The MCP tool handler for 'get_workspace_seats'. It registers the tool with a Zod schema for workspace_id, calls authClient.getWorkspaceSeats(), and returns the result as JSON.
// Workspace and Auth tools server.tool( 'get_workspace_seats', 'Get information about seats (user licenses) in a ClickUp workspace. Returns details about seat allocation and availability.', { workspace_id: z.string().describe('The ID of the workspace to get seats information for') }, async ({ workspace_id }) => { try { const result = await authClient.getWorkspaceSeats(workspace_id); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; } catch (error: any) { console.error('Error getting workspace seats:', error); return { content: [{ type: 'text', text: `Error getting workspace seats: ${error.message}` }], isError: true }; } } - src/tools/task-tools.ts:21-21 (schema)Input schema for the 'get_workspace_seats' tool: workspace_id (string).
{ workspace_id: z.string().describe('The ID of the workspace to get seats information for') }, - src/clickup-client/auth.ts:288-304 (helper)The AuthClient.getWorkspaceSeats() method that calls the ClickUp API endpoint /team/{workspaceId}/seats to retrieve seat information.
async getWorkspaceSeats(workspaceId: string): Promise<{ members: object; filled_members_seats: number; total_member_seats: number; empty_member_seats: number; guests: object; filled_guest_seats: number; total_guest_seats: number; empty_guest_seats: number; }> { try { return await this.client.get(`/team/${workspaceId}/seats`); } catch (error) { console.error('Error getting workspace seats:', error); throw error; } } - src/tools/task-tools.ts:16-36 (registration)The tool is registered via server.tool() inside setupTaskTools(), which is called from src/index.ts setupTools().
export function setupTaskTools(server: McpServer): void { // Workspace and Auth tools server.tool( 'get_workspace_seats', 'Get information about seats (user licenses) in a ClickUp workspace. Returns details about seat allocation and availability.', { workspace_id: z.string().describe('The ID of the workspace to get seats information for') }, async ({ workspace_id }) => { try { const result = await authClient.getWorkspaceSeats(workspace_id); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; } catch (error: any) { console.error('Error getting workspace seats:', error); return { content: [{ type: 'text', text: `Error getting workspace seats: ${error.message}` }], isError: true }; } } );