Skip to main content
Glama

get_linkedin_conversations

Retrieve LinkedIn messaging conversations from your account with optional filters for date range and conversation count to manage professional communications.

Instructions

Get list of LinkedIn conversations from the messaging interface. Account ID is taken from environment.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
connected_afterNoFilter conversations created after the specified date (timestamp)
countNoMax conversations to return
timeoutNoTimeout in seconds

Implementation Reference

  • Full MCP tool registration, schema, and handler implementation for 'get_linkedin_conversations'. Fetches LinkedIn conversations for the account via AnySite API, supports filtering by company and timestamp.
    server.tool( "get_linkedin_conversations", "Get LinkedIn conversations (requires ACCOUNT_ID)", { company: z.string().optional().describe("Company URN"), connected_after: z.number().optional().describe("Filter after timestamp"), count: z.number().default(20).describe("Max conversations"), timeout: z.number().default(300).describe("Timeout in seconds") }, async ({ company, connected_after, count, timeout }) => { const requestData: any = { timeout, account_id: ACCOUNT_ID, count }; if (company) requestData.company = company; if (connected_after != null) { requestData.connected_after = connected_after; } log("Starting LinkedIn conversations lookup"); try { const response = await makeRequest(API_CONFIG.ENDPOINTS.CONVERSATIONS, requestData); return { content: [{ type: "text", text: JSON.stringify(response, null, 2) }] }; } catch (error) { log("LinkedIn conversations lookup error:", error); return { content: [{ type: "text", text: `LinkedIn conversations API error: ${formatError(error)}` }], isError: true }; } } );
  • src/index.ts:1028-1057 (registration)
    MCP server.tool registration for the 'get_linkedin_conversations' tool.
    server.tool( "get_linkedin_conversations", "Get LinkedIn conversations (requires ACCOUNT_ID)", { company: z.string().optional().describe("Company URN"), connected_after: z.number().optional().describe("Filter after timestamp"), count: z.number().default(20).describe("Max conversations"), timeout: z.number().default(300).describe("Timeout in seconds") }, async ({ company, connected_after, count, timeout }) => { const requestData: any = { timeout, account_id: ACCOUNT_ID, count }; if (company) requestData.company = company; if (connected_after != null) { requestData.connected_after = connected_after; } log("Starting LinkedIn conversations lookup"); try { const response = await makeRequest(API_CONFIG.ENDPOINTS.CONVERSATIONS, requestData); return { content: [{ type: "text", text: JSON.stringify(response, null, 2) }] }; } catch (error) { log("LinkedIn conversations lookup error:", error); return { content: [{ type: "text", text: `LinkedIn conversations API error: ${formatError(error)}` }], isError: true }; } } );
  • Zod input schema for the tool parameters.
    { company: z.string().optional().describe("Company URN"), connected_after: z.number().optional().describe("Filter after timestamp"), count: z.number().default(20).describe("Max conversations"), timeout: z.number().default(300).describe("Timeout in seconds") },
  • API endpoint configuration referenced by the tool handler.
    CONVERSATIONS: "/api/linkedin/management/conversations",

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/anysiteio/hdw-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server