@@ -9,13 +9,27 @@ export class FetchPostTool extends OperationTool<TFetchPostParams, unknown> {
99 public override readonly operationName = OPERATION_NAME . fetchPost ;
1010 protected override readonly schema = z . object ( {
1111 postUrl : z . string ( ) ,
12+ retrieveComments : z . boolean ( ) . optional ( ) ,
13+ retrieveReactions : z . boolean ( ) . optional ( ) ,
14+ commentsRetrievalConfig : z
15+ . object ( {
16+ limit : z . number ( ) . min ( 1 ) . max ( 500 ) . optional ( ) ,
17+ replies : z . boolean ( ) . optional ( ) ,
18+ sort : z . enum ( [ 'mostRelevant' , 'mostRecent' ] ) . optional ( ) ,
19+ } )
20+ . optional ( ) ,
21+ reactionsRetrievalConfig : z
22+ . object ( {
23+ limit : z . number ( ) . min ( 1 ) . max ( 1000 ) . optional ( ) ,
24+ } )
25+ . optional ( ) ,
1226 } ) ;
1327
1428 public override getTool ( ) : Tool {
1529 return {
1630 name : this . name ,
1731 description :
18- 'This action allows you to open a post to retrieve its data. (st.openPost action).' ,
32+ 'Open a LinkedIn post and retrieve its data, with optional comments and reactions . (st.openPost action).' ,
1933 inputSchema : {
2034 type : 'object' ,
2135 properties : {
@@ -24,6 +38,50 @@ export class FetchPostTool extends OperationTool<TFetchPostParams, unknown> {
2438 description :
2539 "LinkedIn URL of the post. (e.g., 'https://www.linkedin.com/posts/username_activity-id')" ,
2640 } ,
41+ retrieveComments : {
42+ type : 'boolean' ,
43+ description :
44+ 'Optional. When true, also retrieve comments for the post. Configure via commentsRetrievalConfig.' ,
45+ } ,
46+ retrieveReactions : {
47+ type : 'boolean' ,
48+ description :
49+ 'Optional. When true, also retrieve reactions for the post. Configure via reactionsRetrievalConfig.' ,
50+ } ,
51+ commentsRetrievalConfig : {
52+ type : 'object' ,
53+ description :
54+ 'Optional. Applies only when retrieveComments is true. Controls comments retrieval (limit, replies, sort).' ,
55+ properties : {
56+ limit : {
57+ type : 'number' ,
58+ description :
59+ 'Optional. Max number of comments to retrieve. Defaults to 10, with a maximum value of 500.' ,
60+ } ,
61+ replies : {
62+ type : 'boolean' ,
63+ description : 'Optional. When true, include replies to comments (threaded).' ,
64+ } ,
65+ sort : {
66+ type : 'string' ,
67+ enum : [ 'mostRelevant' , 'mostRecent' ] ,
68+ description :
69+ "Optional. Sort order for comments. One of 'mostRelevant' or 'mostRecent'." ,
70+ } ,
71+ } ,
72+ } ,
73+ reactionsRetrievalConfig : {
74+ type : 'object' ,
75+ description :
76+ 'Optional. Applies only when retrieveReactions is true. Controls reactions retrieval (limit).' ,
77+ properties : {
78+ limit : {
79+ type : 'number' ,
80+ description :
81+ 'Optional. Max number of reactions to retrieve. Defaults to 10, with a maximum value of 1000.' ,
82+ } ,
83+ } ,
84+ } ,
2785 } ,
2886 required : [ 'postUrl' ] ,
2987 } ,
0 commit comments