Skip to main content
Glama

LinkedIn: comment on post

linkedin_create_comment

Post a comment on a LinkedIn post, optionally with one image or animated GIF. Publora has separate daily budgets for comment and reaction attempts, resetting at 00:00 UTC. Defaults are 5 each for Free/Starter and 20 each for paid Personal on the legacy app. Paid Personal on the Standard app can be exempt from the daily cap. Eligible business flows are exempt. Provider quotas and burst limits apply. Metered attempts share usage across channels, API, MCP and scheduled first comments. Sent attempts count even on failure. Use the backend response as the source of truth. If it returns LINKEDIN_DAILY_LIMIT_REACHED, wait until retryAt. LINKEDIN_COMMENTS_RESTRICTED is terminal for this target: do not retry or guess another URN; explain the restriction or choose another post if authorized.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "postedId": "<postedId>",
      "platformId": "<platformId>",
      "message": "<message>"
    },
    "name": "linkedin_create_comment"
  }
}

Input Schema

NameRequiredDescriptionDefault
messageYesRequired comment text string (max 1250 characters). May be empty only when imageUrl is provided; use an empty string for an image-only comment. Supports mentions: @{urn:li:person:Dk968RHxiO|John Smith} or @{urn:li:organization:12345678|Company Name}. Person IDs must be raw native app-scoped member IDs returned by Publora. Use list_connections linkedinMemberId or linkedin_list_mentionables for the selected channel. The stable platformId selects a Publora channel and may differ from its current LinkedIn member ID. IDs copied from linkedin.com profile URLs are rejected.
imageUrlNoPublic https URL of one image to attach to the comment. JPEG, PNG and GIF only (animated GIFs work — LinkedIn allows up to 250 frames); max 10MB and fewer than 36,152,320 pixels. Video and documents cannot be attached to LinkedIn comments. LinkedIn validates media AFTER accepting it, so an image breaching those limits still returns success but does not render — it cannot be detected here.
postedIdYesLinkedIn post URN: urn:li:activity:<id>, urn:li:share:<id> or urn:li:ugcPost:<id>. From a LinkedIn post URL, preserve its exact activity ID as urn:li:activity:<id>; URLs are not accepted in this field. Never guess a share/ugcPost ID by replacing the activity prefix. Publora handles supported target translations.
platformIdYesPlatform connection ID, e.g. 'linkedin-XxxYyy'
parentCommentNoParent comment URN for nested replies

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / message / description
      Previous value: -"Required comment text string (max 1250 characters). May be empty only when imageUrl is provided; use an empty string for an image-only comment. Supports mentions: @{urn:li:person:Dk968RHxiO|John Smith} or @{urn:li:organization:12345678|Company Name}. Person IDs must be raw native app-scoped member IDs returned by Publora. If starting from list_connections platformId such as linkedin-Dk968RHxiO, remove the leading linkedin- before building the person URN; IDs copied from linkedin.com profile URLs are rejected."New value: +"Required comment text string (max 1250 characters). May be empty only when imageUrl is provided; use an empty string for an image-only comment. Supports mentions: @{urn:li:person:Dk968RHxiO|John Smith} or @{urn:li:organization:12345678|Company Name}. Person IDs must be raw native app-scoped member IDs returned by Publora. Use list_connections linkedinMemberId or linkedin_list_mentionables for the selected channel. The stable platformId selects a Publora channel and may differ from its current LinkedIn member ID. IDs copied from linkedin.com profile URLs are rejected."
  2. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Beyond the annotations, the description discloses quota behavior, shared metered usage, that failed attempts still count, and two specific terminal/retry error semantics. It also warns that image validation happens after acceptance, which is a non-obvious behavioral caveat that materially affects how an agent should interpret success.

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 purpose is front-loaded in the first sentence and the remaining text is mostly relevant quota and failure behavior. Some budget-tier specifics, such as Free/Starter versus legacy Personal versus Standard app exemptions, are more policy background than actionable invocation guidance and could be tightened.

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

Completeness4/5

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

For a non-idempotent write tool with five fully described parameters and no output schema, the description covers failure modes, quotas, and media caveats well. It does not explain what a successful response contains, such as a created comment URN, which would help callers that need to reply to or later delete the comment.

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 already explains every parameter in detail, including image constraints, URN formats, and mention syntax. The description reinforces that only one image or GIF is allowed, but adds little parameter meaning beyond what the schema provides.

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 opening sentence states a specific verb and resource: posting a comment on a LinkedIn post, optionally with one image or animated GIF. This clearly distinguishes it from siblings such as linkedin_create_reaction, linkedin_create_reshare, and linkedin_delete_comment.

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

Usage Guidelines4/5

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

The description gives strong operational guidance for retries and terminal failures: wait until retryAt on LINKEDIN_DAILY_LIMIT_REACHED, and do not retry or guess another URN on LINKEDIN_COMMENTS_RESTRICTED. It does not explicitly name alternative tools for reactions or nested replies, but the when-not conditions are unusually clear.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.