get_connections
Retrieve your complete LinkedIn connections list. Access your network data for analysis and management.
Instructions
Retrieve your complete LinkedIn connections list
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_connections"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/services/client.service.ts:227-229 (handler)Actual implementation of get_connections. Makes a GET request to '/connections?start=0&count=100' and returns a typed ConnectionsResult.
public async getConnections(): Promise<ConnectionsResult> { return this.makeRequest<ConnectionsResult>('get', '/connections?start=0&count=100') } - src/server.ts:177-192 (registration)Registers the 'get-connections' tool on the MCP server with empty params schema and a handler that calls clientService.getConnections().
// Get Connections Tool this.server.tool( 'get-connections', 'Retrieve the current user connections', linkedinApiSchemas.emptyParams, async () => { this.logger.info('Retrieving User Connections') try { const connections = await this.clientService.getConnections() return this.createResourceResponse(connections) } catch (error) { this.logger.error('User Connections Retrieval Failed', error) throw error } } ) - src/schemas/linkedin.schema.ts:9-13 (schema)Defines emptyParams schema (empty object) used by get-connections tool since it requires no input parameters.
export const linkedinApiSchemas = { /** * Empty parameters schema for endpoints without required parameters */ emptyParams: {}, - src/types/linkedin.d.ts:120-133 (helper)TypeScript type definition for ConnectionsResult returned by getConnections(). Contains connections array with id, firstName, lastName, headline, profilePicture and paging info (count, start, total).
export interface ConnectionsResult { connections: { id: string firstName: string lastName: string headline?: string profilePicture?: ProfilePicture }[] paging: { count: number start: number total: number } }