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",
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions the Account ID source but lacks details on permissions, rate limits, pagination, error handling, or what the returned list contains. For a read operation with zero annotation coverage, this leaves significant gaps in understanding how the tool behaves.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that states the core purpose upfront. It avoids unnecessary words, though it could be slightly more structured by separating the authentication note into a second sentence for clarity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (a read operation with three parameters), no annotations, and no output schema, the description is minimally adequate. It covers the basic action and authentication but lacks details on return values, error cases, or behavioral constraints, leaving room for improvement in completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents the three parameters (connected_after, count, timeout). The description adds no additional parameter information beyond what's in the schema, such as date format examples or usage tips. With high schema coverage, the baseline score of 3 is appropriate as the description doesn't compensate but also doesn't need to.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Get list') and resource ('LinkedIn conversations from the messaging interface'), making the purpose understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_linkedin_chat_messages' or 'get_linkedin_user_connections', which might also retrieve conversation-related data, leaving some ambiguity about scope.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description mentions that 'Account ID is taken from environment,' which provides some context about authentication, but it offers no guidance on when to use this tool versus alternatives like 'get_linkedin_chat_messages' or other LinkedIn tools. There are no explicit when/when-not instructions or named alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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