admin_set_seats
Set the number of subscription seats for your LinkedIn API integration. Specify seat type (core or plus) and billing period. If no active subscription, a checkout link is returned; otherwise, seats update immediately.
Instructions
Set number of subscription seats. Returns checkout link if no active subscription, otherwise updates immediately.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| quantity | Yes | Number of seats (1-1000) | |
| seatType | Yes | Seat type. "plus" unlocks Sales Navigator actions. | |
| billingPeriod | Yes | Billing period |
Implementation Reference
- src/tools/admin-set-seats.ts:15-23 (handler)The execute method that calls admin.subscription.setSeats(args) to set subscription seats.
public override async execute({ admin, args, }: { admin: LinkedApiAdmin; args: TSetSeatsParams; }): Promise<TSetSeatsResult> { return await admin.subscription.setSeats(args); } - src/tools/admin-set-seats.ts:9-13 (schema)Zod schema defining input validation for quantity (int 1-1000), seatType (core|plus), and billingPeriod (month|year).
protected readonly schema = z.object({ quantity: z.number().int().min(1).max(1000), seatType: z.enum(['core', 'plus']), billingPeriod: z.enum(['month', 'year']), }); - src/tools/admin-set-seats.ts:7-83 (registration)The AdminSetSeatsTool class definition with name='admin_set_seats'.
export class AdminSetSeatsTool extends AdminTool<TSetSeatsParams, TSetSeatsResult> { public readonly name = 'admin_set_seats'; protected readonly schema = z.object({ quantity: z.number().int().min(1).max(1000), seatType: z.enum(['core', 'plus']), billingPeriod: z.enum(['month', 'year']), }); public override async execute({ admin, args, }: { admin: LinkedApiAdmin; args: TSetSeatsParams; }): Promise<TSetSeatsResult> { return await admin.subscription.setSeats(args); } public override getTool(): Tool { return { name: this.name, description: 'Set number of subscription seats. Returns checkout link if no active subscription, otherwise updates immediately.', inputSchema: { type: 'object', properties: { quantity: { type: 'number', description: 'Number of seats (1-1000)', }, seatType: { type: 'string', enum: ['core', 'plus'], description: 'Seat type. "plus" unlocks Sales Navigator actions.', }, billingPeriod: { type: 'string', enum: ['month', 'year'], description: 'Billing period', }, }, required: ['quantity', 'seatType', 'billingPeriod'], }, }; } } - src/linked-api-tools.ts:80-91 (registration)Registration of AdminSetSeatsTool in the adminTools array (line 83).
this.adminTools = [ new AdminGetSubscriptionStatusTool(), new AdminGetSeatsTool(), new AdminSetSeatsTool(), new AdminGetAccountsTool(), new AdminConnectAccountTool(), new AdminDisconnectAccountTool(), new AdminRegenerateTokenTool(), new AdminGetLimitsUsageTool(), new AdminSetLimitsTool(), new AdminResetLimitsTool(), ]; - src/utils/admin-tool.ts:5-22 (helper)Abstract AdminTool base class that AdminSetSeatsTool extends, providing validate() and requiring execute().
export abstract class AdminTool<TParams, TResult> { public abstract readonly name: string; protected abstract readonly schema: z.ZodSchema; public abstract getTool(): Tool; public validate(args: unknown): TParams { return this.schema.parse(args) as TParams; } public abstract execute({ admin, args, }: { admin: LinkedApiAdmin; args: TParams; }): Promise<TResult>; }