Skip to main content
Glama
ahmedselimmansor-ctrl

LinkedIn MCP Server

create_article_post

Post an article to LinkedIn with its URL, title, and your commentary. Optionally include an article description.

Instructions

Share an article with a URL and description.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesThe text commentary accompanying the article.
articleUrlYesThe URL of the article to share.
articleTitleYesThe title of the article.
articleDescriptionNoAn optional description of the article.

Implementation Reference

  • The handler function that executes the create_article_post tool logic. It validates required params (text, articleUrl, articleTitle), gets the user's URN, and calls createArticlePost on the LinkedInClient.
    case "create_article_post": {
      if (!args || !args.text || !args.articleUrl || !args.articleTitle) {
        throw new McpError(ErrorCode.InvalidParams, "text, articleUrl, and articleTitle are required");
      }
      const urn = await client.getMyUrn();
      const result = await client.createArticlePost(urn, args.text, args.articleUrl, args.articleTitle, args.articleDescription);
      return {
        content: [
          {
            type: "text",
            text: `Article post created successfully: ${JSON.stringify(result, null, 2)}`,
          },
        ],
      };
  • The tool definition/schema for create_article_post, including name, description, and inputSchema with parameters (text, articleUrl, articleTitle required; articleDescription optional).
    {
      name: "create_article_post",
      description: "Share an article with a URL and description.",
      inputSchema: {
        type: "object",
        properties: {
          text: {
            type: "string",
            description: "The text commentary accompanying the article.",
          },
          articleUrl: {
            type: "string",
            description: "The URL of the article to share.",
          },
          articleTitle: {
            type: "string",
            description: "The title of the article.",
          },
          articleDescription: {
            type: "string",
            description: "An optional description of the article.",
          },
        },
        required: ["text", "articleUrl", "articleTitle"],
      },
    },
  • src/index.ts:68-70 (registration)
    Registration of the create_article_post tool via the contentTools array. When CallToolRequestSchema is triggered, the server checks if the tool name exists in contentTools and dispatches to handleContentTool.
    if (contentTools.some((t) => t.name === name)) {
      return await handleContentTool(name, args, linkedinClient);
    }
  • src/index.ts:49-55 (registration)
    The ListToolsRequestSchema handler registers all tools (including create_article_post via contentTools) for MCP discovery.
      tools: [
        ...profileTools,
        ...contentTools,
        ...networkTools,
        ...organizationTools,
      ],
    };
  • Helper method on LinkedInClient that constructs the LinkedIn API UGC post payload with ARTICLE media category and posts it to /ugcPosts.
    async createArticlePost(authorUrn: string, text: string, articleUrl: string, articleTitle: string, articleDescription?: string) {
      const payload = {
        author: authorUrn,
        lifecycleState: "PUBLISHED",
        specificContent: {
          "com.linkedin.ugc.ShareContent": {
            shareCommentary: {
              text: text,
            },
            shareMediaCategory: "ARTICLE",
            media: [
              {
                status: "READY",
                description: { text: articleDescription || "" },
                originalUrl: articleUrl,
                title: { text: articleTitle },
              },
            ],
          },
        },
        visibility: {
          "com.linkedin.ugc.MemberNetworkVisibility": "PUBLIC",
        },
      };
    
      const response = await this.client.post("/ugcPosts", payload);
      return response.data;
    }
Behavior2/5

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

No annotations provided; description is minimal and does not disclose behavioral traits such as post visibility, authentication requirements, or side effects beyond 'share'.

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

Conciseness3/5

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

Single sentence, no waste, but too terse to add substantial value. Could be more informative without being lengthy.

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?

No output schema and no description of return values or side effects. For a tool with 4 parameters, this feels incomplete.

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 coverage is 100%, so the description adds little meaning beyond what the schema already provides. It mentions 'URL and description' but that is redundant.

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

Purpose5/5

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

The description clearly states the action ('Share an article') and includes the key components ('URL and description'), distinguishing it from sibling 'create_text_post' which likely handles text-only posts.

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

Usage Guidelines3/5

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

No explicit guidance on when to use this tool versus 'create_text_post' or other tools. The purpose is implied but not clarified.

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/ahmedselimmansor-ctrl/Linekedin_MCP_server'

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