Skip to main content
Glama

Send a LinkedIn Message

li_send_message
Destructive

Send ONE message to one 1st-degree connection (or open profile) and WAIT for the result: the call stays open while the browser opens their profile, types and sends, which can take minutes when other work is queued. To answer replies use li_send_reply instead (returns at once with job ids, takes many people, sends each from the right account); for many prepared messages from one account use li_send_bulk_messages. Dry-run unless confirmSend=true — confirm the exact recipient and text with the user first. Refused for anyone on the do-not-contact list. Returns ok and the worker's result. Never resend after a timeout: check li_job_result or li_conversation_history first. Pair with li_read_conversation to draft a contextual, non-deceptive message.

Input Schema

NameRequiredDescriptionDefault
messageYesExact message text to send (supplied, never generated at send time)
sessionIdNoAccount id from li_list_accounts. Needed (or sessionLabel) when you have more than one account; never guessed.
profileUrlYesRecipient profile URL (https://www.linkedin.com/in/<slug>); the fsd-id URL from li_list_conversations also resolves
confirmSendYesMust be true to send; false returns a dry-run preview
sessionLabelNoAccount by label, LinkedIn name, profile slug or member id (li_list_accounts). Needed (or sessionId) when you have more than one account; never guessed.
debugArtifactsDirNoIgnored; accepted only so older callers do not fail validation.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / debugArtifactsDir / description
      Added value: +"Ignored; accepted only so older callers do not fail validation."
    • changedInput schema / properties / sessionId / description
      Previous value: -"Optional saved LinkedIn session selector"New value: +"Account id from li_list_accounts. Needed (or sessionLabel) when you have more than one account; never guessed."
    • changedInput schema / properties / sessionLabel / description
      Previous value: -"Optional saved LinkedIn session selector"New value: +"Account by label, LinkedIn name, profile slug or member id (li_list_accounts). Needed (or sessionId) when you have more than one account; never guessed."
  2. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond the destructive/openWorld/non-idempotent annotations: the call blocks for minutes while the browser types and sends, returns `ok` plus the worker's `result`, is refused for suppressed contacts, and must not be retried after a timeout. This is exactly the operational context annotations cannot convey.

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?

Long but front-loaded: the blocking-wait surprise leads, followed by routing, safety preconditions, return shape, and a retry warning. Every sentence carries routing, safety, or failure-handling information; nothing is filler.

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

Completeness5/5

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

With no output schema, the description still covers the return values (`ok`, worker `result`), timeout ambiguity, refusal cases, and the recommended companion tool (li_read_conversation). Nothing an agent needs to invoke this mutation safely is missing.

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 baseline is 3; the schema already documents confirmSend's dry-run behavior and session selection. The description adds only minor extra meaning (recipient eligibility, supplied-not-generated text), so it stays at baseline.

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 (send ONE message to one connection) plus scope constraints (1st-degree connection or open profile). It explicitly distinguishes itself from li_send_reply and li_send_bulk_messages, so an agent can route 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 Guidelines5/5

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

Names the alternatives and the exact conditions that select them (replies -> li_send_reply; prepared batch from one account -> li_send_bulk_messages). It also gives prerequisites (confirm recipient/text with user, dry-run unless confirmSend=true) and a hard exclusion (do-not-contact list).

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.

Resources