Skip to content

Commit a8c2952

Browse files
Company URL in post actions
1 parent 3249cdb commit a8c2952

4 files changed

Lines changed: 17 additions & 5 deletions

File tree

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"license": "MIT",
3232
"dependencies": {
3333
"@modelcontextprotocol/sdk": "^1.17.4",
34-
"linkedapi-node": "^1.2.13",
34+
"linkedapi-node": "^1.2.14",
3535
"zod": "^4.1.1"
3636
},
3737
"devDependencies": {

src/tools/comment-on-post.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export class CommentOnPostTool extends OperationTool<TCommentOnPostParams, unkno
1010
protected override readonly schema = z.object({
1111
postUrl: z.string(),
1212
text: z.string().min(1),
13+
companyUrl: z.string().optional(),
1314
});
1415

1516
public override getTool(): Tool {
@@ -28,6 +29,11 @@ export class CommentOnPostTool extends OperationTool<TCommentOnPostParams, unkno
2829
type: 'string',
2930
description: 'Comment text, must be up to 1000 characters.',
3031
},
32+
companyUrl: {
33+
type: 'string',
34+
description:
35+
"LinkedIn company page URL. If specified, the comment will be added on behalf of the company. (e.g., 'https://www.linkedin.com/company/acme-corp')",
36+
},
3137
},
3238
required: ['postUrl', 'text'],
3339
},

src/tools/react-to-post.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export class ReactToPostTool extends OperationTool<TReactToPostParams, unknown>
1010
protected override readonly schema = z.object({
1111
postUrl: z.string(),
1212
type: z.enum(['like', 'love', 'celebrate', 'support', 'funny', 'insightful']).or(z.string()),
13+
companyUrl: z.string().optional(),
1314
});
1415

1516
public override getTool(): Tool {
@@ -30,6 +31,11 @@ export class ReactToPostTool extends OperationTool<TReactToPostParams, unknown>
3031
description: 'Enum describing the reaction type.',
3132
enum: ['like', 'love', 'support', 'celebrate', 'insightful', 'funny'],
3233
},
34+
companyUrl: {
35+
type: 'string',
36+
description:
37+
"LinkedIn company page URL. If specified, the reaction will be added on behalf of the company. (e.g., 'https://www.linkedin.com/company/acme-corp')",
38+
},
3339
},
3440
required: ['postUrl', 'type'],
3541
},

0 commit comments

Comments
 (0)