Skip to main content
Glama

linkedin_react

React to a LinkedIn post with a like, celebrate, support, love, insightful, or funny reaction. Provide the post URL or URN for immediate action.

Instructions

React to a LinkedIn post via Unipile. Accepts a LinkedIn post URL (e.g. https://linkedin.com/feed/update/urn:li:activity:12345) or a raw URN (urn:li:activity:12345). This action is immediate — there is no dry_run. Reaction type defaults to 'like' if not specified.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
post_urlYesLinkedIn post URL (linkedin.com/feed/update/...) or raw URN (urn:li:activity:...)
reaction_typeNoReaction type. One of: like, celebrate, support, love, insightful, funny. Defaults to "like".like

Implementation Reference

  • Main handler for the linkedin_react tool. Validates input (post_url, reaction_type), parses the URN, resolves the LinkedIn account, and calls the Unipile API to post the reaction.
    export async function handleReact(args) {
    	const { post_url, reaction_type = "like" } = args;
    
    	if (
    		!post_url ||
    		typeof post_url !== "string" ||
    		post_url.trim().length === 0
    	) {
    		return { error: "post_url is required" };
    	}
    
    	if (!VALID_REACTIONS.includes(reaction_type)) {
    		return {
    			error: `Invalid reaction_type: "${reaction_type}". Must be one of: ${VALID_REACTIONS.join(", ")}`,
    		};
    	}
    
    	const urn = parsePostUrn(post_url);
    	if (!urn) {
    		return {
    			error: `Could not parse post URN from: "${post_url}". Provide a LinkedIn post URL or raw URN.`,
    		};
    	}
    
    	const accountResult = await resolveAccountId();
    	if (!accountResult.success) {
    		return {
    			error: `Could not resolve LinkedIn account: ${accountResult.error}`,
    		};
    	}
    
    	const result = await reactToPost(accountResult.data, urn, reaction_type);
    	if (!result.success) {
    		return { error: result.error, details: result.details };
    	}
    
    	return {
    		status: "reacted",
    		post_urn: urn,
    		reaction_type,
    	};
    }
  • Input schema for the linkedin_react tool: requires post_url string, accepts optional reaction_type enum (default 'like').
    inputSchema: {
    	type: "object",
    	properties: {
    		post_url: {
    			type: "string",
    			description:
    				"LinkedIn post URL (linkedin.com/feed/update/...) or raw URN (urn:li:activity:...)",
    		},
    		reaction_type: {
    			type: "string",
    			enum: ["like", "celebrate", "support", "love", "insightful", "funny"],
    			description:
    				'Reaction type. One of: like, celebrate, support, love, insightful, funny. Defaults to "like".',
    			default: "like",
    		},
    	},
    	required: ["post_url"],
    },
  • src/server.js:98-124 (registration)
    Tool definition registration — adds linkedin_react to the TOOLS array that gets listed via ListToolsRequestSchema.
    {
    	name: "linkedin_react",
    	description:
    		"React to a LinkedIn post via Unipile. " +
    		"Accepts a LinkedIn post URL (e.g. https://linkedin.com/feed/update/urn:li:activity:12345) " +
    		"or a raw URN (urn:li:activity:12345). " +
    		"This action is immediate — there is no dry_run. " +
    		"Reaction type defaults to 'like' if not specified.",
    	inputSchema: {
    		type: "object",
    		properties: {
    			post_url: {
    				type: "string",
    				description:
    					"LinkedIn post URL (linkedin.com/feed/update/...) or raw URN (urn:li:activity:...)",
    			},
    			reaction_type: {
    				type: "string",
    				enum: ["like", "celebrate", "support", "love", "insightful", "funny"],
    				description:
    					'Reaction type. One of: like, celebrate, support, love, insightful, funny. Defaults to "like".',
    				default: "like",
    			},
    		},
    		required: ["post_url"],
    	},
    },
  • src/server.js:153-155 (registration)
    Dispatch routing — maps the 'linkedin_react' tool name to the handleReact function.
    case "linkedin_react":
    	result = await handleReact(args || {});
    	break;
  • Unipile API client helper that makes the HTTP POST to /posts/reaction with account_id, post_id (URN), and reaction_type.
    export async function reactToPost(accountId, postUrn, reactionType = "like") {
    	try {
    		const response = await axios.post(
    			`${BASE_URL}/posts/reaction`,
    			{ account_id: accountId, post_id: postUrn, reaction_type: reactionType },
    			{
    				headers: authHeaders({ "Content-Type": "application/json" }),
    				timeout: 15000,
    			},
    		);
    
    		return { success: true, data: response.data };
    	} catch (err) {
    		return apiError("reactToPost", err);
    	}
Behavior4/5

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

The description discloses key behavioral traits: it is immediate with no dry run, and the reaction type defaults to 'like'. While no annotations are provided, the description offers sufficient transparency for a simple mutation tool.

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?

The description is extremely concise, consisting of two sentences that directly convey the essential information without any unnecessary words or fluff.

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 tool with only two parameters and no output schema, the description is fairly complete. It covers the input format, default behavior, and immediate nature, though it could briefly mention that the tool does not support other actions like commenting.

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?

Input schema coverage is 100% with clear descriptions for both parameters. The description adds minimal additional meaning, reiterating the default reaction type and the acceptable post identifier formats, but does not go 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 description clearly states the action 'React to a LinkedIn post' and specifies the resource via URL or URN. It distinguishes itself from sibling tools 'linkedin_comment' and 'linkedin_publish' by the unique action of reacting.

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?

The description provides context on when to use the tool (for immediate reactions) but does not explicitly contrast with sibling tools or state when not to use it. It mentions the immediate nature but lacks guidance on alternatives.

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/timkulbaev/mcp-linkedin'

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