Skip to main content
Glama

get_linkedin_post_reactions

Retrieve LinkedIn post reactions by providing the post URN to analyze engagement metrics and user interactions with the content.

Instructions

Get LinkedIn reactions for a post by URN

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
countYesMax reactions to return
timeoutNoTimeout in seconds
urnYesPost URN, only activity urn type is allowed (example: activity:7234173400267538433)

Implementation Reference

  • src/index.ts:525-549 (registration)
    Registration of the 'get_linkedin_post_reactions' tool, including inline Zod schema and handler function that calls the AnySite API.
    server.tool(
      "get_linkedin_post_reactions",
      "Get LinkedIn post reactions",
      {
        urn: z.string().describe("Post URN"),
        count: z.number().default(50).describe("Max reactions"),
        timeout: z.number().default(300).describe("Timeout in seconds")
      },
      async ({ urn, count, timeout }) => {
        const requestData = { timeout, urn, count };
        log(`Starting LinkedIn post reactions lookup for: ${urn}`);
        try {
          const response = await makeRequest(API_CONFIG.ENDPOINTS.LINKEDIN_POST_REACTIONS, requestData);
          return {
            content: [{ type: "text", text: JSON.stringify(response, null, 2) }]
          };
        } catch (error) {
          log("LinkedIn post reactions lookup error:", error);
          return {
            content: [{ type: "text", text: `LinkedIn post reactions API error: ${formatError(error)}` }],
            isError: true
          };
        }
      }
    );
  • The core handler function that prepares the request data and calls makeRequest to the /api/linkedin/post/reactions endpoint, handles response or error.
    async ({ urn, count, timeout }) => {
      const requestData = { timeout, urn, count };
      log(`Starting LinkedIn post reactions lookup for: ${urn}`);
      try {
        const response = await makeRequest(API_CONFIG.ENDPOINTS.LINKEDIN_POST_REACTIONS, requestData);
        return {
          content: [{ type: "text", text: JSON.stringify(response, null, 2) }]
        };
      } catch (error) {
        log("LinkedIn post reactions lookup error:", error);
        return {
          content: [{ type: "text", text: `LinkedIn post reactions API error: ${formatError(error)}` }],
          isError: true
        };
      }
  • Inline Zod schema defining input parameters: urn (string, Post URN), count (number, default 50), timeout (number, default 300).
    {
      urn: z.string().describe("Post URN"),
      count: z.number().default(50).describe("Max reactions"),
      timeout: z.number().default(300).describe("Timeout in seconds")
    },
  • TypeScript interface defining the arguments for get_linkedin_post_reactions.
    export interface GetLinkedinPostReactionsArgs {
      urn: string;
      count?: number;
      timeout?: number;
    }
  • TypeScript validation function for GetLinkedinPostReactionsArgs, checks urn contains 'activity:', numbers for count/timeout.
    export function isValidGetLinkedinPostReactionsArgs(
      args: unknown
    ): args is GetLinkedinPostReactionsArgs {
      if (typeof args !== "object" || args === null) return false;
      const obj = args as Record<string, unknown>;
      if (typeof obj.urn !== "string" || !obj.urn.includes("activity:")) return false;
      if (obj.count !== undefined && typeof obj.count !== "number") return false;
      if (obj.timeout !== undefined && typeof obj.timeout !== "number") return false;
      return true;
    }
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 states the action is to 'Get' reactions, implying a read-only operation, but does not disclose any behavioral traits such as rate limits, authentication needs, pagination, or what the return format looks like (e.g., list of reactions with details). For a tool with no annotations, this is a significant gap in 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 directly states the tool's purpose without unnecessary words. It is front-loaded and appropriately sized, with every part contributing to clarity, 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.

Completeness3/5

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

Given the tool's moderate complexity (3 parameters, no output schema, no annotations), the description is minimally adequate. It covers the basic purpose but lacks details on behavioral aspects, usage context, and return values. With no output schema, the description should ideally hint at the response format, but it does not, leaving gaps in completeness for effective agent use.

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?

The input schema has 100% description coverage, with clear documentation for 'count', 'timeout', and 'urn' parameters. The description adds no additional meaning beyond the schema, such as explaining URN format constraints or usage tips. Since schema coverage is high, the baseline score is 3, as the description does not compensate but also does not detract.

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' and the resource 'LinkedIn reactions for a post by URN', specifying it retrieves reactions for a LinkedIn post using a URN. However, it does not distinguish this from sibling tools like 'get_linkedin_post_comments' or 'get_linkedin_user_reactions', which handle related but different data types, so it lacks explicit sibling differentiation.

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, such as 'get_linkedin_post_comments' for comments or 'get_linkedin_user_reactions' for user-specific reactions. It mentions the URN requirement but does not clarify usage context, exclusions, or prerequisites, leaving the agent to infer based on tool names alone.

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