admin_disconnect_account
Permanently disconnect a LinkedIn account. Provide the account UUID to remove access; reconnection requires starting from scratch.
Instructions
Disconnect a LinkedIn account. This action is irreversible — the account must be reconnected from scratch.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| accountId | Yes | UUID of the account to disconnect |
Implementation Reference
- Handler that executes the disconnect logic by calling admin.accounts.disconnect(args)
public override async execute({ admin, args, }: { admin: LinkedApiAdmin; args: TDisconnectParams; }): Promise<void> { await admin.accounts.disconnect(args); } - Zod schema validating the input requires a single 'accountId' string field
protected readonly schema = z.object({ accountId: z.string(), }); - MCP Tool definition with name, description, and input schema (JSON Schema format)
public override getTool(): Tool { return { name: this.name, description: 'Disconnect a LinkedIn account. This action is irreversible — the account must be reconnected from scratch.', inputSchema: { type: 'object', properties: { accountId: { type: 'string', description: 'UUID of the account to disconnect', }, }, required: ['accountId'], }, }; - src/linked-api-tools.ts:80-91 (registration)Registration of AdminDisconnectAccountTool in the adminTools array
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 base class AdminTool that provides the validate method and defines the contract for execute and getTool
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>; }