Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@linkedapi/mcp",
"version": "2.3.4",
"version": "2.3.5",
"description": "MCP server that lets AI assistants control LinkedIn accounts and retrieve real-time data.",
"main": "dist/index.js",
"bin": {
Expand Down Expand Up @@ -30,7 +30,7 @@
"author": "Linked API",
"license": "MIT",
"dependencies": {
"@linkedapi/node": "^2.3.4",
"@linkedapi/node": "^2.3.5",
"@modelcontextprotocol/sdk": "^1.17.4",
"zod": "^4.1.1"
},
Expand Down
4 changes: 4 additions & 0 deletions src/linked-api-tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,10 @@ import { NvSearchCompaniesTool } from './tools/nv-search-companies.js';
import { NvSearchPeopleTool } from './tools/nv-search-people.js';
import { NvSendMessageTool } from './tools/nv-send-message.js';
import { NvSyncInboxTool } from './tools/nv-sync-inbox.js';
import { ReactToCommentTool } from './tools/react-to-comment.js';
import { ReactToPostTool } from './tools/react-to-post.js';
import { RemoveConnectionTool } from './tools/remove-connection.js';
import { ReplyToCommentTool } from './tools/reply-to-comment.js';
import { RetrieveConnectionsTool } from './tools/retrieve-connections.js';
import { RetrieveFeedTool } from './tools/retrieve-feed.js';
import { RetrieveInvitationsTool } from './tools/retrieve-invitations.js';
Expand Down Expand Up @@ -104,6 +106,8 @@ export class LinkedApiTools {
new FetchJobTool(),
new ReactToPostTool(),
new CommentOnPostTool(),
new ReactToCommentTool(),
new ReplyToCommentTool(),
new CreatePostTool(),
new RetrieveFeedTool(),
new RetrieveSSITool(),
Expand Down
6 changes: 3 additions & 3 deletions src/tools/comment-on-post.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { OPERATION_NAME, TCommentOnPostParams } from '@linkedapi/node';
import { OPERATION_NAME, TCommentOnPostParams, TCommentOnPostResult } from '@linkedapi/node';
import { Tool } from '@modelcontextprotocol/sdk/types.js';
import { z } from 'zod';

import { OperationTool } from '../utils/linked-api-tool.js';

export class CommentOnPostTool extends OperationTool<TCommentOnPostParams, unknown> {
export class CommentOnPostTool extends OperationTool<TCommentOnPostParams, TCommentOnPostResult> {
public override readonly name = 'comment_on_post';
public override readonly operationName = OPERATION_NAME.commentOnPost;
protected override readonly schema = z.object({
Expand All @@ -17,7 +17,7 @@ export class CommentOnPostTool extends OperationTool<TCommentOnPostParams, unkno
return {
name: this.name,
description:
'Allows you to leave a comment on a post (st.commentOnPost action). If this workflow is still running, do not retry this tool; retrying can post duplicate comments.',
"Allows you to leave a comment on a post (st.commentOnPost action); returns the comment's URN and URL. If this workflow is still running, do not retry this tool; retrying can post duplicate comments.",
inputSchema: {
type: 'object',
properties: {
Expand Down
37 changes: 37 additions & 0 deletions src/tools/react-to-comment.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import { OPERATION_NAME, TReactToCommentParams } from '@linkedapi/node';
import { Tool } from '@modelcontextprotocol/sdk/types.js';
import { z } from 'zod';

import { OperationTool } from '../utils/linked-api-tool.js';

export class ReactToCommentTool extends OperationTool<TReactToCommentParams, void> {
public override readonly name = 'react_to_comment';
public override readonly operationName = OPERATION_NAME.reactToComment;
protected override readonly schema = z.object({
commentUrl: z.string(),
type: z.enum(['like', 'love', 'support', 'celebrate', 'insightful', 'funny']).optional(),
});

public override getTool(): Tool {
return {
name: this.name,
description:
'React to a comment by commentUrl (like, love, support, celebrate, insightful, funny). If this workflow is still running, do not retry this tool; retrying can queue duplicate reaction attempts.',
inputSchema: {
type: 'object',
properties: {
commentUrl: {
type: 'string',
description: 'LinkedIn URL of the comment to react to.',
},
type: {
type: 'string',
description: 'Optional. Enum describing the reaction type. Defaults to "like".',
enum: ['like', 'love', 'support', 'celebrate', 'insightful', 'funny'],
},
},
required: ['commentUrl'],
},
};
}
}
39 changes: 39 additions & 0 deletions src/tools/reply-to-comment.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import { OPERATION_NAME, TReplyToCommentParams, TReplyToCommentResult } from '@linkedapi/node';
import { Tool } from '@modelcontextprotocol/sdk/types.js';
import { z } from 'zod';

import { OperationTool } from '../utils/linked-api-tool.js';

export class ReplyToCommentTool extends OperationTool<
TReplyToCommentParams,
TReplyToCommentResult
> {
public override readonly name = 'reply_to_comment';
public override readonly operationName = OPERATION_NAME.replyToComment;
protected override readonly schema = z.object({
commentUrl: z.string(),
text: z.string().min(1),
});

public override getTool(): Tool {
return {
name: this.name,
description:
"Reply to a comment by commentUrl; returns the reply's URN and URL. If this workflow is still running, do not retry this tool; retrying can post duplicate replies.",
inputSchema: {
type: 'object',
properties: {
commentUrl: {
type: 'string',
description: 'LinkedIn URL of the comment to reply to.',
},
text: {
type: 'string',
description: 'Reply text, must be up to 1000 characters.',
},
},
required: ['commentUrl', 'text'],
},
};
}
}