@linkedapi/mcp 2.3.12 → 2.3.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/linked-api-tools.d.ts.map +1 -1
- package/dist/linked-api-tools.js +2 -0
- package/dist/linked-api-tools.js.map +1 -1
- package/dist/tools/comment-on-post.d.ts +2 -1
- package/dist/tools/comment-on-post.d.ts.map +1 -1
- package/dist/tools/comment-on-post.js +8 -3
- package/dist/tools/comment-on-post.js.map +1 -1
- package/dist/tools/create-post.d.ts +7 -0
- package/dist/tools/create-post.d.ts.map +1 -1
- package/dist/tools/create-post.js +41 -2
- package/dist/tools/create-post.js.map +1 -1
- package/dist/tools/create-repost.d.ts +22 -0
- package/dist/tools/create-repost.d.ts.map +1 -0
- package/dist/tools/create-repost.js +80 -0
- package/dist/tools/create-repost.js.map +1 -0
- package/dist/tools/fetch-post.d.ts +2 -1
- package/dist/tools/fetch-post.d.ts.map +1 -1
- package/dist/tools/fetch-post.js +8 -3
- package/dist/tools/fetch-post.js.map +1 -1
- package/dist/tools/get-workflow-result.d.ts +1 -0
- package/dist/tools/get-workflow-result.d.ts.map +1 -1
- package/dist/tools/react-to-post.d.ts +2 -1
- package/dist/tools/react-to-post.d.ts.map +1 -1
- package/dist/tools/react-to-post.js +8 -3
- package/dist/tools/react-to-post.js.map +1 -1
- package/package.json +3 -3
- package/src/linked-api-tools.ts +2 -0
- package/src/tools/comment-on-post.ts +9 -3
- package/src/tools/create-post.ts +49 -2
- package/src/tools/create-repost.ts +90 -0
- package/src/tools/fetch-post.ts +9 -3
- package/src/tools/react-to-post.ts +9 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"linked-api-tools.d.ts","sourceRoot":"","sources":["../src/linked-api-tools.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,EAAE,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"linked-api-tools.d.ts","sourceRoot":"","sources":["../src/linked-api-tools.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,EAAE,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAiE1D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AACnF,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD,UAAU,wBAAwB;IAChC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,OAAO,IAAI,IAAI,CAAC;IAChB,QAAQ,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC;IACjC,OAAO,CAAC,OAAO,EAAE;QACf,SAAS,EAAE,SAAS,CAAC;QACrB,IAAI,EAAE,KAAK,CAAC;QACZ,SAAS,EAAE,MAAM,CAAC;QAClB,UAAU,EAAE,UAAU,CAAC;KACxB,GAAG,OAAO,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC,CAAC;CAC5C;AAED,qBAAa,cAAc;IACzB,SAAgB,KAAK,EAAE,aAAa,CAAC,wBAAwB,CAAC,CAAC;IAC/D,SAAgB,UAAU,EAAE,aAAa,CAAC,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;;IA4EhE,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,wBAAwB,GAAG,SAAS;IAI9D,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,GAAG,SAAS;CAG9E"}
|
package/dist/linked-api-tools.js
CHANGED
|
@@ -22,6 +22,7 @@ const admin_set_seats_js_1 = require("./tools/admin-set-seats.js");
|
|
|
22
22
|
const check_connection_status_js_1 = require("./tools/check-connection-status.js");
|
|
23
23
|
const comment_on_post_js_1 = require("./tools/comment-on-post.js");
|
|
24
24
|
const create_post_js_1 = require("./tools/create-post.js");
|
|
25
|
+
const create_repost_js_1 = require("./tools/create-repost.js");
|
|
25
26
|
const execute_custom_workflow_js_1 = require("./tools/execute-custom-workflow.js");
|
|
26
27
|
const fetch_company_js_1 = require("./tools/fetch-company.js");
|
|
27
28
|
const fetch_job_js_1 = require("./tools/fetch-job.js");
|
|
@@ -98,6 +99,7 @@ class LinkedApiTools {
|
|
|
98
99
|
new react_to_comment_js_1.ReactToCommentTool(),
|
|
99
100
|
new reply_to_comment_js_1.ReplyToCommentTool(),
|
|
100
101
|
new create_post_js_1.CreatePostTool(),
|
|
102
|
+
new create_repost_js_1.CreateRepostTool(),
|
|
101
103
|
new retrieve_feed_js_1.RetrieveFeedTool(),
|
|
102
104
|
new retrieve_profile_viewers_js_1.RetrieveProfileViewersTool(),
|
|
103
105
|
new retrieve_ssi_js_1.RetrieveSSITool(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"linked-api-tools.js","sourceRoot":"","sources":["../src/linked-api-tools.ts"],"names":[],"mappings":";;;AAGA,uEAAoE;AACpE,mGAA8F;AAC9F,+EAA2E;AAC3E,uGAAkG;AAClG,2EAAuE;AACvE,qFAAiF;AACjF,yEAAqE;AACrE,6FAAwF;AACxF,uFAAkF;AAClF,iFAA4E;AAC5E,qEAAiE;AACjE,mEAA+D;AAC/D,+FAA0F;AAC1F,iFAA6E;AAC7E,yFAAoF;AACpF,yEAAqE;AACrE,qEAAiE;AACjE,mEAA+D;AAC/D,mFAA+E;AAC/E,mEAA+D;AAC/D,2DAAwD;AACxD,mFAA+E;AAC/E,+DAA4D;AAC5D,uDAAoD;AACpD,6DAA0D;AAC1D,yDAAsD;AACtD,2EAAiE;AACjE,qEAAkE;AAClE,uDAAoD;AACpD,2DAAwD;AACxD,2EAAuE;AACvE,uEAAoE;AACpE,2EAAwE;AACxE,qEAAiE;AACjE,mEAA+D;AAC/D,2EAAuE;AACvE,iFAA6E;AAC7E,2EAAuE;AACvE,qEAAiE;AACjE,mEAA+D;AAC/D,+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AAC,CAAC;IAC5D,CAAC;CACF;
|
|
1
|
+
{"version":3,"file":"linked-api-tools.js","sourceRoot":"","sources":["../src/linked-api-tools.ts"],"names":[],"mappings":";;;AAGA,uEAAoE;AACpE,mGAA8F;AAC9F,+EAA2E;AAC3E,uGAAkG;AAClG,2EAAuE;AACvE,qFAAiF;AACjF,yEAAqE;AACrE,6FAAwF;AACxF,uFAAkF;AAClF,iFAA4E;AAC5E,qEAAiE;AACjE,mEAA+D;AAC/D,+FAA0F;AAC1F,iFAA6E;AAC7E,yFAAoF;AACpF,yEAAqE;AACrE,qEAAiE;AACjE,mEAA+D;AAC/D,mFAA+E;AAC/E,mEAA+D;AAC/D,2DAAwD;AACxD,+DAA4D;AAC5D,mFAA+E;AAC/E,+DAA4D;AAC5D,uDAAoD;AACpD,6DAA0D;AAC1D,yDAAsD;AACtD,2EAAiE;AACjE,qEAAkE;AAClE,uDAAoD;AACpD,2DAAwD;AACxD,2EAAuE;AACvE,uEAAoE;AACpE,2EAAwE;AACxE,qEAAiE;AACjE,mEAA+D;AAC/D,2EAAuE;AACvE,iFAA6E;AAC7E,2EAAuE;AACvE,qEAAiE;AACjE,mEAA+D;AAC/D,+DAA2D;AAC3D,qEAAiE;AACjE,+DAA2D;AAC3D,uEAAoE;AACpE,qEAAiE;AACjE,6EAA0E;AAC1E,+DAA4D;AAC5D,6EAA0E;AAC1E,uFAAmF;AACnF,6EAA0E;AAC1E,qFAAiF;AACjF,6DAA0D;AAC1D,qEAAkE;AAClE,2DAAwD;AACxD,+DAA4D;AAC5D,6DAA0D;AAC1D,mFAA+E;AAC/E,+DAA4D;AAC5D,6DAA0D;AAC1D,yDAAsD;AACtD,6DAA0D;AAC1D,2FAAuF;AAgBvF,MAAa,cAAc;IACT,KAAK,CAA0C;IAC/C,UAAU,CAA6C;IAEvE;QACE,IAAI,CAAC,KAAK,GAAG;YACX,iBAAiB;YACjB,IAAI,iCAAe,EAAE;YACrB,IAAI,yCAAmB,EAAE;YACzB,IAAI,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iEAA8B,EAAE;YACpC,IAAI,sCAAiB,EAAE;YACvB,IAAI,sCAAiB,EAAE;YACvB,IAAI,4CAAoB,EAAE;YAC1B,IAAI,2DAA2B,EAAE;YACjC,IAAI,yEAAkC,EAAE;YACxC,IAAI,kDAAuB,EAAE;YAC7B,IAAI,+DAA6B,EAAE;YACnC,IAAI,qEAAgC,EAAE;YACtC,IAAI,wDAA0B,EAAE;YAChC,IAAI,oDAAwB,EAAE;YAC9B,IAAI,yDAA0B,EAAE;YAChC,IAAI,wCAAkB,EAAE;YACxB,IAAI,mDAAuB,EAAE;YAC7B,IAAI,wCAAkB,EAAE;YACxB,IAAI,8CAAqB,EAAE;YAC3B,IAAI,4CAAoB,EAAE;SAC3B,CAAC;IACJ,CAAC;IAEM,UAAU,CAAC,IAAY;QAC5B,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;IACvD,CAAC;IAEM,eAAe,CAAC,IAAY;QACjC,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;IAC5D,CAAC;CACF;AArFD,wCAqFC"}
|
|
@@ -6,7 +6,8 @@ export declare class CommentOnPostTool extends OperationTool<TCommentOnPostParam
|
|
|
6
6
|
readonly name = "comment_on_post";
|
|
7
7
|
readonly operationName: "commentOnPost";
|
|
8
8
|
protected readonly schema: z.ZodObject<{
|
|
9
|
-
postUrl: z.ZodString
|
|
9
|
+
postUrl: z.ZodOptional<z.ZodString>;
|
|
10
|
+
postUrn: z.ZodOptional<z.ZodString>;
|
|
10
11
|
text: z.ZodString;
|
|
11
12
|
companyUrl: z.ZodOptional<z.ZodString>;
|
|
12
13
|
}, z.core.$strip>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comment-on-post.d.ts","sourceRoot":"","sources":["../../src/tools/comment-on-post.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAC7F,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAC1D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D,qBAAa,iBAAkB,SAAQ,aAAa,CAAC,oBAAoB,EAAE,oBAAoB,CAAC;IAC9F,SAAyB,IAAI,qBAAqB;IAClD,SAAyB,aAAa,kBAAgC;IACtE,mBAA4B,MAAM
|
|
1
|
+
{"version":3,"file":"comment-on-post.d.ts","sourceRoot":"","sources":["../../src/tools/comment-on-post.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAC7F,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAC1D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D,qBAAa,iBAAkB,SAAQ,aAAa,CAAC,oBAAoB,EAAE,oBAAoB,CAAC;IAC9F,SAAyB,IAAI,qBAAqB;IAClD,SAAyB,aAAa,kBAAgC;IACtE,mBAA4B,MAAM;;;;;sBAK/B;IAEa,OAAO,IAAI,IAAI;CAgChC"}
|
|
@@ -8,7 +8,8 @@ class CommentOnPostTool extends linked_api_tool_js_1.OperationTool {
|
|
|
8
8
|
name = 'comment_on_post';
|
|
9
9
|
operationName = node_1.OPERATION_NAME.commentOnPost;
|
|
10
10
|
schema = zod_1.z.object({
|
|
11
|
-
postUrl: zod_1.z.string(),
|
|
11
|
+
postUrl: zod_1.z.string().optional(),
|
|
12
|
+
postUrn: zod_1.z.string().optional(),
|
|
12
13
|
text: zod_1.z.string().min(1),
|
|
13
14
|
companyUrl: zod_1.z.string().optional(),
|
|
14
15
|
});
|
|
@@ -21,7 +22,11 @@ class CommentOnPostTool extends linked_api_tool_js_1.OperationTool {
|
|
|
21
22
|
properties: {
|
|
22
23
|
postUrl: {
|
|
23
24
|
type: 'string',
|
|
24
|
-
description: "The LinkedIn post URL to comment on (e.g., 'https://www.linkedin.com/posts/username_activity-id')",
|
|
25
|
+
description: "The LinkedIn post URL to comment on (e.g., 'https://www.linkedin.com/posts/username_activity-id') Provide this or postUrn.",
|
|
26
|
+
},
|
|
27
|
+
postUrn: {
|
|
28
|
+
type: 'string',
|
|
29
|
+
description: "URN of the post to comment on, as an alternative to postUrl. (e.g., 'urn:li:activity:1234567890123456789')",
|
|
25
30
|
},
|
|
26
31
|
text: {
|
|
27
32
|
type: 'string',
|
|
@@ -32,7 +37,7 @@ class CommentOnPostTool extends linked_api_tool_js_1.OperationTool {
|
|
|
32
37
|
description: "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')",
|
|
33
38
|
},
|
|
34
39
|
},
|
|
35
|
-
required: ['
|
|
40
|
+
required: ['text'],
|
|
36
41
|
},
|
|
37
42
|
};
|
|
38
43
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comment-on-post.js","sourceRoot":"","sources":["../../src/tools/comment-on-post.ts"],"names":[],"mappings":";;;AAAA,0CAA6F;AAE7F,6BAAwB;AAExB,oEAA4D;AAE5D,MAAa,iBAAkB,SAAQ,kCAAyD;IACrE,IAAI,GAAG,iBAAiB,CAAC;IACzB,aAAa,GAAG,qBAAc,CAAC,aAAa,CAAC;IAC1C,MAAM,GAAG,OAAC,CAAC,MAAM,CAAC;QAC5C,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE;
|
|
1
|
+
{"version":3,"file":"comment-on-post.js","sourceRoot":"","sources":["../../src/tools/comment-on-post.ts"],"names":[],"mappings":";;;AAAA,0CAA6F;AAE7F,6BAAwB;AAExB,oEAA4D;AAE5D,MAAa,iBAAkB,SAAQ,kCAAyD;IACrE,IAAI,GAAG,iBAAiB,CAAC;IACzB,aAAa,GAAG,qBAAc,CAAC,aAAa,CAAC;IAC1C,MAAM,GAAG,OAAC,CAAC,MAAM,CAAC;QAC5C,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC9B,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC9B,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;QACvB,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KAClC,CAAC,CAAC;IAEa,OAAO;QACrB,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,WAAW,EACT,wMAAwM;YAC1M,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,OAAO,EAAE;wBACP,IAAI,EAAE,QAAQ;wBACd,WAAW,EACT,4HAA4H;qBAC/H;oBACD,OAAO,EAAE;wBACP,IAAI,EAAE,QAAQ;wBACd,WAAW,EACT,4GAA4G;qBAC/G;oBACD,IAAI,EAAE;wBACJ,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,8CAA8C;qBAC5D;oBACD,UAAU,EAAE;wBACV,IAAI,EAAE,QAAQ;wBACd,WAAW,EACT,mJAAmJ;qBACtJ;iBACF;gBACD,QAAQ,EAAE,CAAC,MAAM,CAAC;aACnB;SACF,CAAC;IACJ,CAAC;CACF;AA1CD,8CA0CC"}
|
|
@@ -7,6 +7,13 @@ export declare class CreatePostTool extends OperationTool<TCreatePostParams, unk
|
|
|
7
7
|
readonly operationName: "createPost";
|
|
8
8
|
protected readonly schema: z.ZodObject<{
|
|
9
9
|
text: z.ZodString;
|
|
10
|
+
mentions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
11
|
+
key: z.ZodString;
|
|
12
|
+
name: z.ZodString;
|
|
13
|
+
urn: z.ZodOptional<z.ZodString>;
|
|
14
|
+
personHashedUrl: z.ZodOptional<z.ZodString>;
|
|
15
|
+
companyHashedUrl: z.ZodOptional<z.ZodString>;
|
|
16
|
+
}, z.core.$strip>>>;
|
|
10
17
|
companyUrl: z.ZodOptional<z.ZodString>;
|
|
11
18
|
attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
12
19
|
url: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-post.d.ts","sourceRoot":"","sources":["../../src/tools/create-post.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAC1D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D,qBAAa,cAAe,SAAQ,aAAa,CAAC,iBAAiB,EAAE,OAAO,CAAC;IAC3E,SAAyB,IAAI,iBAAiB;IAC9C,SAAyB,aAAa,eAA6B;IACnE,mBAA4B,MAAM
|
|
1
|
+
{"version":3,"file":"create-post.d.ts","sourceRoot":"","sources":["../../src/tools/create-post.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAC1D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D,qBAAa,cAAe,SAAQ,aAAa,CAAC,iBAAiB,EAAE,OAAO,CAAC;IAC3E,SAAyB,IAAI,iBAAiB;IAC9C,SAAyB,aAAa,eAA6B;IACnE,mBAA4B,MAAM;;;;;;;;;;;;;;;;;;;sBAwB/B;IAEa,OAAO,IAAI,IAAI;CAkFhC"}
|
|
@@ -9,6 +9,15 @@ class CreatePostTool extends linked_api_tool_js_1.OperationTool {
|
|
|
9
9
|
operationName = node_1.OPERATION_NAME.createPost;
|
|
10
10
|
schema = zod_1.z.object({
|
|
11
11
|
text: zod_1.z.string().min(1).max(3000),
|
|
12
|
+
mentions: zod_1.z
|
|
13
|
+
.array(zod_1.z.object({
|
|
14
|
+
key: zod_1.z.string(),
|
|
15
|
+
name: zod_1.z.string(),
|
|
16
|
+
urn: zod_1.z.string().optional(),
|
|
17
|
+
personHashedUrl: zod_1.z.string().optional(),
|
|
18
|
+
companyHashedUrl: zod_1.z.string().optional(),
|
|
19
|
+
}))
|
|
20
|
+
.optional(),
|
|
12
21
|
companyUrl: zod_1.z.string().optional(),
|
|
13
22
|
attachments: zod_1.z
|
|
14
23
|
.array(zod_1.z.object({
|
|
@@ -22,13 +31,43 @@ class CreatePostTool extends linked_api_tool_js_1.OperationTool {
|
|
|
22
31
|
getTool() {
|
|
23
32
|
return {
|
|
24
33
|
name: this.name,
|
|
25
|
-
description: 'Creates a new LinkedIn post with optional media attachments (st.createPost action). If this workflow is still running, do not retry this tool; retrying can create duplicate posts.',
|
|
34
|
+
description: 'Creates a new LinkedIn post with optional mentions and media attachments (st.createPost action). Returns the URL and URN of the new post. If this workflow is still running, do not retry this tool; retrying can create duplicate posts.',
|
|
26
35
|
inputSchema: {
|
|
27
36
|
type: 'object',
|
|
28
37
|
properties: {
|
|
29
38
|
text: {
|
|
30
39
|
type: 'string',
|
|
31
|
-
description: 'Post content, must be up to 3000 characters.',
|
|
40
|
+
description: 'Post content, must be up to 3000 characters. Write "@[key]" where a mention should appear and describe that key in mentions.',
|
|
41
|
+
},
|
|
42
|
+
mentions: {
|
|
43
|
+
type: 'array',
|
|
44
|
+
description: 'People and companies to mention in the text. Each item binds a "@[key]" placeholder to one entity.',
|
|
45
|
+
items: {
|
|
46
|
+
type: 'object',
|
|
47
|
+
properties: {
|
|
48
|
+
key: {
|
|
49
|
+
type: 'string',
|
|
50
|
+
description: 'Placeholder name used in the text as "@[key]". 1-30 characters: letters, digits, underscore or hyphen.',
|
|
51
|
+
},
|
|
52
|
+
name: {
|
|
53
|
+
type: 'string',
|
|
54
|
+
description: 'Name to find the person or company by. Always required: LinkedIn resolves a mention through its own name suggestions.',
|
|
55
|
+
},
|
|
56
|
+
urn: {
|
|
57
|
+
type: 'string',
|
|
58
|
+
description: "URN of the entity (e.g., 'urn:li:member:123456789' or 'urn:li:organization:1234567'). Decides which of the offered namesakes is taken.",
|
|
59
|
+
},
|
|
60
|
+
personHashedUrl: {
|
|
61
|
+
type: 'string',
|
|
62
|
+
description: 'Hashed LinkedIn profile URL of the person, as an alternative to urn.',
|
|
63
|
+
},
|
|
64
|
+
companyHashedUrl: {
|
|
65
|
+
type: 'string',
|
|
66
|
+
description: 'Hashed LinkedIn company page URL, as an alternative to urn.',
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
required: ['key', 'name'],
|
|
70
|
+
},
|
|
32
71
|
},
|
|
33
72
|
companyUrl: {
|
|
34
73
|
type: 'string',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-post.js","sourceRoot":"","sources":["../../src/tools/create-post.ts"],"names":[],"mappings":";;;AAAA,0CAAoE;AAEpE,6BAAwB;AAExB,oEAA4D;AAE5D,MAAa,cAAe,SAAQ,kCAAyC;IAClD,IAAI,GAAG,aAAa,CAAC;IACrB,aAAa,GAAG,qBAAc,CAAC,UAAU,CAAC;IACvC,MAAM,GAAG,OAAC,CAAC,MAAM,CAAC;QAC5C,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC;QACjC,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QACjC,WAAW,EAAE,OAAC;aACX,KAAK,CACJ,OAAC,CAAC,MAAM,CAAC;YACP,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;YACf,IAAI,EAAE,OAAC,CAAC,I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;oCACH,IAAI,EAAE,QAAQ;oCACd,WAAW,EAAE,4CAA4C;iCAC1D;gCACD,IAAI,EAAE;oCACJ,IAAI,EAAE,QAAQ;oCACd,IAAI,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,CAAC;oCACpC,WAAW,EAAE,2BAA2B;iCACzC;gCACD,IAAI,EAAE;oCACJ,IAAI,EAAE,QAAQ;oCACd,WAAW,EAAE,yDAAyD;iCACvE;6BACF;4BACD,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC;yBAC1B;qBACF;iBACF;gBACD,QAAQ,EAAE,CAAC,MAAM,CAAC;aACnB;SACF,CAAC;IACJ,CAAC;CACF;AA/GD,wCA+GC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { TCreateRepostParams } from '@linkedapi/node';
|
|
2
|
+
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import { OperationTool } from '../utils/linked-api-tool.js';
|
|
5
|
+
export declare class CreateRepostTool extends OperationTool<TCreateRepostParams, unknown> {
|
|
6
|
+
readonly name = "create_repost";
|
|
7
|
+
readonly operationName: "createRepost";
|
|
8
|
+
protected readonly schema: z.ZodObject<{
|
|
9
|
+
postUrl: z.ZodOptional<z.ZodString>;
|
|
10
|
+
postUrn: z.ZodOptional<z.ZodString>;
|
|
11
|
+
text: z.ZodOptional<z.ZodString>;
|
|
12
|
+
mentions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
13
|
+
key: z.ZodString;
|
|
14
|
+
name: z.ZodString;
|
|
15
|
+
urn: z.ZodOptional<z.ZodString>;
|
|
16
|
+
personHashedUrl: z.ZodOptional<z.ZodString>;
|
|
17
|
+
companyHashedUrl: z.ZodOptional<z.ZodString>;
|
|
18
|
+
}, z.core.$strip>>>;
|
|
19
|
+
}, z.core.$strip>;
|
|
20
|
+
getTool(): Tool;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=create-repost.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-repost.d.ts","sourceRoot":"","sources":["../../src/tools/create-repost.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtE,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAC1D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D,qBAAa,gBAAiB,SAAQ,aAAa,CAAC,mBAAmB,EAAE,OAAO,CAAC;IAC/E,SAAyB,IAAI,mBAAmB;IAChD,SAAyB,aAAa,iBAA+B;IACrE,mBAA4B,MAAM;;;;;;;;;;;sBAe/B;IAEa,OAAO,IAAI,IAAI;CA+DhC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CreateRepostTool = void 0;
|
|
4
|
+
const node_1 = require("@linkedapi/node");
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
const linked_api_tool_js_1 = require("../utils/linked-api-tool.js");
|
|
7
|
+
class CreateRepostTool extends linked_api_tool_js_1.OperationTool {
|
|
8
|
+
name = 'create_repost';
|
|
9
|
+
operationName = node_1.OPERATION_NAME.createRepost;
|
|
10
|
+
schema = zod_1.z.object({
|
|
11
|
+
postUrl: zod_1.z.string().optional(),
|
|
12
|
+
postUrn: zod_1.z.string().optional(),
|
|
13
|
+
text: zod_1.z.string().max(3000).optional(),
|
|
14
|
+
mentions: zod_1.z
|
|
15
|
+
.array(zod_1.z.object({
|
|
16
|
+
key: zod_1.z.string(),
|
|
17
|
+
name: zod_1.z.string(),
|
|
18
|
+
urn: zod_1.z.string().optional(),
|
|
19
|
+
personHashedUrl: zod_1.z.string().optional(),
|
|
20
|
+
companyHashedUrl: zod_1.z.string().optional(),
|
|
21
|
+
}))
|
|
22
|
+
.optional(),
|
|
23
|
+
});
|
|
24
|
+
getTool() {
|
|
25
|
+
return {
|
|
26
|
+
name: this.name,
|
|
27
|
+
description: 'Reposts a LinkedIn post, either as is or with your own commentary (st.createRepost action). Returns the URL and URN of the repost itself, which is a post of your own account, not of the post that was reshared. Reposting the same post twice from the same account fails with alreadyReposted. If this workflow is still running, do not retry this tool; retrying can create duplicate reposts.',
|
|
28
|
+
inputSchema: {
|
|
29
|
+
type: 'object',
|
|
30
|
+
properties: {
|
|
31
|
+
postUrl: {
|
|
32
|
+
type: 'string',
|
|
33
|
+
description: "LinkedIn URL of the post to repost. (e.g., 'https://www.linkedin.com/posts/username_activity-id') Provide this or postUrn.",
|
|
34
|
+
},
|
|
35
|
+
postUrn: {
|
|
36
|
+
type: 'string',
|
|
37
|
+
description: "URN of the post to repost, as an alternative to postUrl. (e.g., 'urn:li:activity:1234567890123456789')",
|
|
38
|
+
},
|
|
39
|
+
text: {
|
|
40
|
+
type: 'string',
|
|
41
|
+
description: 'Your own commentary, up to 3000 characters. Without it the post is reposted as is. Write "@[key]" where a mention should appear and describe that key in mentions.',
|
|
42
|
+
},
|
|
43
|
+
mentions: {
|
|
44
|
+
type: 'array',
|
|
45
|
+
description: 'People and companies to mention in the commentary. Each item binds a "@[key]" placeholder to one entity.',
|
|
46
|
+
items: {
|
|
47
|
+
type: 'object',
|
|
48
|
+
properties: {
|
|
49
|
+
key: {
|
|
50
|
+
type: 'string',
|
|
51
|
+
description: 'Placeholder name used in the text as "@[key]". 1-30 characters: letters, digits, underscore or hyphen.',
|
|
52
|
+
},
|
|
53
|
+
name: {
|
|
54
|
+
type: 'string',
|
|
55
|
+
description: 'Name to find the person or company by. Always required: LinkedIn resolves a mention through its own name suggestions.',
|
|
56
|
+
},
|
|
57
|
+
urn: {
|
|
58
|
+
type: 'string',
|
|
59
|
+
description: "URN of the entity (e.g., 'urn:li:member:123456789' or 'urn:li:organization:1234567'). Decides which of the offered namesakes is taken.",
|
|
60
|
+
},
|
|
61
|
+
personHashedUrl: {
|
|
62
|
+
type: 'string',
|
|
63
|
+
description: 'Hashed LinkedIn profile URL of the person, as an alternative to urn.',
|
|
64
|
+
},
|
|
65
|
+
companyHashedUrl: {
|
|
66
|
+
type: 'string',
|
|
67
|
+
description: 'Hashed LinkedIn company page URL, as an alternative to urn.',
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
required: ['key', 'name'],
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
required: [],
|
|
75
|
+
},
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
exports.CreateRepostTool = CreateRepostTool;
|
|
80
|
+
//# sourceMappingURL=create-repost.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-repost.js","sourceRoot":"","sources":["../../src/tools/create-repost.ts"],"names":[],"mappings":";;;AAAA,0CAAsE;AAEtE,6BAAwB;AAExB,oEAA4D;AAE5D,MAAa,gBAAiB,SAAQ,kCAA2C;IACtD,IAAI,GAAG,eAAe,CAAC;IACvB,aAAa,GAAG,qBAAc,CAAC,YAAY,CAAC;IACzC,MAAM,GAAG,OAAC,CAAC,MAAM,CAAC;QAC5C,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC9B,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC9B,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;QACrC,QAAQ,EAAE,OAAC;aACR,KAAK,CACJ,OAAC,CAAC,MAAM,CAAC;YACP,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;YACf,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;YAChB,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;YAC1B,eAAe,EAAE,OAAC,CAAC,MAAM,EA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ool<TFetchPostParams, unkno
|
|
|
6
6
|
readonly name = "fetch_post";
|
|
7
7
|
readonly operationName: "fetchPost";
|
|
8
8
|
protected readonly schema: z.ZodObject<{
|
|
9
|
-
postUrl: z.ZodString
|
|
9
|
+
postUrl: z.ZodOptional<z.ZodString>;
|
|
10
|
+
postUrn: z.ZodOptional<z.ZodString>;
|
|
10
11
|
retrieveComments: z.ZodOptional<z.ZodBoolean>;
|
|
11
12
|
retrieveReactions: z.ZodOptional<z.ZodBoolean>;
|
|
12
13
|
commentsRetrievalConfig: z.ZodOptional<z.ZodObject<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch-post.d.ts","sourceRoot":"","sources":["../../src/tools/fetch-post.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAC1D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D,qBAAa,aAAc,SAAQ,aAAa,CAAC,gBAAgB,EAAE,OAAO,CAAC;IACzE,SAAyB,IAAI,gBAAgB;IAC7C,SAAyB,aAAa,cAA4B;IAClE,mBAA4B,MAAM
|
|
1
|
+
{"version":3,"file":"fetch-post.d.ts","sourceRoot":"","sources":["../../src/tools/fetch-post.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAC1D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D,qBAAa,aAAc,SAAQ,aAAa,CAAC,gBAAgB,EAAE,OAAO,CAAC;IACzE,SAAyB,IAAI,gBAAgB;IAC7C,SAAyB,aAAa,cAA4B;IAClE,mBAA4B,MAAM;;;;;;;;;;;;;;;;sBAiB/B;IAEa,OAAO,IAAI,IAAI;CAmEhC"}
|
package/dist/tools/fetch-post.js
CHANGED
|
@@ -8,7 +8,8 @@ class FetchPostTool extends linked_api_tool_js_1.OperationTool {
|
|
|
8
8
|
name = 'fetch_post';
|
|
9
9
|
operationName = node_1.OPERATION_NAME.fetchPost;
|
|
10
10
|
schema = zod_1.z.object({
|
|
11
|
-
postUrl: zod_1.z.string(),
|
|
11
|
+
postUrl: zod_1.z.string().optional(),
|
|
12
|
+
postUrn: zod_1.z.string().optional(),
|
|
12
13
|
retrieveComments: zod_1.z.boolean().optional(),
|
|
13
14
|
retrieveReactions: zod_1.z.boolean().optional(),
|
|
14
15
|
commentsRetrievalConfig: zod_1.z
|
|
@@ -33,7 +34,11 @@ class FetchPostTool extends linked_api_tool_js_1.OperationTool {
|
|
|
33
34
|
properties: {
|
|
34
35
|
postUrl: {
|
|
35
36
|
type: 'string',
|
|
36
|
-
description: "LinkedIn URL of the post. (e.g., 'https://www.linkedin.com/posts/username_activity-id')",
|
|
37
|
+
description: "LinkedIn URL of the post. (e.g., 'https://www.linkedin.com/posts/username_activity-id') Provide this or postUrn.",
|
|
38
|
+
},
|
|
39
|
+
postUrn: {
|
|
40
|
+
type: 'string',
|
|
41
|
+
description: "URN of the post to fetch, as an alternative to postUrl. (e.g., 'urn:li:activity:1234567890123456789')",
|
|
37
42
|
},
|
|
38
43
|
retrieveComments: {
|
|
39
44
|
type: 'boolean',
|
|
@@ -73,7 +78,7 @@ class FetchPostTool extends linked_api_tool_js_1.OperationTool {
|
|
|
73
78
|
},
|
|
74
79
|
},
|
|
75
80
|
},
|
|
76
|
-
required: [
|
|
81
|
+
required: [],
|
|
77
82
|
},
|
|
78
83
|
};
|
|
79
84
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch-post.js","sourceRoot":"","sources":["../../src/tools/fetch-post.ts"],"names":[],"mappings":";;;AAAA,0CAAmE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etWorkflowResultTool extends LinkedApiTool<IGetWorkflowRes
|
|
|
42
42
|
reactToComment: "reactToComment";
|
|
43
43
|
replyToComment: "replyToComment";
|
|
44
44
|
createPost: "createPost";
|
|
45
|
+
createRepost: "createRepost";
|
|
45
46
|
retrieveFeed: "retrieveFeed";
|
|
46
47
|
retrieveSSI: "retrieveSSI";
|
|
47
48
|
retrievePerformance: "retrievePerformance";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-workflow-result.d.ts","sourceRoot":"","sources":["../../src/tools/get-workflow-result.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,EAAE,EAIhB,eAAe,EAGhB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAC1D,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AAE5E,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAK5D,UAAU,wBAAwB;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,qBAAa,qBAAsB,SAAQ,aAAa,CAAC,wBAAwB,EAAE,OAAO,CAAC;IACzF,SAAgB,IAAI,yBAAyB;IAC7C,SAAS,CAAC,QAAQ,CAAC,MAAM
|
|
1
|
+
{"version":3,"file":"get-workflow-result.d.ts","sourceRoot":"","sources":["../../src/tools/get-workflow-result.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,EAAE,EAIhB,eAAe,EAGhB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAC1D,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AAE5E,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAK5D,UAAU,wBAAwB;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,qBAAa,qBAAsB,SAAQ,aAAa,CAAC,wBAAwB,EAAE,OAAO,CAAC;IACzF,SAAgB,IAAI,yBAAyB;IAC7C,SAAS,CAAC,QAAQ,CAAC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAItB;IAEmB,OAAO,CAAC,EAC5B,SAAS,EACT,IAAI,EAAE,EAAE,UAAU,EAAE,aAAa,EAAE,WAAW,EAAE,EAChD,SAAS,GACV,EAAE;QACD,SAAS,EAAE,SAAS,CAAC;QACrB,IAAI,EAAE,wBAAwB,CAAC;QAC/B,SAAS,EAAE,MAAM,CAAC;KACnB,GAAG,OAAO,CAAC,eAAe,CAAC,OAAO,CAAC,GAAG,YAAY,CAAC;IAiCpC,OAAO,IAAI,IAAI;CA2BhC"}
|
|
@@ -6,7 +6,8 @@ export declare class ReactToPostTool extends OperationTool<TReactToPostParams, u
|
|
|
6
6
|
readonly name = "react_to_post";
|
|
7
7
|
readonly operationName: "reactToPost";
|
|
8
8
|
protected readonly schema: z.ZodObject<{
|
|
9
|
-
postUrl: z.ZodString
|
|
9
|
+
postUrl: z.ZodOptional<z.ZodString>;
|
|
10
|
+
postUrn: z.ZodOptional<z.ZodString>;
|
|
10
11
|
type: z.ZodUnion<[z.ZodEnum<{
|
|
11
12
|
like: "like";
|
|
12
13
|
love: "love";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-to-post.d.ts","sourceRoot":"","sources":["../../src/tools/react-to-post.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrE,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAC1D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D,qBAAa,eAAgB,SAAQ,aAAa,CAAC,kBAAkB,EAAE,OAAO,CAAC;IAC7E,SAAyB,IAAI,mBAAmB;IAChD,SAAyB,aAAa,gBAA8B;IACpE,mBAA4B,MAAM
|
|
1
|
+
{"version":3,"file":"react-to-post.d.ts","sourceRoot":"","sources":["../../src/tools/react-to-post.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrE,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAC1D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D,qBAAa,eAAgB,SAAQ,aAAa,CAAC,kBAAkB,EAAE,OAAO,CAAC;IAC7E,SAAyB,IAAI,mBAAmB;IAChD,SAAyB,aAAa,gBAA8B;IACpE,mBAA4B,MAAM;;;;;;;;;;;;sBAK/B;IAEa,OAAO,IAAI,IAAI;CAiChC"}
|
|
@@ -8,7 +8,8 @@ class ReactToPostTool extends linked_api_tool_js_1.OperationTool {
|
|
|
8
8
|
name = 'react_to_post';
|
|
9
9
|
operationName = node_1.OPERATION_NAME.reactToPost;
|
|
10
10
|
schema = zod_1.z.object({
|
|
11
|
-
postUrl: zod_1.z.string(),
|
|
11
|
+
postUrl: zod_1.z.string().optional(),
|
|
12
|
+
postUrn: zod_1.z.string().optional(),
|
|
12
13
|
type: zod_1.z.enum(['like', 'love', 'celebrate', 'support', 'funny', 'insightful']).or(zod_1.z.string()),
|
|
13
14
|
companyUrl: zod_1.z.string().optional(),
|
|
14
15
|
});
|
|
@@ -21,7 +22,11 @@ class ReactToPostTool extends linked_api_tool_js_1.OperationTool {
|
|
|
21
22
|
properties: {
|
|
22
23
|
postUrl: {
|
|
23
24
|
type: 'string',
|
|
24
|
-
description: "LinkedIn URL of the post to react. (e.g., 'https://www.linkedin.com/posts/username_activity-id')",
|
|
25
|
+
description: "LinkedIn URL of the post to react. (e.g., 'https://www.linkedin.com/posts/username_activity-id') Provide this or postUrn.",
|
|
26
|
+
},
|
|
27
|
+
postUrn: {
|
|
28
|
+
type: 'string',
|
|
29
|
+
description: "URN of the post to react to, as an alternative to postUrl. (e.g., 'urn:li:activity:1234567890123456789')",
|
|
25
30
|
},
|
|
26
31
|
type: {
|
|
27
32
|
type: 'string',
|
|
@@ -33,7 +38,7 @@ class ReactToPostTool extends linked_api_tool_js_1.OperationTool {
|
|
|
33
38
|
description: "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')",
|
|
34
39
|
},
|
|
35
40
|
},
|
|
36
|
-
required: ['
|
|
41
|
+
required: ['type'],
|
|
37
42
|
},
|
|
38
43
|
};
|
|
39
44
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-to-post.js","sourceRoot":"","sources":["../../src/tools/react-to-post.ts"],"names":[],"mappings":";;;AAAA,0CAAqE;AAErE,6BAAwB;AAExB,oEAA4D;AAE5D,MAAa,eAAgB,SAAQ,kCAA0C;IACpD,IAAI,GAAG,eAAe,CAAC;IACvB,aAAa,GAAG,qBAAc,CAAC,WAAW,CAAC;IACxC,MAAM,GAAG,OAAC,CAAC,MAAM,CAAC;QAC5C,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE;
|
|
1
|
+
{"version":3,"file":"react-to-post.js","sourceRoot":"","sources":["../../src/tools/react-to-post.ts"],"names":[],"mappings":";;;AAAA,0CAAqE;AAErE,6BAAwB;AAExB,oEAA4D;AAE5D,MAAa,eAAgB,SAAQ,kCAA0C;IACpD,IAAI,GAAG,eAAe,CAAC;IACvB,aAAa,GAAG,qBAAc,CAAC,WAAW,CAAC;IACxC,MAAM,GAAG,OAAC,CAAC,MAAM,CAAC;QAC5C,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC9B,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC9B,IAAI,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC;QAC5F,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KAClC,CAAC,CAAC;IAEa,OAAO;QACrB,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,WAAW,EACT,qMAAqM;YACvM,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,OAAO,EAAE;wBACP,IAAI,EAAE,QAAQ;wBACd,WAAW,EACT,2HAA2H;qBAC9H;oBACD,OAAO,EAAE;wBACP,IAAI,EAAE,QAAQ;wBACd,WAAW,EACT,0GAA0G;qBAC7G;oBACD,IAAI,EAAE;wBACJ,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,oCAAoC;wBACjD,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,OAAO,CAAC;qBACtE;oBACD,UAAU,EAAE;wBACV,IAAI,EAAE,QAAQ;wBACd,WAAW,EACT,oJAAoJ;qBACvJ;iBACF;gBACD,QAAQ,EAAE,CAAC,MAAM,CAAC;aACnB;SACF,CAAC;IACJ,CAAC;CACF;AA3CD,0CA2CC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@linkedapi/mcp",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.13",
|
|
4
4
|
"description": "MCP server that lets AI assistants control LinkedIn accounts and retrieve real-time data.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"author": "Linked API",
|
|
31
31
|
"license": "MIT",
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@linkedapi/node": "^2.3.
|
|
33
|
+
"@linkedapi/node": "^2.3.13",
|
|
34
34
|
"@modelcontextprotocol/sdk": "^1.17.4",
|
|
35
35
|
"zod": "^4.1.1"
|
|
36
36
|
},
|
|
@@ -56,4 +56,4 @@
|
|
|
56
56
|
"typescript": "^5.8.3",
|
|
57
57
|
"typescript-eslint": "^8.38.0"
|
|
58
58
|
}
|
|
59
|
-
}
|
|
59
|
+
}
|
package/src/linked-api-tools.ts
CHANGED
|
@@ -22,6 +22,7 @@ import { AdminSetSeatsTool } from './tools/admin-set-seats.js';
|
|
|
22
22
|
import { CheckConnectionStatusTool } from './tools/check-connection-status.js';
|
|
23
23
|
import { CommentOnPostTool } from './tools/comment-on-post.js';
|
|
24
24
|
import { CreatePostTool } from './tools/create-post.js';
|
|
25
|
+
import { CreateRepostTool } from './tools/create-repost.js';
|
|
25
26
|
import { ExecuteCustomWorkflowTool } from './tools/execute-custom-workflow.js';
|
|
26
27
|
import { FetchCompanyTool } from './tools/fetch-company.js';
|
|
27
28
|
import { FetchJobTool } from './tools/fetch-job.js';
|
|
@@ -114,6 +115,7 @@ export class LinkedApiTools {
|
|
|
114
115
|
new ReactToCommentTool(),
|
|
115
116
|
new ReplyToCommentTool(),
|
|
116
117
|
new CreatePostTool(),
|
|
118
|
+
new CreateRepostTool(),
|
|
117
119
|
new RetrieveFeedTool(),
|
|
118
120
|
new RetrieveProfileViewersTool(),
|
|
119
121
|
new RetrieveSSITool(),
|
|
@@ -8,7 +8,8 @@ export class CommentOnPostTool extends OperationTool<TCommentOnPostParams, TComm
|
|
|
8
8
|
public override readonly name = 'comment_on_post';
|
|
9
9
|
public override readonly operationName = OPERATION_NAME.commentOnPost;
|
|
10
10
|
protected override readonly schema = z.object({
|
|
11
|
-
postUrl: z.string(),
|
|
11
|
+
postUrl: z.string().optional(),
|
|
12
|
+
postUrn: z.string().optional(),
|
|
12
13
|
text: z.string().min(1),
|
|
13
14
|
companyUrl: z.string().optional(),
|
|
14
15
|
});
|
|
@@ -24,7 +25,12 @@ export class CommentOnPostTool extends OperationTool<TCommentOnPostParams, TComm
|
|
|
24
25
|
postUrl: {
|
|
25
26
|
type: 'string',
|
|
26
27
|
description:
|
|
27
|
-
"The LinkedIn post URL to comment on (e.g., 'https://www.linkedin.com/posts/username_activity-id')",
|
|
28
|
+
"The LinkedIn post URL to comment on (e.g., 'https://www.linkedin.com/posts/username_activity-id') Provide this or postUrn.",
|
|
29
|
+
},
|
|
30
|
+
postUrn: {
|
|
31
|
+
type: 'string',
|
|
32
|
+
description:
|
|
33
|
+
"URN of the post to comment on, as an alternative to postUrl. (e.g., 'urn:li:activity:1234567890123456789')",
|
|
28
34
|
},
|
|
29
35
|
text: {
|
|
30
36
|
type: 'string',
|
|
@@ -36,7 +42,7 @@ export class CommentOnPostTool extends OperationTool<TCommentOnPostParams, TComm
|
|
|
36
42
|
"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')",
|
|
37
43
|
},
|
|
38
44
|
},
|
|
39
|
-
required: ['
|
|
45
|
+
required: ['text'],
|
|
40
46
|
},
|
|
41
47
|
};
|
|
42
48
|
}
|
package/src/tools/create-post.ts
CHANGED
|
@@ -9,6 +9,17 @@ export class CreatePostTool extends OperationTool<TCreatePostParams, unknown> {
|
|
|
9
9
|
public override readonly operationName = OPERATION_NAME.createPost;
|
|
10
10
|
protected override readonly schema = z.object({
|
|
11
11
|
text: z.string().min(1).max(3000),
|
|
12
|
+
mentions: z
|
|
13
|
+
.array(
|
|
14
|
+
z.object({
|
|
15
|
+
key: z.string(),
|
|
16
|
+
name: z.string(),
|
|
17
|
+
urn: z.string().optional(),
|
|
18
|
+
personHashedUrl: z.string().optional(),
|
|
19
|
+
companyHashedUrl: z.string().optional(),
|
|
20
|
+
}),
|
|
21
|
+
)
|
|
22
|
+
.optional(),
|
|
12
23
|
companyUrl: z.string().optional(),
|
|
13
24
|
attachments: z
|
|
14
25
|
.array(
|
|
@@ -26,13 +37,49 @@ export class CreatePostTool extends OperationTool<TCreatePostParams, unknown> {
|
|
|
26
37
|
return {
|
|
27
38
|
name: this.name,
|
|
28
39
|
description:
|
|
29
|
-
'Creates a new LinkedIn post with optional media attachments (st.createPost action). If this workflow is still running, do not retry this tool; retrying can create duplicate posts.',
|
|
40
|
+
'Creates a new LinkedIn post with optional mentions and media attachments (st.createPost action). Returns the URL and URN of the new post. If this workflow is still running, do not retry this tool; retrying can create duplicate posts.',
|
|
30
41
|
inputSchema: {
|
|
31
42
|
type: 'object',
|
|
32
43
|
properties: {
|
|
33
44
|
text: {
|
|
34
45
|
type: 'string',
|
|
35
|
-
description:
|
|
46
|
+
description:
|
|
47
|
+
'Post content, must be up to 3000 characters. Write "@[key]" where a mention should appear and describe that key in mentions.',
|
|
48
|
+
},
|
|
49
|
+
mentions: {
|
|
50
|
+
type: 'array',
|
|
51
|
+
description:
|
|
52
|
+
'People and companies to mention in the text. Each item binds a "@[key]" placeholder to one entity.',
|
|
53
|
+
items: {
|
|
54
|
+
type: 'object',
|
|
55
|
+
properties: {
|
|
56
|
+
key: {
|
|
57
|
+
type: 'string',
|
|
58
|
+
description:
|
|
59
|
+
'Placeholder name used in the text as "@[key]". 1-30 characters: letters, digits, underscore or hyphen.',
|
|
60
|
+
},
|
|
61
|
+
name: {
|
|
62
|
+
type: 'string',
|
|
63
|
+
description:
|
|
64
|
+
'Name to find the person or company by. Always required: LinkedIn resolves a mention through its own name suggestions.',
|
|
65
|
+
},
|
|
66
|
+
urn: {
|
|
67
|
+
type: 'string',
|
|
68
|
+
description:
|
|
69
|
+
"URN of the entity (e.g., 'urn:li:member:123456789' or 'urn:li:organization:1234567'). Decides which of the offered namesakes is taken.",
|
|
70
|
+
},
|
|
71
|
+
personHashedUrl: {
|
|
72
|
+
type: 'string',
|
|
73
|
+
description:
|
|
74
|
+
'Hashed LinkedIn profile URL of the person, as an alternative to urn.',
|
|
75
|
+
},
|
|
76
|
+
companyHashedUrl: {
|
|
77
|
+
type: 'string',
|
|
78
|
+
description: 'Hashed LinkedIn company page URL, as an alternative to urn.',
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
required: ['key', 'name'],
|
|
82
|
+
},
|
|
36
83
|
},
|
|
37
84
|
companyUrl: {
|
|
38
85
|
type: 'string',
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { OPERATION_NAME, TCreateRepostParams } from '@linkedapi/node';
|
|
2
|
+
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
|
|
5
|
+
import { OperationTool } from '../utils/linked-api-tool.js';
|
|
6
|
+
|
|
7
|
+
export class CreateRepostTool extends OperationTool<TCreateRepostParams, unknown> {
|
|
8
|
+
public override readonly name = 'create_repost';
|
|
9
|
+
public override readonly operationName = OPERATION_NAME.createRepost;
|
|
10
|
+
protected override readonly schema = z.object({
|
|
11
|
+
postUrl: z.string().optional(),
|
|
12
|
+
postUrn: z.string().optional(),
|
|
13
|
+
text: z.string().max(3000).optional(),
|
|
14
|
+
mentions: z
|
|
15
|
+
.array(
|
|
16
|
+
z.object({
|
|
17
|
+
key: z.string(),
|
|
18
|
+
name: z.string(),
|
|
19
|
+
urn: z.string().optional(),
|
|
20
|
+
personHashedUrl: z.string().optional(),
|
|
21
|
+
companyHashedUrl: z.string().optional(),
|
|
22
|
+
}),
|
|
23
|
+
)
|
|
24
|
+
.optional(),
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
public override getTool(): Tool {
|
|
28
|
+
return {
|
|
29
|
+
name: this.name,
|
|
30
|
+
description:
|
|
31
|
+
'Reposts a LinkedIn post, either as is or with your own commentary (st.createRepost action). Returns the URL and URN of the repost itself, which is a post of your own account, not of the post that was reshared. Reposting the same post twice from the same account fails with alreadyReposted. If this workflow is still running, do not retry this tool; retrying can create duplicate reposts.',
|
|
32
|
+
inputSchema: {
|
|
33
|
+
type: 'object',
|
|
34
|
+
properties: {
|
|
35
|
+
postUrl: {
|
|
36
|
+
type: 'string',
|
|
37
|
+
description:
|
|
38
|
+
"LinkedIn URL of the post to repost. (e.g., 'https://www.linkedin.com/posts/username_activity-id') Provide this or postUrn.",
|
|
39
|
+
},
|
|
40
|
+
postUrn: {
|
|
41
|
+
type: 'string',
|
|
42
|
+
description:
|
|
43
|
+
"URN of the post to repost, as an alternative to postUrl. (e.g., 'urn:li:activity:1234567890123456789')",
|
|
44
|
+
},
|
|
45
|
+
text: {
|
|
46
|
+
type: 'string',
|
|
47
|
+
description:
|
|
48
|
+
'Your own commentary, up to 3000 characters. Without it the post is reposted as is. Write "@[key]" where a mention should appear and describe that key in mentions.',
|
|
49
|
+
},
|
|
50
|
+
mentions: {
|
|
51
|
+
type: 'array',
|
|
52
|
+
description:
|
|
53
|
+
'People and companies to mention in the commentary. Each item binds a "@[key]" placeholder to one entity.',
|
|
54
|
+
items: {
|
|
55
|
+
type: 'object',
|
|
56
|
+
properties: {
|
|
57
|
+
key: {
|
|
58
|
+
type: 'string',
|
|
59
|
+
description:
|
|
60
|
+
'Placeholder name used in the text as "@[key]". 1-30 characters: letters, digits, underscore or hyphen.',
|
|
61
|
+
},
|
|
62
|
+
name: {
|
|
63
|
+
type: 'string',
|
|
64
|
+
description:
|
|
65
|
+
'Name to find the person or company by. Always required: LinkedIn resolves a mention through its own name suggestions.',
|
|
66
|
+
},
|
|
67
|
+
urn: {
|
|
68
|
+
type: 'string',
|
|
69
|
+
description:
|
|
70
|
+
"URN of the entity (e.g., 'urn:li:member:123456789' or 'urn:li:organization:1234567'). Decides which of the offered namesakes is taken.",
|
|
71
|
+
},
|
|
72
|
+
personHashedUrl: {
|
|
73
|
+
type: 'string',
|
|
74
|
+
description:
|
|
75
|
+
'Hashed LinkedIn profile URL of the person, as an alternative to urn.',
|
|
76
|
+
},
|
|
77
|
+
companyHashedUrl: {
|
|
78
|
+
type: 'string',
|
|
79
|
+
description: 'Hashed LinkedIn company page URL, as an alternative to urn.',
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
required: ['key', 'name'],
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
required: [],
|
|
87
|
+
},
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
}
|
package/src/tools/fetch-post.ts
CHANGED
|
@@ -8,7 +8,8 @@ export class FetchPostTool extends OperationTool<TFetchPostParams, unknown> {
|
|
|
8
8
|
public override readonly name = 'fetch_post';
|
|
9
9
|
public override readonly operationName = OPERATION_NAME.fetchPost;
|
|
10
10
|
protected override readonly schema = z.object({
|
|
11
|
-
postUrl: z.string(),
|
|
11
|
+
postUrl: z.string().optional(),
|
|
12
|
+
postUrn: z.string().optional(),
|
|
12
13
|
retrieveComments: z.boolean().optional(),
|
|
13
14
|
retrieveReactions: z.boolean().optional(),
|
|
14
15
|
commentsRetrievalConfig: z
|
|
@@ -36,7 +37,12 @@ export class FetchPostTool extends OperationTool<TFetchPostParams, unknown> {
|
|
|
36
37
|
postUrl: {
|
|
37
38
|
type: 'string',
|
|
38
39
|
description:
|
|
39
|
-
"LinkedIn URL of the post. (e.g., 'https://www.linkedin.com/posts/username_activity-id')",
|
|
40
|
+
"LinkedIn URL of the post. (e.g., 'https://www.linkedin.com/posts/username_activity-id') Provide this or postUrn.",
|
|
41
|
+
},
|
|
42
|
+
postUrn: {
|
|
43
|
+
type: 'string',
|
|
44
|
+
description:
|
|
45
|
+
"URN of the post to fetch, as an alternative to postUrl. (e.g., 'urn:li:activity:1234567890123456789')",
|
|
40
46
|
},
|
|
41
47
|
retrieveComments: {
|
|
42
48
|
type: 'boolean',
|
|
@@ -83,7 +89,7 @@ export class FetchPostTool extends OperationTool<TFetchPostParams, unknown> {
|
|
|
83
89
|
},
|
|
84
90
|
},
|
|
85
91
|
},
|
|
86
|
-
required: [
|
|
92
|
+
required: [],
|
|
87
93
|
},
|
|
88
94
|
};
|
|
89
95
|
}
|
|
@@ -8,7 +8,8 @@ export class ReactToPostTool extends OperationTool<TReactToPostParams, unknown>
|
|
|
8
8
|
public override readonly name = 'react_to_post';
|
|
9
9
|
public override readonly operationName = OPERATION_NAME.reactToPost;
|
|
10
10
|
protected override readonly schema = z.object({
|
|
11
|
-
postUrl: z.string(),
|
|
11
|
+
postUrl: z.string().optional(),
|
|
12
|
+
postUrn: z.string().optional(),
|
|
12
13
|
type: z.enum(['like', 'love', 'celebrate', 'support', 'funny', 'insightful']).or(z.string()),
|
|
13
14
|
companyUrl: z.string().optional(),
|
|
14
15
|
});
|
|
@@ -24,7 +25,12 @@ export class ReactToPostTool extends OperationTool<TReactToPostParams, unknown>
|
|
|
24
25
|
postUrl: {
|
|
25
26
|
type: 'string',
|
|
26
27
|
description:
|
|
27
|
-
"LinkedIn URL of the post to react. (e.g., 'https://www.linkedin.com/posts/username_activity-id')",
|
|
28
|
+
"LinkedIn URL of the post to react. (e.g., 'https://www.linkedin.com/posts/username_activity-id') Provide this or postUrn.",
|
|
29
|
+
},
|
|
30
|
+
postUrn: {
|
|
31
|
+
type: 'string',
|
|
32
|
+
description:
|
|
33
|
+
"URN of the post to react to, as an alternative to postUrl. (e.g., 'urn:li:activity:1234567890123456789')",
|
|
28
34
|
},
|
|
29
35
|
type: {
|
|
30
36
|
type: 'string',
|
|
@@ -37,7 +43,7 @@ export class ReactToPostTool extends OperationTool<TReactToPostParams, unknown>
|
|
|
37
43
|
"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
44
|
},
|
|
39
45
|
},
|
|
40
|
-
required: ['
|
|
46
|
+
required: ['type'],
|
|
41
47
|
},
|
|
42
48
|
};
|
|
43
49
|
}
|