Skip to main content
Glama

LinkedIn: Comment on post

linkedin_comment_on_post
Destructive

Publish a top-level LinkedIn comment as the connected person, or as a managed company page using comment_as from linkedin_list_managed_company_pages. Requires post_id. Use after reading the post/comments and only when the user has asked to publish the final reply.

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": {
      "post_id": "<post_id>",
      "text": "<text>"
    },
    "name": "linkedin_comment_on_post"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesLinkedIn Classic mentions belong in text: @ followed by the resolved person's Classic ACo... ID or the company's numeric ID (for example @1441). Resolve people with linkedin_get_profile_from_url/linkedin_resolve_person and companies with linkedin_resolve_company/linkedin_search_companies; disambiguate every target before publishing. Never use a display name, profile URL, company slug, URN, Sales Navigator or Recruiter ID as a mention. Example after resolving both targets: 'Thanks @ACo_RESOLVED_MEMBER for working with @1441.' The API replaces each token with the target's name and mention metadata; no separate mentions field is needed. Approve the final text and mentioned identities before the write; never retry an ambiguous write automatically.
post_idYesExact provider post ID returned by post search/list/get. Never pass post text, author ID or URL. Post ID: Exact provider post id; LinkedIn commonly uses a preformatted/base64-style post ID. Obtain with: linkedin_search_posts -> result.id; linkedin_list_user_posts -> result.id; instagram_list_user_posts -> result.id Never pass: post text, author user ID, URL unless a resolver tool explicitly accepts it.
account_idNoOptional Nilyo connection ID (unipile_account_id from list_connected_accounts). Omit when the user has one account for this provider. When several exist, Nilyo never guesses: list them (display name, identifier, provider user ID), choose the one the user named or ask, and pass its ID here.
comment_asNoOptional numeric CompanyPage.id from linkedin_list_managed_company_pages for the SAME account_id. Choose the page by name from that list; never use mailbox_id, inbox_id, a company URL/slug, name, URN or person ID. Omit to act as the connected person. Requires the company product enabled during account_connect and current page admin rights; company search alone does not prove access. Never omit this field as a fallback after a company action fails.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / comment_as
      Added value: +{
      +  "description": "Optional numeric CompanyPage.id from linkedin_list_managed_company_pages for the SAME account_id. Choose the page by name from that list; never use mailbox_id, inbox_id, a company URL/slug, name, URN or person ID. Omit to act as the connected person. Requires the company product enabled during account_connect and current page admin rights; company search alone does not prove access. Never omit this field as a fallback after a company action fails.",
      +  "pattern": "^\\d+$",
      +  "type": "string"
      +}
  2. Changed1 schema field changed
    • addedInput schema / properties / text / description
      Added value: +"LinkedIn Classic mentions belong in text: @ followed by the resolved person's Classic ACo... ID or the company's numeric ID (for example @1441). Resolve people with linkedin_get_profile_from_url/linkedin_resolve_person and companies with linkedin_resolve_company/linkedin_search_companies; disambiguate every target before publishing. Never use a display name, profile URL, company slug, URN, Sales Navigator or Recruiter ID as a mention. Example after resolving both targets: 'Thanks @ACo_RESOLVED_MEMBER for working with @1441.' The API replaces each token with the target's name and mention metadata; no separate mentions field is needed. Approve the final text and mentioned identities before the write; never retry an ambiguous write automatically."
  3. Changed1 schema field changed
    • changedInput schema / properties / post_id / description
      Previous value: -"Exact provider post ID returned by post search/list/get. Never pass post text, author ID or URL. Post ID: Exact provider/Unipile post id; LinkedIn commonly uses a preformatted/base64-style post ID. Obtain with: linkedin_search_posts -> result.id; linkedin_list_user_posts -> result.id; instagram_list_user_posts -> result.id Never pass: post text, author user ID, URL unless a resolver tool explicitly accepts it."New value: +"Exact provider post ID returned by post search/list/get. Never pass post text, author ID or URL. Post ID: Exact provider post id; LinkedIn commonly uses a preformatted/base64-style post ID. Obtain with: linkedin_search_posts -> result.id; linkedin_list_user_posts -> result.id; instagram_list_user_posts -> result.id Never pass: post text, author user ID, URL unless a resolver tool explicitly accepts it."
  4. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare a non-idempotent, destructive, open-world write, so the description only needs to add context — and it does: it discloses the two possible acting identities and a user-approval gate before publishing. It does not itself warn about duplicate-post risk on retry, though the schema's text field does carry that; with annotations covering the safety profile this is a solid additive layer.

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?

Three tight sentences: action and identity first, hard requirement second, timing gate last. No restatement of the title and no filler.

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 destructive write with no output schema, the description covers identity selection, prerequisites, and timing, and the schema fills the remaining behavioral gaps (mention resolution, ambiguity handling). The only omission is any mention of what a successful publish returns, which is minor given the absence of an output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with unusually rich per-parameter docs (mention token format, account_id selection, comment_as preconditions), so the baseline is 3. The description adds cross-tool meaning by pointing comment_as at the CompanyPage.id from linkedin_list_managed_company_pages and stating post_id is mandatory, which goes beyond the schema text.

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?

States a specific verb and resource ('Publish a top-level LinkedIn comment') and disambiguates from linkedin_reply_to_comment via 'top-level'. It also names the acting identity options, so an agent can distinguish it from reply/update/delete comment siblings without opening any schema.

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?

Gives a clear precondition ('Use after reading the post/comments') and a hard gate ('only when the user has asked to publish the final reply'), plus the 'Requires post_id' prerequisite. It does not explicitly name linkedin_reply_to_comment as the alternative for threaded responses, leaving that inference to the adjective 'top-level'.

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.