Skip to main content
Glama

get_linkedin_user_reactions

Retrieve LinkedIn user reactions by providing a user URN to access engagement metrics and social interactions on the platform.

Instructions

Get LinkedIn reactions for a user by URN (must include prefix, example: fsd_profile:ACoAA...)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
countNoMax reactions
timeoutNoTimeout in seconds
urnYesUser URN (must include prefix, example: fsd_profile:ACoAA...)

Implementation Reference

  • The primary handler implementation for the 'get_linkedin_user_reactions' tool. Registers the tool with MCP server, defines input schema using Zod, normalizes and validates user URN, calls the AnySite API endpoint for user reactions, and returns formatted JSON response or error.
      "get_linkedin_user_reactions",
      "Get LinkedIn reactions for a user by URN",
      {
        urn: z.string().describe("User URN (must include prefix, example: fsd_profile:ACoAA...)"),
        count: z.number().default(10).describe("Max reactions"),
        timeout: z.number().default(300).describe("Timeout in seconds")
      },
      async ({ urn, count, timeout }) => {
        const normalizedURN = normalizeUserURN(urn);
        if (!isValidUserURN(normalizedURN)) {
          return {
            content: [{ type: "text", text: "Invalid URN format. Must start with 'fsd_profile:'" }],
            isError: true
          };
        }
        log("Starting LinkedIn user reactions lookup for urn:", normalizedURN);
        const requestData = { timeout, urn: normalizedURN, count };
        try {
          const response = await makeRequest(API_CONFIG.ENDPOINTS.LINKEDIN_USER_REACTIONS, requestData);
          return {
            content: [{ type: "text", text: JSON.stringify(response, null, 2) }]
          };
        } catch (error) {
          log("LinkedIn user reactions lookup error:", error);
          return {
            content: [{ type: "text", text: `LinkedIn user reactions API error: ${formatError(error)}` }],
            isError: true
          };
        }
      }
    );
  • TypeScript interface defining the expected input arguments for the get_linkedin_user_reactions tool, matching the Zod schema used in the handler.
    export interface LinkedinUserReactionsArgs {
      urn: string;
      count?: number;
      timeout?: number;
    }
  • Type guard validation function for LinkedinUserReactionsArgs input type, ensuring proper structure and types before handler execution.
    export function isValidLinkedinUserReactionsArgs(
      args: unknown
    ): args is LinkedinUserReactionsArgs {
      if (typeof args !== "object" || args === null) return false;
      const obj = args as Record<string, unknown>;
      if (typeof obj.urn !== "string" || !obj.urn.trim()) return false;
      if (obj.count !== undefined && typeof obj.count !== "number") return false;
      if (obj.timeout !== undefined && typeof obj.timeout !== "number") return false;
      return true;
    }
  • Helper function used by the tool handler to normalize LinkedIn user URNs by ensuring the 'fsd_profile:' prefix is present.
    const normalizeUserURN = (urn: string): string => {
      if (!urn.includes("fsd_profile:")) {
        return `fsd_profile:${urn}`;
      }
      return urn;
  • API endpoint configuration constant used by the makeRequest helper to call the AnySite backend for fetching user reactions.
    LINKEDIN_USER_REACTIONS: "/api/linkedin/user/reactions",
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It only states what the tool does and the URN format, lacking details on permissions needed, rate limits, error handling, response format, or whether it's a read-only operation (implied by 'Get' but not explicit). For a tool with potential API constraints, this is insufficient transparency.

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

Conciseness5/5

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

The description is a single, efficient sentence that front-loads the core purpose and includes a critical example for the URN. There is no wasted verbiage, and it directly addresses the essential information needed to invoke the tool, making it highly concise and well-structured.

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

Completeness2/5

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

Given the lack of annotations and output schema, the description is incomplete for a tool with three parameters and no behavioral context. It doesn't explain what 'reactions' entail (e.g., types, data structure), how results are returned, or any operational constraints. For a social media data tool, this leaves significant gaps in understanding its full context and usage.

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 input schema fully documents parameters (urn, count, timeout). The description adds minimal value by reiterating the URN format example from the schema but doesn't provide additional context like URN sourcing, count/timeout implications, or default behaviors. This meets the baseline for high schema coverage without enhancing parameter understanding.

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 tool's purpose: 'Get LinkedIn reactions for a user by URN'. It specifies the verb ('Get'), resource ('LinkedIn reactions'), and target ('user by URN'), making the function unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'get_linkedin_post_reactions', which targets posts rather than users, though this distinction is implied by the name.

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 provides no guidance on when to use this tool versus alternatives. It mentions the URN requirement but doesn't clarify scenarios for choosing this over other LinkedIn tools (e.g., 'get_linkedin_user_posts' or 'get_linkedin_post_reactions'), prerequisites like authentication, or limitations such as data availability. This leaves the agent without contextual usage cues.

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