posterly-mcp-server 0.23.2 → 0.24.1
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/README.md +5 -1
- package/dist/generated/platform-manifest.d.ts +82 -66
- package/dist/generated/platform-manifest.js +126 -77
- package/dist/index.js +40 -0
- package/dist/lib/api-client.d.ts +77 -0
- package/dist/lib/api-client.js +30 -0
- package/dist/lib/version.d.ts +1 -1
- package/dist/lib/version.js +1 -1
- package/dist/tools/create-connect-session.d.ts +3 -3
- package/dist/tools/create-connect-session.js +1 -1
- package/dist/tools/create-post.d.ts +27 -9
- package/dist/tools/create-post.js +2 -1
- package/dist/tools/create-posts-batch.d.ts +12 -5
- package/dist/tools/dismiss-suggestion.d.ts +16 -0
- package/dist/tools/dismiss-suggestion.js +18 -0
- package/dist/tools/get-connect-link.d.ts +3 -3
- package/dist/tools/get-performance-profile.d.ts +16 -0
- package/dist/tools/get-performance-profile.js +39 -0
- package/dist/tools/get-platform-schema.d.ts +3 -3
- package/dist/tools/get-post-insights.d.ts +28 -0
- package/dist/tools/get-post-insights.js +39 -0
- package/dist/tools/get-video-job.d.ts +2 -2
- package/dist/tools/list-activity.d.ts +2 -2
- package/dist/tools/list-post-suggestions.d.ts +24 -0
- package/dist/tools/list-post-suggestions.js +36 -0
- package/dist/tools/list-posts.d.ts +3 -3
- package/dist/tools/trigger-platform-helper.d.ts +6 -6
- package/dist/tools/update-post.d.ts +8 -0
- package/dist/tools/update-post.js +2 -1
- package/package.json +1 -1
- package/src/generated/platform-manifest.ts +126 -77
- package/src/index.ts +60 -0
- package/src/lib/api-client.ts +107 -0
- package/src/lib/version.ts +1 -1
- package/src/tools/create-connect-session.ts +1 -1
- package/src/tools/create-post.ts +2 -1
- package/src/tools/dismiss-suggestion.ts +22 -0
- package/src/tools/get-performance-profile.ts +47 -0
- package/src/tools/get-post-insights.ts +60 -0
- package/src/tools/list-post-suggestions.ts +56 -0
- package/src/tools/update-post.ts +2 -1
|
@@ -103,6 +103,7 @@ export declare const platformSettingsSchema: z.ZodObject<{
|
|
|
103
103
|
}>>;
|
|
104
104
|
reply_control: z.ZodOptional<z.ZodEnum<["everyone", "accounts_you_follow", "mentioned_only", "followers_only", "parent_post_author_only"]>>;
|
|
105
105
|
topic_tag: z.ZodOptional<z.ZodString>;
|
|
106
|
+
share_to_instagram: z.ZodOptional<z.ZodBoolean>;
|
|
106
107
|
text_attachment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
107
108
|
text_format_preset_id: z.ZodOptional<z.ZodString>;
|
|
108
109
|
document_title: z.ZodOptional<z.ZodString>;
|
|
@@ -178,6 +179,7 @@ export declare const platformSettingsSchema: z.ZodObject<{
|
|
|
178
179
|
}>>;
|
|
179
180
|
reply_control: z.ZodOptional<z.ZodEnum<["everyone", "accounts_you_follow", "mentioned_only", "followers_only", "parent_post_author_only"]>>;
|
|
180
181
|
topic_tag: z.ZodOptional<z.ZodString>;
|
|
182
|
+
share_to_instagram: z.ZodOptional<z.ZodBoolean>;
|
|
181
183
|
text_attachment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
182
184
|
text_format_preset_id: z.ZodOptional<z.ZodString>;
|
|
183
185
|
document_title: z.ZodOptional<z.ZodString>;
|
|
@@ -253,6 +255,7 @@ export declare const platformSettingsSchema: z.ZodObject<{
|
|
|
253
255
|
}>>;
|
|
254
256
|
reply_control: z.ZodOptional<z.ZodEnum<["everyone", "accounts_you_follow", "mentioned_only", "followers_only", "parent_post_author_only"]>>;
|
|
255
257
|
topic_tag: z.ZodOptional<z.ZodString>;
|
|
258
|
+
share_to_instagram: z.ZodOptional<z.ZodBoolean>;
|
|
256
259
|
text_attachment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
257
260
|
text_format_preset_id: z.ZodOptional<z.ZodString>;
|
|
258
261
|
document_title: z.ZodOptional<z.ZodString>;
|
|
@@ -303,7 +306,7 @@ export declare const platformSettingsSchema: z.ZodObject<{
|
|
|
303
306
|
export declare const createPostPayloadInputSchema: z.ZodObject<{
|
|
304
307
|
account_id: z.ZodOptional<z.ZodString>;
|
|
305
308
|
username: z.ZodOptional<z.ZodString>;
|
|
306
|
-
platform: z.ZodOptional<z.ZodEnum<["bluesky", "facebook", "gmb", "google-business", "google_business", "google_business_profile", "instagram", "instagram-standalone", "linkedin", "pinterest", "telegram", "threads", "tiktok", "twitter", "x", "youtube"]>>;
|
|
309
|
+
platform: z.ZodOptional<z.ZodEnum<["bluesky", "devto", "discord", "facebook", "gmb", "google-business", "google_business", "google_business_profile", "hashnode", "instagram", "instagram-standalone", "lemmy", "linkedin", "mastodon", "pinterest", "telegram", "threads", "tiktok", "twitter", "wordpress", "x", "youtube"]>>;
|
|
307
310
|
caption: z.ZodOptional<z.ZodString>;
|
|
308
311
|
scheduled_at: z.ZodOptional<z.ZodString>;
|
|
309
312
|
media_url: z.ZodOptional<z.ZodString>;
|
|
@@ -413,6 +416,7 @@ export declare const createPostPayloadInputSchema: z.ZodObject<{
|
|
|
413
416
|
}>>;
|
|
414
417
|
reply_control: z.ZodOptional<z.ZodEnum<["everyone", "accounts_you_follow", "mentioned_only", "followers_only", "parent_post_author_only"]>>;
|
|
415
418
|
topic_tag: z.ZodOptional<z.ZodString>;
|
|
419
|
+
share_to_instagram: z.ZodOptional<z.ZodBoolean>;
|
|
416
420
|
text_attachment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
417
421
|
text_format_preset_id: z.ZodOptional<z.ZodString>;
|
|
418
422
|
document_title: z.ZodOptional<z.ZodString>;
|
|
@@ -488,6 +492,7 @@ export declare const createPostPayloadInputSchema: z.ZodObject<{
|
|
|
488
492
|
}>>;
|
|
489
493
|
reply_control: z.ZodOptional<z.ZodEnum<["everyone", "accounts_you_follow", "mentioned_only", "followers_only", "parent_post_author_only"]>>;
|
|
490
494
|
topic_tag: z.ZodOptional<z.ZodString>;
|
|
495
|
+
share_to_instagram: z.ZodOptional<z.ZodBoolean>;
|
|
491
496
|
text_attachment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
492
497
|
text_format_preset_id: z.ZodOptional<z.ZodString>;
|
|
493
498
|
document_title: z.ZodOptional<z.ZodString>;
|
|
@@ -563,6 +568,7 @@ export declare const createPostPayloadInputSchema: z.ZodObject<{
|
|
|
563
568
|
}>>;
|
|
564
569
|
reply_control: z.ZodOptional<z.ZodEnum<["everyone", "accounts_you_follow", "mentioned_only", "followers_only", "parent_post_author_only"]>>;
|
|
565
570
|
topic_tag: z.ZodOptional<z.ZodString>;
|
|
571
|
+
share_to_instagram: z.ZodOptional<z.ZodBoolean>;
|
|
566
572
|
text_attachment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
567
573
|
text_format_preset_id: z.ZodOptional<z.ZodString>;
|
|
568
574
|
document_title: z.ZodOptional<z.ZodString>;
|
|
@@ -613,7 +619,7 @@ export declare const createPostPayloadInputSchema: z.ZodObject<{
|
|
|
613
619
|
workspace_id: z.ZodOptional<z.ZodString>;
|
|
614
620
|
}, "strip", z.ZodTypeAny, {
|
|
615
621
|
workspace_id?: string | undefined;
|
|
616
|
-
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "telegram" | "bluesky" | "gmb" | "google-business" | "google_business_profile" | "x" | undefined;
|
|
622
|
+
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "telegram" | "bluesky" | "discord" | "mastodon" | "devto" | "hashnode" | "wordpress" | "lemmy" | "gmb" | "google-business" | "google_business_profile" | "x" | undefined;
|
|
617
623
|
account_id?: string | undefined;
|
|
618
624
|
scheduled_at?: string | undefined;
|
|
619
625
|
media_url?: string | undefined;
|
|
@@ -671,6 +677,7 @@ export declare const createPostPayloadInputSchema: z.ZodObject<{
|
|
|
671
677
|
}>>;
|
|
672
678
|
reply_control: z.ZodOptional<z.ZodEnum<["everyone", "accounts_you_follow", "mentioned_only", "followers_only", "parent_post_author_only"]>>;
|
|
673
679
|
topic_tag: z.ZodOptional<z.ZodString>;
|
|
680
|
+
share_to_instagram: z.ZodOptional<z.ZodBoolean>;
|
|
674
681
|
text_attachment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
675
682
|
text_format_preset_id: z.ZodOptional<z.ZodString>;
|
|
676
683
|
document_title: z.ZodOptional<z.ZodString>;
|
|
@@ -720,7 +727,7 @@ export declare const createPostPayloadInputSchema: z.ZodObject<{
|
|
|
720
727
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
721
728
|
}, {
|
|
722
729
|
workspace_id?: string | undefined;
|
|
723
|
-
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "telegram" | "bluesky" | "gmb" | "google-business" | "google_business_profile" | "x" | undefined;
|
|
730
|
+
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "telegram" | "bluesky" | "discord" | "mastodon" | "devto" | "hashnode" | "wordpress" | "lemmy" | "gmb" | "google-business" | "google_business_profile" | "x" | undefined;
|
|
724
731
|
account_id?: string | undefined;
|
|
725
732
|
scheduled_at?: string | undefined;
|
|
726
733
|
media_url?: string | undefined;
|
|
@@ -778,6 +785,7 @@ export declare const createPostPayloadInputSchema: z.ZodObject<{
|
|
|
778
785
|
}>>;
|
|
779
786
|
reply_control: z.ZodOptional<z.ZodEnum<["everyone", "accounts_you_follow", "mentioned_only", "followers_only", "parent_post_author_only"]>>;
|
|
780
787
|
topic_tag: z.ZodOptional<z.ZodString>;
|
|
788
|
+
share_to_instagram: z.ZodOptional<z.ZodBoolean>;
|
|
781
789
|
text_attachment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
782
790
|
text_format_preset_id: z.ZodOptional<z.ZodString>;
|
|
783
791
|
document_title: z.ZodOptional<z.ZodString>;
|
|
@@ -829,7 +837,7 @@ export declare const createPostPayloadInputSchema: z.ZodObject<{
|
|
|
829
837
|
export declare const createPostInputSchema: z.ZodObject<{
|
|
830
838
|
account_id: z.ZodOptional<z.ZodString>;
|
|
831
839
|
username: z.ZodOptional<z.ZodString>;
|
|
832
|
-
platform: z.ZodOptional<z.ZodEnum<["bluesky", "facebook", "gmb", "google-business", "google_business", "google_business_profile", "instagram", "instagram-standalone", "linkedin", "pinterest", "telegram", "threads", "tiktok", "twitter", "x", "youtube"]>>;
|
|
840
|
+
platform: z.ZodOptional<z.ZodEnum<["bluesky", "devto", "discord", "facebook", "gmb", "google-business", "google_business", "google_business_profile", "hashnode", "instagram", "instagram-standalone", "lemmy", "linkedin", "mastodon", "pinterest", "telegram", "threads", "tiktok", "twitter", "wordpress", "x", "youtube"]>>;
|
|
833
841
|
caption: z.ZodOptional<z.ZodString>;
|
|
834
842
|
scheduled_at: z.ZodOptional<z.ZodString>;
|
|
835
843
|
media_url: z.ZodOptional<z.ZodString>;
|
|
@@ -939,6 +947,7 @@ export declare const createPostInputSchema: z.ZodObject<{
|
|
|
939
947
|
}>>;
|
|
940
948
|
reply_control: z.ZodOptional<z.ZodEnum<["everyone", "accounts_you_follow", "mentioned_only", "followers_only", "parent_post_author_only"]>>;
|
|
941
949
|
topic_tag: z.ZodOptional<z.ZodString>;
|
|
950
|
+
share_to_instagram: z.ZodOptional<z.ZodBoolean>;
|
|
942
951
|
text_attachment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
943
952
|
text_format_preset_id: z.ZodOptional<z.ZodString>;
|
|
944
953
|
document_title: z.ZodOptional<z.ZodString>;
|
|
@@ -1014,6 +1023,7 @@ export declare const createPostInputSchema: z.ZodObject<{
|
|
|
1014
1023
|
}>>;
|
|
1015
1024
|
reply_control: z.ZodOptional<z.ZodEnum<["everyone", "accounts_you_follow", "mentioned_only", "followers_only", "parent_post_author_only"]>>;
|
|
1016
1025
|
topic_tag: z.ZodOptional<z.ZodString>;
|
|
1026
|
+
share_to_instagram: z.ZodOptional<z.ZodBoolean>;
|
|
1017
1027
|
text_attachment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1018
1028
|
text_format_preset_id: z.ZodOptional<z.ZodString>;
|
|
1019
1029
|
document_title: z.ZodOptional<z.ZodString>;
|
|
@@ -1089,6 +1099,7 @@ export declare const createPostInputSchema: z.ZodObject<{
|
|
|
1089
1099
|
}>>;
|
|
1090
1100
|
reply_control: z.ZodOptional<z.ZodEnum<["everyone", "accounts_you_follow", "mentioned_only", "followers_only", "parent_post_author_only"]>>;
|
|
1091
1101
|
topic_tag: z.ZodOptional<z.ZodString>;
|
|
1102
|
+
share_to_instagram: z.ZodOptional<z.ZodBoolean>;
|
|
1092
1103
|
text_attachment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1093
1104
|
text_format_preset_id: z.ZodOptional<z.ZodString>;
|
|
1094
1105
|
document_title: z.ZodOptional<z.ZodString>;
|
|
@@ -1142,7 +1153,7 @@ export declare const createPostInputSchema: z.ZodObject<{
|
|
|
1142
1153
|
}, "strip", z.ZodTypeAny, {
|
|
1143
1154
|
confirm: true;
|
|
1144
1155
|
workspace_id?: string | undefined;
|
|
1145
|
-
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "telegram" | "bluesky" | "gmb" | "google-business" | "google_business_profile" | "x" | undefined;
|
|
1156
|
+
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "telegram" | "bluesky" | "discord" | "mastodon" | "devto" | "hashnode" | "wordpress" | "lemmy" | "gmb" | "google-business" | "google_business_profile" | "x" | undefined;
|
|
1146
1157
|
account_id?: string | undefined;
|
|
1147
1158
|
scheduled_at?: string | undefined;
|
|
1148
1159
|
media_url?: string | undefined;
|
|
@@ -1200,6 +1211,7 @@ export declare const createPostInputSchema: z.ZodObject<{
|
|
|
1200
1211
|
}>>;
|
|
1201
1212
|
reply_control: z.ZodOptional<z.ZodEnum<["everyone", "accounts_you_follow", "mentioned_only", "followers_only", "parent_post_author_only"]>>;
|
|
1202
1213
|
topic_tag: z.ZodOptional<z.ZodString>;
|
|
1214
|
+
share_to_instagram: z.ZodOptional<z.ZodBoolean>;
|
|
1203
1215
|
text_attachment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1204
1216
|
text_format_preset_id: z.ZodOptional<z.ZodString>;
|
|
1205
1217
|
document_title: z.ZodOptional<z.ZodString>;
|
|
@@ -1250,7 +1262,7 @@ export declare const createPostInputSchema: z.ZodObject<{
|
|
|
1250
1262
|
}, {
|
|
1251
1263
|
confirm: true;
|
|
1252
1264
|
workspace_id?: string | undefined;
|
|
1253
|
-
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "telegram" | "bluesky" | "gmb" | "google-business" | "google_business_profile" | "x" | undefined;
|
|
1265
|
+
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "telegram" | "bluesky" | "discord" | "mastodon" | "devto" | "hashnode" | "wordpress" | "lemmy" | "gmb" | "google-business" | "google_business_profile" | "x" | undefined;
|
|
1254
1266
|
account_id?: string | undefined;
|
|
1255
1267
|
scheduled_at?: string | undefined;
|
|
1256
1268
|
media_url?: string | undefined;
|
|
@@ -1308,6 +1320,7 @@ export declare const createPostInputSchema: z.ZodObject<{
|
|
|
1308
1320
|
}>>;
|
|
1309
1321
|
reply_control: z.ZodOptional<z.ZodEnum<["everyone", "accounts_you_follow", "mentioned_only", "followers_only", "parent_post_author_only"]>>;
|
|
1310
1322
|
topic_tag: z.ZodOptional<z.ZodString>;
|
|
1323
|
+
share_to_instagram: z.ZodOptional<z.ZodBoolean>;
|
|
1311
1324
|
text_attachment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1312
1325
|
text_format_preset_id: z.ZodOptional<z.ZodString>;
|
|
1313
1326
|
document_title: z.ZodOptional<z.ZodString>;
|
|
@@ -1365,7 +1378,7 @@ export declare const createPostTool: {
|
|
|
1365
1378
|
inputSchema: z.ZodObject<{
|
|
1366
1379
|
account_id: z.ZodOptional<z.ZodString>;
|
|
1367
1380
|
username: z.ZodOptional<z.ZodString>;
|
|
1368
|
-
platform: z.ZodOptional<z.ZodEnum<["bluesky", "facebook", "gmb", "google-business", "google_business", "google_business_profile", "instagram", "instagram-standalone", "linkedin", "pinterest", "telegram", "threads", "tiktok", "twitter", "x", "youtube"]>>;
|
|
1381
|
+
platform: z.ZodOptional<z.ZodEnum<["bluesky", "devto", "discord", "facebook", "gmb", "google-business", "google_business", "google_business_profile", "hashnode", "instagram", "instagram-standalone", "lemmy", "linkedin", "mastodon", "pinterest", "telegram", "threads", "tiktok", "twitter", "wordpress", "x", "youtube"]>>;
|
|
1369
1382
|
caption: z.ZodOptional<z.ZodString>;
|
|
1370
1383
|
scheduled_at: z.ZodOptional<z.ZodString>;
|
|
1371
1384
|
media_url: z.ZodOptional<z.ZodString>;
|
|
@@ -1475,6 +1488,7 @@ export declare const createPostTool: {
|
|
|
1475
1488
|
}>>;
|
|
1476
1489
|
reply_control: z.ZodOptional<z.ZodEnum<["everyone", "accounts_you_follow", "mentioned_only", "followers_only", "parent_post_author_only"]>>;
|
|
1477
1490
|
topic_tag: z.ZodOptional<z.ZodString>;
|
|
1491
|
+
share_to_instagram: z.ZodOptional<z.ZodBoolean>;
|
|
1478
1492
|
text_attachment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1479
1493
|
text_format_preset_id: z.ZodOptional<z.ZodString>;
|
|
1480
1494
|
document_title: z.ZodOptional<z.ZodString>;
|
|
@@ -1550,6 +1564,7 @@ export declare const createPostTool: {
|
|
|
1550
1564
|
}>>;
|
|
1551
1565
|
reply_control: z.ZodOptional<z.ZodEnum<["everyone", "accounts_you_follow", "mentioned_only", "followers_only", "parent_post_author_only"]>>;
|
|
1552
1566
|
topic_tag: z.ZodOptional<z.ZodString>;
|
|
1567
|
+
share_to_instagram: z.ZodOptional<z.ZodBoolean>;
|
|
1553
1568
|
text_attachment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1554
1569
|
text_format_preset_id: z.ZodOptional<z.ZodString>;
|
|
1555
1570
|
document_title: z.ZodOptional<z.ZodString>;
|
|
@@ -1625,6 +1640,7 @@ export declare const createPostTool: {
|
|
|
1625
1640
|
}>>;
|
|
1626
1641
|
reply_control: z.ZodOptional<z.ZodEnum<["everyone", "accounts_you_follow", "mentioned_only", "followers_only", "parent_post_author_only"]>>;
|
|
1627
1642
|
topic_tag: z.ZodOptional<z.ZodString>;
|
|
1643
|
+
share_to_instagram: z.ZodOptional<z.ZodBoolean>;
|
|
1628
1644
|
text_attachment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1629
1645
|
text_format_preset_id: z.ZodOptional<z.ZodString>;
|
|
1630
1646
|
document_title: z.ZodOptional<z.ZodString>;
|
|
@@ -1678,7 +1694,7 @@ export declare const createPostTool: {
|
|
|
1678
1694
|
}, "strip", z.ZodTypeAny, {
|
|
1679
1695
|
confirm: true;
|
|
1680
1696
|
workspace_id?: string | undefined;
|
|
1681
|
-
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "telegram" | "bluesky" | "gmb" | "google-business" | "google_business_profile" | "x" | undefined;
|
|
1697
|
+
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "telegram" | "bluesky" | "discord" | "mastodon" | "devto" | "hashnode" | "wordpress" | "lemmy" | "gmb" | "google-business" | "google_business_profile" | "x" | undefined;
|
|
1682
1698
|
account_id?: string | undefined;
|
|
1683
1699
|
scheduled_at?: string | undefined;
|
|
1684
1700
|
media_url?: string | undefined;
|
|
@@ -1736,6 +1752,7 @@ export declare const createPostTool: {
|
|
|
1736
1752
|
}>>;
|
|
1737
1753
|
reply_control: z.ZodOptional<z.ZodEnum<["everyone", "accounts_you_follow", "mentioned_only", "followers_only", "parent_post_author_only"]>>;
|
|
1738
1754
|
topic_tag: z.ZodOptional<z.ZodString>;
|
|
1755
|
+
share_to_instagram: z.ZodOptional<z.ZodBoolean>;
|
|
1739
1756
|
text_attachment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1740
1757
|
text_format_preset_id: z.ZodOptional<z.ZodString>;
|
|
1741
1758
|
document_title: z.ZodOptional<z.ZodString>;
|
|
@@ -1786,7 +1803,7 @@ export declare const createPostTool: {
|
|
|
1786
1803
|
}, {
|
|
1787
1804
|
confirm: true;
|
|
1788
1805
|
workspace_id?: string | undefined;
|
|
1789
|
-
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "telegram" | "bluesky" | "gmb" | "google-business" | "google_business_profile" | "x" | undefined;
|
|
1806
|
+
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "telegram" | "bluesky" | "discord" | "mastodon" | "devto" | "hashnode" | "wordpress" | "lemmy" | "gmb" | "google-business" | "google_business_profile" | "x" | undefined;
|
|
1790
1807
|
account_id?: string | undefined;
|
|
1791
1808
|
scheduled_at?: string | undefined;
|
|
1792
1809
|
media_url?: string | undefined;
|
|
@@ -1844,6 +1861,7 @@ export declare const createPostTool: {
|
|
|
1844
1861
|
}>>;
|
|
1845
1862
|
reply_control: z.ZodOptional<z.ZodEnum<["everyone", "accounts_you_follow", "mentioned_only", "followers_only", "parent_post_author_only"]>>;
|
|
1846
1863
|
topic_tag: z.ZodOptional<z.ZodString>;
|
|
1864
|
+
share_to_instagram: z.ZodOptional<z.ZodBoolean>;
|
|
1847
1865
|
text_attachment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1848
1866
|
text_format_preset_id: z.ZodOptional<z.ZodString>;
|
|
1849
1867
|
document_title: z.ZodOptional<z.ZodString>;
|
|
@@ -36,6 +36,7 @@ export const platformSettingsSchema = z.object({
|
|
|
36
36
|
// Threads
|
|
37
37
|
reply_control: z.enum(['everyone', 'accounts_you_follow', 'mentioned_only', 'followers_only', 'parent_post_author_only']).optional(),
|
|
38
38
|
topic_tag: z.string().optional(), // Threads single discovery topic tag
|
|
39
|
+
share_to_instagram: z.boolean().optional(), // Threads: also share the published post to the linked Instagram account as a Story
|
|
39
40
|
text_attachment: z.record(z.unknown()).optional(),
|
|
40
41
|
// Facebook
|
|
41
42
|
text_format_preset_id: z.string().optional(),
|
|
@@ -105,7 +106,7 @@ export const createPostPayloadInputSchema = z.object({
|
|
|
105
106
|
post_type: z
|
|
106
107
|
.string()
|
|
107
108
|
.optional()
|
|
108
|
-
.describe('
|
|
109
|
+
.describe('Optional post type: text, image, video, carousel, reel, story, story_series, document, photo, cover_photo, x_thread, or threads_thread. Omit it for auto-detection from media. For TikTok photo posts, use photo/image/carousel or omit it; for Facebook cover photos, use cover_photo or platform_settings.post_type.'),
|
|
109
110
|
thread_posts: z
|
|
110
111
|
.array(z.string())
|
|
111
112
|
.optional()
|
|
@@ -8,7 +8,7 @@ export declare const createPostsBatchTool: {
|
|
|
8
8
|
posts: z.ZodArray<z.ZodObject<{
|
|
9
9
|
account_id: z.ZodOptional<z.ZodString>;
|
|
10
10
|
username: z.ZodOptional<z.ZodString>;
|
|
11
|
-
platform: z.ZodOptional<z.ZodEnum<["bluesky", "facebook", "gmb", "google-business", "google_business", "google_business_profile", "instagram", "instagram-standalone", "linkedin", "pinterest", "telegram", "threads", "tiktok", "twitter", "x", "youtube"]>>;
|
|
11
|
+
platform: z.ZodOptional<z.ZodEnum<["bluesky", "devto", "discord", "facebook", "gmb", "google-business", "google_business", "google_business_profile", "hashnode", "instagram", "instagram-standalone", "lemmy", "linkedin", "mastodon", "pinterest", "telegram", "threads", "tiktok", "twitter", "wordpress", "x", "youtube"]>>;
|
|
12
12
|
caption: z.ZodOptional<z.ZodString>;
|
|
13
13
|
scheduled_at: z.ZodOptional<z.ZodString>;
|
|
14
14
|
media_url: z.ZodOptional<z.ZodString>;
|
|
@@ -118,6 +118,7 @@ export declare const createPostsBatchTool: {
|
|
|
118
118
|
}>>;
|
|
119
119
|
reply_control: z.ZodOptional<z.ZodEnum<["everyone", "accounts_you_follow", "mentioned_only", "followers_only", "parent_post_author_only"]>>;
|
|
120
120
|
topic_tag: z.ZodOptional<z.ZodString>;
|
|
121
|
+
share_to_instagram: z.ZodOptional<z.ZodBoolean>;
|
|
121
122
|
text_attachment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
122
123
|
text_format_preset_id: z.ZodOptional<z.ZodString>;
|
|
123
124
|
document_title: z.ZodOptional<z.ZodString>;
|
|
@@ -193,6 +194,7 @@ export declare const createPostsBatchTool: {
|
|
|
193
194
|
}>>;
|
|
194
195
|
reply_control: z.ZodOptional<z.ZodEnum<["everyone", "accounts_you_follow", "mentioned_only", "followers_only", "parent_post_author_only"]>>;
|
|
195
196
|
topic_tag: z.ZodOptional<z.ZodString>;
|
|
197
|
+
share_to_instagram: z.ZodOptional<z.ZodBoolean>;
|
|
196
198
|
text_attachment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
197
199
|
text_format_preset_id: z.ZodOptional<z.ZodString>;
|
|
198
200
|
document_title: z.ZodOptional<z.ZodString>;
|
|
@@ -268,6 +270,7 @@ export declare const createPostsBatchTool: {
|
|
|
268
270
|
}>>;
|
|
269
271
|
reply_control: z.ZodOptional<z.ZodEnum<["everyone", "accounts_you_follow", "mentioned_only", "followers_only", "parent_post_author_only"]>>;
|
|
270
272
|
topic_tag: z.ZodOptional<z.ZodString>;
|
|
273
|
+
share_to_instagram: z.ZodOptional<z.ZodBoolean>;
|
|
271
274
|
text_attachment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
272
275
|
text_format_preset_id: z.ZodOptional<z.ZodString>;
|
|
273
276
|
document_title: z.ZodOptional<z.ZodString>;
|
|
@@ -318,7 +321,7 @@ export declare const createPostsBatchTool: {
|
|
|
318
321
|
workspace_id: z.ZodOptional<z.ZodString>;
|
|
319
322
|
}, "strip", z.ZodTypeAny, {
|
|
320
323
|
workspace_id?: string | undefined;
|
|
321
|
-
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "telegram" | "bluesky" | "gmb" | "google-business" | "google_business_profile" | "x" | undefined;
|
|
324
|
+
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "telegram" | "bluesky" | "discord" | "mastodon" | "devto" | "hashnode" | "wordpress" | "lemmy" | "gmb" | "google-business" | "google_business_profile" | "x" | undefined;
|
|
322
325
|
account_id?: string | undefined;
|
|
323
326
|
scheduled_at?: string | undefined;
|
|
324
327
|
media_url?: string | undefined;
|
|
@@ -376,6 +379,7 @@ export declare const createPostsBatchTool: {
|
|
|
376
379
|
}>>;
|
|
377
380
|
reply_control: z.ZodOptional<z.ZodEnum<["everyone", "accounts_you_follow", "mentioned_only", "followers_only", "parent_post_author_only"]>>;
|
|
378
381
|
topic_tag: z.ZodOptional<z.ZodString>;
|
|
382
|
+
share_to_instagram: z.ZodOptional<z.ZodBoolean>;
|
|
379
383
|
text_attachment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
380
384
|
text_format_preset_id: z.ZodOptional<z.ZodString>;
|
|
381
385
|
document_title: z.ZodOptional<z.ZodString>;
|
|
@@ -425,7 +429,7 @@ export declare const createPostsBatchTool: {
|
|
|
425
429
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
426
430
|
}, {
|
|
427
431
|
workspace_id?: string | undefined;
|
|
428
|
-
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "telegram" | "bluesky" | "gmb" | "google-business" | "google_business_profile" | "x" | undefined;
|
|
432
|
+
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "telegram" | "bluesky" | "discord" | "mastodon" | "devto" | "hashnode" | "wordpress" | "lemmy" | "gmb" | "google-business" | "google_business_profile" | "x" | undefined;
|
|
429
433
|
account_id?: string | undefined;
|
|
430
434
|
scheduled_at?: string | undefined;
|
|
431
435
|
media_url?: string | undefined;
|
|
@@ -483,6 +487,7 @@ export declare const createPostsBatchTool: {
|
|
|
483
487
|
}>>;
|
|
484
488
|
reply_control: z.ZodOptional<z.ZodEnum<["everyone", "accounts_you_follow", "mentioned_only", "followers_only", "parent_post_author_only"]>>;
|
|
485
489
|
topic_tag: z.ZodOptional<z.ZodString>;
|
|
490
|
+
share_to_instagram: z.ZodOptional<z.ZodBoolean>;
|
|
486
491
|
text_attachment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
487
492
|
text_format_preset_id: z.ZodOptional<z.ZodString>;
|
|
488
493
|
document_title: z.ZodOptional<z.ZodString>;
|
|
@@ -536,7 +541,7 @@ export declare const createPostsBatchTool: {
|
|
|
536
541
|
confirm: true;
|
|
537
542
|
posts: {
|
|
538
543
|
workspace_id?: string | undefined;
|
|
539
|
-
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "telegram" | "bluesky" | "gmb" | "google-business" | "google_business_profile" | "x" | undefined;
|
|
544
|
+
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "telegram" | "bluesky" | "discord" | "mastodon" | "devto" | "hashnode" | "wordpress" | "lemmy" | "gmb" | "google-business" | "google_business_profile" | "x" | undefined;
|
|
540
545
|
account_id?: string | undefined;
|
|
541
546
|
scheduled_at?: string | undefined;
|
|
542
547
|
media_url?: string | undefined;
|
|
@@ -594,6 +599,7 @@ export declare const createPostsBatchTool: {
|
|
|
594
599
|
}>>;
|
|
595
600
|
reply_control: z.ZodOptional<z.ZodEnum<["everyone", "accounts_you_follow", "mentioned_only", "followers_only", "parent_post_author_only"]>>;
|
|
596
601
|
topic_tag: z.ZodOptional<z.ZodString>;
|
|
602
|
+
share_to_instagram: z.ZodOptional<z.ZodBoolean>;
|
|
597
603
|
text_attachment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
598
604
|
text_format_preset_id: z.ZodOptional<z.ZodString>;
|
|
599
605
|
document_title: z.ZodOptional<z.ZodString>;
|
|
@@ -646,7 +652,7 @@ export declare const createPostsBatchTool: {
|
|
|
646
652
|
confirm: true;
|
|
647
653
|
posts: {
|
|
648
654
|
workspace_id?: string | undefined;
|
|
649
|
-
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "telegram" | "bluesky" | "gmb" | "google-business" | "google_business_profile" | "x" | undefined;
|
|
655
|
+
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "telegram" | "bluesky" | "discord" | "mastodon" | "devto" | "hashnode" | "wordpress" | "lemmy" | "gmb" | "google-business" | "google_business_profile" | "x" | undefined;
|
|
650
656
|
account_id?: string | undefined;
|
|
651
657
|
scheduled_at?: string | undefined;
|
|
652
658
|
media_url?: string | undefined;
|
|
@@ -704,6 +710,7 @@ export declare const createPostsBatchTool: {
|
|
|
704
710
|
}>>;
|
|
705
711
|
reply_control: z.ZodOptional<z.ZodEnum<["everyone", "accounts_you_follow", "mentioned_only", "followers_only", "parent_post_author_only"]>>;
|
|
706
712
|
topic_tag: z.ZodOptional<z.ZodString>;
|
|
713
|
+
share_to_instagram: z.ZodOptional<z.ZodBoolean>;
|
|
707
714
|
text_attachment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
708
715
|
text_format_preset_id: z.ZodOptional<z.ZodString>;
|
|
709
716
|
document_title: z.ZodOptional<z.ZodString>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { PosterlyClient } from '../lib/api-client.js';
|
|
3
|
+
export declare const dismissSuggestionTool: {
|
|
4
|
+
name: string;
|
|
5
|
+
description: string;
|
|
6
|
+
inputSchema: z.ZodObject<{
|
|
7
|
+
suggestion_id: z.ZodString;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
suggestion_id: string;
|
|
10
|
+
}, {
|
|
11
|
+
suggestion_id: string;
|
|
12
|
+
}>;
|
|
13
|
+
execute(client: PosterlyClient, input: {
|
|
14
|
+
suggestion_id: string;
|
|
15
|
+
}): Promise<string>;
|
|
16
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { mdSuccess } from '../lib/format.js';
|
|
3
|
+
export const dismissSuggestionTool = {
|
|
4
|
+
name: 'dismiss_suggestion',
|
|
5
|
+
description: 'Dismiss a proactive post suggestion so it stops appearing. WRITE: confirm the exact suggestion with the user first. Never dismisses a suggestion that was already turned into a scheduled post (that would break adoption tracking).',
|
|
6
|
+
inputSchema: z.object({
|
|
7
|
+
suggestion_id: z
|
|
8
|
+
.string()
|
|
9
|
+
.describe('Suggestion ID from list_post_suggestions.'),
|
|
10
|
+
}),
|
|
11
|
+
async execute(client, input) {
|
|
12
|
+
const result = await client.dismissSuggestion(input.suggestion_id);
|
|
13
|
+
return mdSuccess('Suggestion dismissed', [
|
|
14
|
+
['Suggestion ID', input.suggestion_id],
|
|
15
|
+
['Status', result.status || 'dismissed'],
|
|
16
|
+
]);
|
|
17
|
+
},
|
|
18
|
+
};
|
|
@@ -4,19 +4,19 @@ export declare const getConnectLinkTool: {
|
|
|
4
4
|
name: string;
|
|
5
5
|
description: string;
|
|
6
6
|
inputSchema: z.ZodObject<{
|
|
7
|
-
platform: z.ZodOptional<z.ZodEnum<["bluesky", "devto", "discord", "facebook", "facebook_instagram", "facebook_pages", "gmb", "google-business", "google_business", "google_business_profile", "hashnode", "instagram", "instagram-standalone", "instagram_direct", "linkedin", "linkedin-company", "linkedin-page", "linkedin_company", "linkedin_page", "linkedin_personal", "mastodon", "medium", "meta", "meta_business", "pinterest", "reddit", "skool", "slack", "telegram", "threads", "tiktok", "twitter", "whop", "wordpress", "x", "x_twitter", "youtube"]>>;
|
|
7
|
+
platform: z.ZodOptional<z.ZodEnum<["bluesky", "devto", "discord", "facebook", "facebook_instagram", "facebook_pages", "gmb", "google-business", "google_business", "google_business_profile", "hashnode", "instagram", "instagram-standalone", "instagram_direct", "lemmy", "linkedin", "linkedin-company", "linkedin-page", "linkedin_company", "linkedin_page", "linkedin_personal", "mastodon", "medium", "meta", "meta_business", "pinterest", "reddit", "skool", "slack", "telegram", "threads", "tiktok", "twitter", "whop", "wordpress", "x", "x_twitter", "youtube"]>>;
|
|
8
8
|
workspace_id: z.ZodOptional<z.ZodString>;
|
|
9
9
|
include_planned: z.ZodOptional<z.ZodBoolean>;
|
|
10
10
|
debug: z.ZodOptional<z.ZodBoolean>;
|
|
11
11
|
}, "strip", z.ZodTypeAny, {
|
|
12
12
|
workspace_id?: string | undefined;
|
|
13
13
|
include_planned?: boolean | undefined;
|
|
14
|
-
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "telegram" | "bluesky" | "
|
|
14
|
+
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "telegram" | "bluesky" | "discord" | "mastodon" | "devto" | "hashnode" | "wordpress" | "lemmy" | "reddit" | "medium" | "slack" | "skool" | "whop" | "gmb" | "google-business" | "google_business_profile" | "x" | "meta" | "linkedin_page" | "facebook_instagram" | "facebook_pages" | "instagram_direct" | "linkedin-company" | "linkedin-page" | "linkedin_company" | "linkedin_personal" | "meta_business" | "x_twitter" | undefined;
|
|
15
15
|
debug?: boolean | undefined;
|
|
16
16
|
}, {
|
|
17
17
|
workspace_id?: string | undefined;
|
|
18
18
|
include_planned?: boolean | undefined;
|
|
19
|
-
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "telegram" | "bluesky" | "
|
|
19
|
+
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "telegram" | "bluesky" | "discord" | "mastodon" | "devto" | "hashnode" | "wordpress" | "lemmy" | "reddit" | "medium" | "slack" | "skool" | "whop" | "gmb" | "google-business" | "google_business_profile" | "x" | "meta" | "linkedin_page" | "facebook_instagram" | "facebook_pages" | "instagram_direct" | "linkedin-company" | "linkedin-page" | "linkedin_company" | "linkedin_personal" | "meta_business" | "x_twitter" | undefined;
|
|
20
20
|
debug?: boolean | undefined;
|
|
21
21
|
}>;
|
|
22
22
|
execute(client: PosterlyClient, input: {
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { PosterlyClient } from '../lib/api-client.js';
|
|
3
|
+
export declare const getPerformanceProfileTool: {
|
|
4
|
+
name: string;
|
|
5
|
+
description: string;
|
|
6
|
+
inputSchema: z.ZodObject<{
|
|
7
|
+
account_id: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
account_id: string | number;
|
|
10
|
+
}, {
|
|
11
|
+
account_id: string | number;
|
|
12
|
+
}>;
|
|
13
|
+
execute(client: PosterlyClient, input: {
|
|
14
|
+
account_id: string | number;
|
|
15
|
+
}): Promise<string>;
|
|
16
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { mdTitle, mdSection, mdKeyValue, mdBullets, mdQuote, mdEmpty, formatPercent, formatDateTime } from '../lib/format.js';
|
|
3
|
+
export const getPerformanceProfileTool = {
|
|
4
|
+
name: 'get_performance_profile',
|
|
5
|
+
description: "Get the performance profile posterly has derived for a connected account from the last 90 days of per-post analytics. Returns coaching stats (format, timing, caption-length patterns), an engagement-rate trend, and a narrative summary. Keyed by social account ID (from list_accounts or list_brand_accounts). Returns nothing until the account has a derived profile; Google Business Profile and other platforms without per-post analytics never get one. Read-only; requires a Pro plan or higher.",
|
|
6
|
+
inputSchema: z.object({
|
|
7
|
+
account_id: z
|
|
8
|
+
.union([z.string(), z.number()])
|
|
9
|
+
.describe('The social account ID to inspect (from list_accounts or list_brand_accounts).'),
|
|
10
|
+
}),
|
|
11
|
+
async execute(client, input) {
|
|
12
|
+
const { performance_profile, reason } = await client.getAccountPerformanceProfile(input.account_id);
|
|
13
|
+
if (!performance_profile) {
|
|
14
|
+
const detail = reason === 'platform_not_measurable'
|
|
15
|
+
? 'This platform does not produce per-post analytics, so posterly cannot build a performance profile for it.'
|
|
16
|
+
: reason === 'feature_not_available'
|
|
17
|
+
? 'Performance profiles require a Pro plan or higher.'
|
|
18
|
+
: 'posterly has not built a performance profile for this account yet. It needs about 90 days of tracked posts to learn from.';
|
|
19
|
+
return mdEmpty('performance profile yet', detail);
|
|
20
|
+
}
|
|
21
|
+
const label = performance_profile.username
|
|
22
|
+
? `@${performance_profile.username}${performance_profile.platform ? ` (${performance_profile.platform})` : ''}`
|
|
23
|
+
: `account ${performance_profile.social_account_id}`;
|
|
24
|
+
const rate = performance_profile.engagement_rate_avg != null
|
|
25
|
+
? formatPercent(performance_profile.engagement_rate_avg * 100)
|
|
26
|
+
: 'n/a';
|
|
27
|
+
return [
|
|
28
|
+
mdTitle('Account performance profile', `${label} · last ${performance_profile.window_days ?? 90} days`),
|
|
29
|
+
performance_profile.narrative_summary ? mdSection('Summary', mdQuote(performance_profile.narrative_summary)) : '',
|
|
30
|
+
performance_profile.bullets.length ? mdSection('What is working', mdBullets(performance_profile.bullets)) : '',
|
|
31
|
+
mdSection('Stats', mdKeyValue([
|
|
32
|
+
['Posts sampled', performance_profile.sample_size],
|
|
33
|
+
['Avg engagement rate', rate],
|
|
34
|
+
['Engagement trend', performance_profile.engagement_rate_trend],
|
|
35
|
+
['Derived at', formatDateTime(performance_profile.derived_at)],
|
|
36
|
+
])),
|
|
37
|
+
].filter(Boolean).join('\n\n');
|
|
38
|
+
},
|
|
39
|
+
};
|
|
@@ -5,15 +5,15 @@ export declare const getPlatformSchemaTool: {
|
|
|
5
5
|
description: string;
|
|
6
6
|
inputSchema: z.ZodObject<{
|
|
7
7
|
account_id: z.ZodOptional<z.ZodString>;
|
|
8
|
-
platform: z.ZodOptional<z.ZodEnum<["bluesky", "devto", "discord", "facebook", "gmb", "google-business", "google_business", "google_business_profile", "hashnode", "instagram", "instagram-standalone", "linkedin", "mastodon", "medium", "pinterest", "reddit", "skool", "slack", "telegram", "threads", "tiktok", "twitter", "whop", "wordpress", "x", "youtube"]>>;
|
|
8
|
+
platform: z.ZodOptional<z.ZodEnum<["bluesky", "devto", "discord", "facebook", "gmb", "google-business", "google_business", "google_business_profile", "hashnode", "instagram", "instagram-standalone", "lemmy", "linkedin", "mastodon", "medium", "pinterest", "reddit", "skool", "slack", "telegram", "threads", "tiktok", "twitter", "whop", "wordpress", "x", "youtube"]>>;
|
|
9
9
|
include_planned: z.ZodOptional<z.ZodBoolean>;
|
|
10
10
|
}, "strip", z.ZodTypeAny, {
|
|
11
11
|
include_planned?: boolean | undefined;
|
|
12
|
-
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "telegram" | "bluesky" | "
|
|
12
|
+
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "telegram" | "bluesky" | "discord" | "mastodon" | "devto" | "hashnode" | "wordpress" | "lemmy" | "reddit" | "medium" | "slack" | "skool" | "whop" | "gmb" | "google-business" | "google_business_profile" | "x" | undefined;
|
|
13
13
|
account_id?: string | undefined;
|
|
14
14
|
}, {
|
|
15
15
|
include_planned?: boolean | undefined;
|
|
16
|
-
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "telegram" | "bluesky" | "
|
|
16
|
+
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "telegram" | "bluesky" | "discord" | "mastodon" | "devto" | "hashnode" | "wordpress" | "lemmy" | "reddit" | "medium" | "slack" | "skool" | "whop" | "gmb" | "google-business" | "google_business_profile" | "x" | undefined;
|
|
17
17
|
account_id?: string | undefined;
|
|
18
18
|
}>;
|
|
19
19
|
execute(client: PosterlyClient, input: {
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { PosterlyClient } from '../lib/api-client.js';
|
|
3
|
+
export declare const getPostInsightsTool: {
|
|
4
|
+
name: string;
|
|
5
|
+
description: string;
|
|
6
|
+
inputSchema: z.ZodObject<{
|
|
7
|
+
account_id: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
8
|
+
post_id: z.ZodOptional<z.ZodNumber>;
|
|
9
|
+
checkpoint: z.ZodOptional<z.ZodEnum<["1h", "6h", "24h", "72h", "7d"]>>;
|
|
10
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
11
|
+
}, "strip", z.ZodTypeAny, {
|
|
12
|
+
account_id?: string | number | undefined;
|
|
13
|
+
post_id?: number | undefined;
|
|
14
|
+
checkpoint?: "1h" | "6h" | "24h" | "72h" | "7d" | undefined;
|
|
15
|
+
limit?: number | undefined;
|
|
16
|
+
}, {
|
|
17
|
+
account_id?: string | number | undefined;
|
|
18
|
+
post_id?: number | undefined;
|
|
19
|
+
checkpoint?: "1h" | "6h" | "24h" | "72h" | "7d" | undefined;
|
|
20
|
+
limit?: number | undefined;
|
|
21
|
+
}>;
|
|
22
|
+
execute(client: PosterlyClient, input: {
|
|
23
|
+
account_id?: string | number;
|
|
24
|
+
post_id?: number;
|
|
25
|
+
checkpoint?: "1h" | "6h" | "24h" | "72h" | "7d";
|
|
26
|
+
limit?: number;
|
|
27
|
+
}): Promise<string>;
|
|
28
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { mdTitle, mdSection, mdKeyValue, mdEmpty, truncateText, formatDateTime } from '../lib/format.js';
|
|
3
|
+
export const getPostInsightsTool = {
|
|
4
|
+
name: 'get_post_insights',
|
|
5
|
+
description: 'List per-post feedback insights from the posterly performance feedback loop: for recently published posts, the performance tier (great/good/mixed/poor), a diagnosis, a suggested next action, metrics, and the baseline it was compared against. Filter by account_id, post_id, and checkpoint (1h, 6h, 24h, 72h, 7d). Read-only; requires a Pro plan or higher.',
|
|
6
|
+
inputSchema: z.object({
|
|
7
|
+
account_id: z
|
|
8
|
+
.union([z.string(), z.number()])
|
|
9
|
+
.optional()
|
|
10
|
+
.describe('Filter to one social account ID (from list_accounts).'),
|
|
11
|
+
post_id: z.number().int().positive().optional().describe('Filter to one post ID.'),
|
|
12
|
+
checkpoint: z
|
|
13
|
+
.enum(['1h', '6h', '24h', '72h', '7d'])
|
|
14
|
+
.optional()
|
|
15
|
+
.describe('Filter to one checkpoint after publish.'),
|
|
16
|
+
limit: z.number().int().min(1).max(100).optional().describe('Max insights to return (default 20).'),
|
|
17
|
+
}),
|
|
18
|
+
async execute(client, input) {
|
|
19
|
+
const { insights } = await client.getPostInsights(input);
|
|
20
|
+
if (!insights.length) {
|
|
21
|
+
return mdEmpty('feedback insights', 'No per-post feedback insights are available for these filters yet. Insights appear as posts hit their 1h, 6h, 24h, 72h, and 7d checkpoints.');
|
|
22
|
+
}
|
|
23
|
+
const blocks = insights.map((insight) => {
|
|
24
|
+
const heading = `${insight.title || 'Insight'} (${insight.performance_tier}, ${insight.checkpoint})`;
|
|
25
|
+
return mdSection(heading, mdKeyValue([
|
|
26
|
+
['Post ID', insight.post_id],
|
|
27
|
+
['Platform', insight.platform],
|
|
28
|
+
['Account', insight.username ? `@${insight.username}` : String(insight.social_account_id)],
|
|
29
|
+
['Diagnosis', truncateText(insight.diagnosis, 220)],
|
|
30
|
+
['Next action', truncateText(insight.next_action, 220)],
|
|
31
|
+
['Impact score', insight.impact_score],
|
|
32
|
+
['Confidence', insight.confidence],
|
|
33
|
+
['Published', formatDateTime(insight.published_at)],
|
|
34
|
+
['Permalink', insight.permalink || undefined],
|
|
35
|
+
]));
|
|
36
|
+
});
|
|
37
|
+
return [mdTitle(`Post feedback insights (${insights.length})`), ...blocks].join('\n\n');
|
|
38
|
+
},
|
|
39
|
+
};
|
|
@@ -8,11 +8,11 @@ export declare const getVideoJobTool: {
|
|
|
8
8
|
status: z.ZodOptional<z.ZodEnum<["pending", "processing", "completed", "failed", "dismissed"]>>;
|
|
9
9
|
limit: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
10
10
|
}, "strip", z.ZodTypeAny, {
|
|
11
|
-
status?: "failed" | "
|
|
11
|
+
status?: "failed" | "pending" | "dismissed" | "completed" | "processing" | undefined;
|
|
12
12
|
limit?: number | undefined;
|
|
13
13
|
job_id?: string | undefined;
|
|
14
14
|
}, {
|
|
15
|
-
status?: "failed" | "
|
|
15
|
+
status?: "failed" | "pending" | "dismissed" | "completed" | "processing" | undefined;
|
|
16
16
|
limit?: number | undefined;
|
|
17
17
|
job_id?: string | undefined;
|
|
18
18
|
}>;
|
|
@@ -11,14 +11,14 @@ export declare const listActivityTool: {
|
|
|
11
11
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
12
12
|
}, "strip", z.ZodTypeAny, {
|
|
13
13
|
workspace_id?: string | undefined;
|
|
14
|
-
limit?: number | undefined;
|
|
15
14
|
post_id?: number | undefined;
|
|
15
|
+
limit?: number | undefined;
|
|
16
16
|
since?: string | undefined;
|
|
17
17
|
type?: "activity" | "publish" | "all" | undefined;
|
|
18
18
|
}, {
|
|
19
19
|
workspace_id?: string | undefined;
|
|
20
|
-
limit?: number | undefined;
|
|
21
20
|
post_id?: number | undefined;
|
|
21
|
+
limit?: number | undefined;
|
|
22
22
|
since?: string | undefined;
|
|
23
23
|
type?: "activity" | "publish" | "all" | undefined;
|
|
24
24
|
}>;
|