Skip to main content
Glama

get_linkedin_user_posts

Retrieve LinkedIn posts for specific users using their URN identifier to access and analyze professional content and updates.

Instructions

Get LinkedIn posts for a user by URN (must include prefix, example: fsd_profile:ACoAAEWn01QBWENVMWqyM3BHfa1A-xsvxjdaXsY)

Input Schema

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

Implementation Reference

  • Tool registration with inline Zod schema for input validation and async handler function that normalizes/validates URN, makes HTTPS POST request to AnySite API endpoint for LinkedIn user posts, and returns JSON response or formatted error.
    server.tool(
      "get_linkedin_user_posts",
      "Get LinkedIn posts for a user by URN (must include prefix, example: fsd_profile:ACoAAEWn01Q...)",
      {
        urn: z.string().describe("User URN (must include prefix, example: fsd_profile:ACoAA...)"),
        count: z.number().default(10).describe("Max posts"),
        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 posts lookup for urn:", normalizedURN);
        const requestData = { timeout, urn: normalizedURN, count };
        try {
          const response = await makeRequest(API_CONFIG.ENDPOINTS.LINKEDIN_USER_POSTS, requestData);
          return {
            content: [{ type: "text", text: JSON.stringify(response, null, 2) }]
          };
        } catch (error) {
          log("LinkedIn user posts lookup error:", error);
          return {
            content: [{ type: "text", text: `LinkedIn user posts API error: ${formatError(error)}` }],
            isError: true
          };
        }
      }
    );
  • Zod input schema defining parameters: urn (string, required), count (number, default 10), timeout (number, default 300).
    {
      urn: z.string().describe("User URN (must include prefix, example: fsd_profile:ACoAA...)"),
      count: z.number().default(10).describe("Max posts"),
      timeout: z.number().default(300).describe("Timeout in seconds")
    },
  • Helper function to normalize LinkedIn user URN by prepending 'fsd_profile:' if missing.
    const normalizeUserURN = (urn: string): string => {
      if (!urn.includes("fsd_profile:")) {
        return `fsd_profile:${urn}`;
      }
      return urn;
    };
  • Helper function to validate if URN starts with 'fsd_profile:'.
    const isValidUserURN = (urn: string): boolean => {
      return urn.startsWith("fsd_profile:");
    };
  • API endpoint constant used in makeRequest call for this tool.
    LINKEDIN_USER_POSTS: "/api/linkedin/user/posts",
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 mentions the URN format requirement, which adds some context, but fails to describe key traits like whether this is a read-only operation, potential rate limits, authentication requirements, or what the output looks like (e.g., list of posts with fields). 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.

Conciseness4/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. It includes a necessary example for the URN parameter, which adds clarity without verbosity. There's no wasted text, making it appropriately sized for its function.

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 tool's complexity (retrieving user posts from LinkedIn) and lack of annotations and output schema, the description is incomplete. It doesn't cover behavioral aspects like authentication, rate limits, or output format, which are crucial for an agent to use it correctly. The high schema coverage helps with parameters, but overall context is insufficient for a tool with no structured safety or output information.

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 already documents all parameters (urn, count, timeout) with descriptions. The description adds minimal value by reiterating the URN format example from the schema, but doesn't provide additional semantics like why the prefix is needed or how count/timeout affect performance. Baseline 3 is appropriate when the schema does the heavy lifting.

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 action ('Get LinkedIn posts') and target ('for a user by URN'), providing a specific verb and resource. It distinguishes from siblings like 'get_linkedin_post_comments' or 'search_linkedin_posts' by focusing on user-specific posts rather than comments or search results. However, it doesn't explicitly differentiate from 'get_linkedin_profile' which might also retrieve user data, making it a 4 rather than a 5.

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 doesn't mention when to choose this over 'search_linkedin_posts' for broader searches or 'get_linkedin_profile' for user metadata. There's no context about prerequisites, such as authentication needs or rate limits, leaving the agent with minimal usage direction.

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