posterly-mcp-server 0.54.6 → 0.55.0
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 +45 -4
- package/dist/generated/platform-manifest.d.ts +4 -4
- package/dist/generated/platform-manifest.js +9 -4
- package/dist/index.js +15 -2
- package/dist/lib/alias-transport.js +4 -0
- package/dist/lib/api-client.d.ts +148 -0
- package/dist/lib/api-client.js +84 -0
- package/dist/lib/claude-directory-profile.js +3 -1
- package/dist/lib/format.d.ts +44 -0
- package/dist/lib/format.js +125 -5
- package/dist/lib/gbp-location-preview.d.ts +21 -0
- package/dist/lib/gbp-location-preview.js +27 -0
- package/dist/lib/google-business-review-name.d.ts +4 -0
- package/dist/lib/google-business-review-name.js +11 -0
- package/dist/lib/id-schema.d.ts +14 -0
- package/dist/lib/id-schema.js +82 -0
- package/dist/lib/id-text.d.ts +26 -0
- package/dist/lib/id-text.js +63 -0
- package/dist/lib/reply-window.d.ts +5 -0
- package/dist/lib/reply-window.js +14 -0
- package/dist/lib/service-area-text.d.ts +27 -0
- package/dist/lib/service-area-text.js +41 -0
- package/dist/lib/suggestion-accept-note.d.ts +10 -0
- package/dist/lib/suggestion-accept-note.js +17 -0
- package/dist/lib/tool-registry.js +19 -2
- package/dist/lib/version.d.ts +1 -1
- package/dist/lib/version.js +1 -1
- package/dist/tools/audit-google-business-profile.js +7 -3
- package/dist/tools/connect-account.d.ts +2 -2
- package/dist/tools/create-connect-session.d.ts +2 -2
- package/dist/tools/create-post.d.ts +6 -6
- package/dist/tools/create-posts-batch.d.ts +4 -4
- package/dist/tools/create-webhook.d.ts +3 -3
- package/dist/tools/delete-post.d.ts +4 -4
- package/dist/tools/dismiss-suggestion.d.ts +7 -0
- package/dist/tools/dismiss-suggestion.js +21 -2
- package/dist/tools/find-slot.js +7 -4
- package/dist/tools/get-post.js +56 -5
- package/dist/tools/list-accounts.d.ts +4 -0
- package/dist/tools/list-accounts.js +25 -6
- package/dist/tools/list-analytics.d.ts +4 -0
- package/dist/tools/list-analytics.js +29 -7
- package/dist/tools/list-comments.js +13 -3
- package/dist/tools/list-conversations.d.ts +4 -4
- package/dist/tools/list-conversations.js +10 -5
- package/dist/tools/list-google-business-locations.d.ts +27 -0
- package/dist/tools/list-google-business-locations.js +35 -0
- package/dist/tools/list-google-business-media.d.ts +8 -0
- package/dist/tools/list-google-business-media.js +19 -5
- package/dist/tools/list-google-business-reviews.js +3 -2
- package/dist/tools/list-google-business-service-areas.d.ts +37 -0
- package/dist/tools/list-google-business-service-areas.js +33 -0
- package/dist/tools/list-media.js +3 -2
- package/dist/tools/list-platforms.d.ts +10 -10
- package/dist/tools/list-post-suggestions.js +5 -4
- package/dist/tools/list-posts.d.ts +8 -2
- package/dist/tools/list-posts.js +12 -2
- package/dist/tools/list-webhooks.d.ts +18 -1
- package/dist/tools/list-webhooks.js +22 -3
- package/dist/tools/list-workspace-members.js +3 -1
- package/dist/tools/manage-brands.d.ts +47 -0
- package/dist/tools/manage-brands.js +89 -0
- package/dist/tools/manage-comment.js +5 -1
- package/dist/tools/manage-google-business-location.d.ts +123 -0
- package/dist/tools/manage-google-business-location.js +97 -0
- package/dist/tools/manage-google-business-media.js +2 -0
- package/dist/tools/manage-google-business-review.js +29 -3
- package/dist/tools/manage-google-business-service-area.d.ts +74 -0
- package/dist/tools/manage-google-business-service-area.js +79 -0
- package/dist/tools/manage-webhook.d.ts +6 -6
- package/dist/tools/manage-x-posting-addon.d.ts +47 -0
- package/dist/tools/manage-x-posting-addon.js +92 -0
- package/dist/tools/trigger-platform-helper.d.ts +5 -5
- package/dist/tools/update-post.d.ts +14 -6
- package/dist/tools/update-post.js +23 -2
- package/dist/tools/upload-media.d.ts +12 -0
- package/dist/tools/upload-media.js +39 -3
- package/dist/tools/validate-post.d.ts +4 -4
- package/dist/tools/webhook-events.d.ts +2 -2
- package/dist/tools/webhook-events.js +2 -0
- package/dist/tools/whoami.d.ts +4 -0
- package/dist/tools/whoami.js +14 -6
- package/package.json +1 -1
- package/server.json +2 -2
- package/tool-annotations.json +21 -2
- package/tool-registry.json +239 -8
|
@@ -4,18 +4,18 @@ export declare const triggerPlatformHelperTool: {
|
|
|
4
4
|
name: string;
|
|
5
5
|
description: string;
|
|
6
6
|
inputSchema: z.ZodObject<{
|
|
7
|
-
helper: z.ZodEnum<["linkedin.recent_mentions", "pinterest.boards", "tiktok.creator_info", "x.quota"]>;
|
|
7
|
+
helper: z.ZodEnum<["linkedin.company_lookup", "linkedin.recent_mentions", "pinterest.boards", "tiktok.creator_info", "x.quota", "youtube.playlists"]>;
|
|
8
8
|
account_id: z.ZodOptional<z.ZodString>;
|
|
9
9
|
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", "slack", "telegram", "threads", "tiktok", "twitter", "wordpress", "x", "youtube"]>>;
|
|
10
10
|
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
11
11
|
}, "strip", z.ZodTypeAny, {
|
|
12
|
-
helper: "linkedin.recent_mentions" | "pinterest.boards" | "tiktok.creator_info" | "x.quota";
|
|
13
|
-
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "x" | "
|
|
12
|
+
helper: "linkedin.company_lookup" | "linkedin.recent_mentions" | "pinterest.boards" | "tiktok.creator_info" | "x.quota" | "youtube.playlists";
|
|
13
|
+
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "x" | "bluesky" | "telegram" | "discord" | "wordpress" | "devto" | "hashnode" | "lemmy" | "slack" | "mastodon" | "gmb" | "google-business" | "google_business_profile" | undefined;
|
|
14
14
|
account_id?: string | undefined;
|
|
15
15
|
params?: Record<string, unknown> | undefined;
|
|
16
16
|
}, {
|
|
17
|
-
helper: "linkedin.recent_mentions" | "pinterest.boards" | "tiktok.creator_info" | "x.quota";
|
|
18
|
-
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "x" | "
|
|
17
|
+
helper: "linkedin.company_lookup" | "linkedin.recent_mentions" | "pinterest.boards" | "tiktok.creator_info" | "x.quota" | "youtube.playlists";
|
|
18
|
+
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "x" | "bluesky" | "telegram" | "discord" | "wordpress" | "devto" | "hashnode" | "lemmy" | "slack" | "mastodon" | "gmb" | "google-business" | "google_business_profile" | undefined;
|
|
19
19
|
account_id?: string | undefined;
|
|
20
20
|
params?: Record<string, unknown> | undefined;
|
|
21
21
|
}>;
|
|
@@ -681,6 +681,8 @@ type EditInput = {
|
|
|
681
681
|
media_url?: string;
|
|
682
682
|
media_urls?: string[];
|
|
683
683
|
post_type?: string;
|
|
684
|
+
account_id?: string;
|
|
685
|
+
thread_posts?: string[];
|
|
684
686
|
instagram_settings?: z.infer<typeof instagramSettingsSchema>;
|
|
685
687
|
platform_settings?: z.infer<typeof platformSettingsSchema>;
|
|
686
688
|
confirm: true;
|
|
@@ -703,6 +705,8 @@ export declare const updatePostTool: {
|
|
|
703
705
|
media_url: z.ZodOptional<z.ZodString>;
|
|
704
706
|
media_urls: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
705
707
|
post_type: z.ZodOptional<z.ZodString>;
|
|
708
|
+
account_id: z.ZodOptional<z.ZodString>;
|
|
709
|
+
thread_posts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
706
710
|
reel_cover_url: z.ZodOptional<z.ZodString>;
|
|
707
711
|
reel_cover_method: z.ZodOptional<z.ZodString>;
|
|
708
712
|
reel_thumb_offset: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1390,6 +1394,9 @@ export declare const updatePostTool: {
|
|
|
1390
1394
|
confirm: true;
|
|
1391
1395
|
post_id: number;
|
|
1392
1396
|
status?: "scheduled" | "paused" | "draft" | undefined;
|
|
1397
|
+
group_id?: string | undefined;
|
|
1398
|
+
release_id?: string | undefined;
|
|
1399
|
+
account_id?: string | undefined;
|
|
1393
1400
|
caption?: string | undefined;
|
|
1394
1401
|
scheduled_at?: string | undefined;
|
|
1395
1402
|
media_url?: string | undefined;
|
|
@@ -1398,6 +1405,7 @@ export declare const updatePostTool: {
|
|
|
1398
1405
|
reel_cover_url?: string | undefined;
|
|
1399
1406
|
reel_cover_method?: string | undefined;
|
|
1400
1407
|
reel_thumb_offset?: number | undefined;
|
|
1408
|
+
thread_posts?: string[] | undefined;
|
|
1401
1409
|
instagram_settings?: {
|
|
1402
1410
|
post_type?: "post" | "feed" | "story" | "reel" | "carousel" | undefined;
|
|
1403
1411
|
reel_cover_url?: string | undefined;
|
|
@@ -1599,8 +1607,6 @@ export declare const updatePostTool: {
|
|
|
1599
1607
|
is_poll_duration_extended: z.ZodOptional<z.ZodBoolean>;
|
|
1600
1608
|
ai_generated: z.ZodOptional<z.ZodBoolean>;
|
|
1601
1609
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
1602
|
-
release_id?: string | undefined;
|
|
1603
|
-
group_id?: string | undefined;
|
|
1604
1610
|
approval_action?: "request" | "approve" | "request_changes" | "reject" | undefined;
|
|
1605
1611
|
approval_axis?: "asset" | "caption" | undefined;
|
|
1606
1612
|
approval_note?: string | undefined;
|
|
@@ -1608,6 +1614,9 @@ export declare const updatePostTool: {
|
|
|
1608
1614
|
confirm: true;
|
|
1609
1615
|
post_id: number;
|
|
1610
1616
|
status?: "scheduled" | "paused" | "draft" | undefined;
|
|
1617
|
+
group_id?: string | undefined;
|
|
1618
|
+
release_id?: string | undefined;
|
|
1619
|
+
account_id?: string | undefined;
|
|
1611
1620
|
caption?: string | undefined;
|
|
1612
1621
|
scheduled_at?: string | undefined;
|
|
1613
1622
|
media_url?: string | undefined;
|
|
@@ -1616,6 +1625,7 @@ export declare const updatePostTool: {
|
|
|
1616
1625
|
reel_cover_url?: string | undefined;
|
|
1617
1626
|
reel_cover_method?: string | undefined;
|
|
1618
1627
|
reel_thumb_offset?: number | undefined;
|
|
1628
|
+
thread_posts?: string[] | undefined;
|
|
1619
1629
|
instagram_settings?: {
|
|
1620
1630
|
post_type?: "post" | "feed" | "story" | "reel" | "carousel" | undefined;
|
|
1621
1631
|
reel_cover_url?: string | undefined;
|
|
@@ -1817,8 +1827,6 @@ export declare const updatePostTool: {
|
|
|
1817
1827
|
is_poll_duration_extended: z.ZodOptional<z.ZodBoolean>;
|
|
1818
1828
|
ai_generated: z.ZodOptional<z.ZodBoolean>;
|
|
1819
1829
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
1820
|
-
release_id?: string | undefined;
|
|
1821
|
-
group_id?: string | undefined;
|
|
1822
1830
|
approval_action?: "request" | "approve" | "request_changes" | "reject" | undefined;
|
|
1823
1831
|
approval_axis?: "asset" | "caption" | undefined;
|
|
1824
1832
|
approval_note?: string | undefined;
|
|
@@ -1847,14 +1855,14 @@ export declare const updatePostTool: {
|
|
|
1847
1855
|
group_id: z.ZodOptional<z.ZodString>;
|
|
1848
1856
|
confirm: z.ZodLiteral<true>;
|
|
1849
1857
|
}, "strip", z.ZodTypeAny, {
|
|
1858
|
+
release_id: string;
|
|
1850
1859
|
confirm: true;
|
|
1851
1860
|
post_id: number;
|
|
1852
|
-
release_id: string;
|
|
1853
1861
|
group_id?: string | undefined;
|
|
1854
1862
|
}, {
|
|
1863
|
+
release_id: string;
|
|
1855
1864
|
confirm: true;
|
|
1856
1865
|
post_id: number;
|
|
1857
|
-
release_id: string;
|
|
1858
1866
|
group_id?: string | undefined;
|
|
1859
1867
|
}>;
|
|
1860
1868
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { code, formatDateTime, mdKeyValue, mdQuote, mdSection, mdTitle, statusLabel } from '../lib/format.js';
|
|
2
|
+
import { code, dashboardUrlForPost, formatDateTime, groupReleaseIds, mdKeyValue, mdQuote, mdSection, mdTitle, platformPostIdText, platformText, postFailureText, statusLabel } from '../lib/format.js';
|
|
3
3
|
import { validateArgs } from '../lib/tool-runtime.js';
|
|
4
4
|
const mediaAccessibilitySchema = z.array(z.object({
|
|
5
5
|
index: z.number().int().nonnegative(),
|
|
@@ -145,7 +145,7 @@ const platformSettingsSchema = z.object({
|
|
|
145
145
|
}).passthrough();
|
|
146
146
|
export const updatePostTool = {
|
|
147
147
|
name: 'update_post',
|
|
148
|
-
description: 'Change a scheduled or draft post. DESTRUCTIVE WRITE. Edit (default): caption, media, schedule, post_type, or
|
|
148
|
+
description: 'Change a scheduled or draft post. DESTRUCTIVE WRITE. Edit (default): caption, media, schedule, post_type, settings, account_id, or thread_posts; overwrites the existing post; cannot edit published or currently publishing posts. account_id moves the post to another account you can use in the same workspace and on the same brand, and the platform follows that account. thread_posts replaces an X or Threads reply chain with at least two non-empty parts, and the first part becomes the caption. If a client has already approved the post, a caption edit reopens caption approval, a media or thumbnail edit reopens asset approval, and a reschedule, account change, thread edit, or settings change reopens both. status (scheduled, paused, or draft, with scheduled_at when scheduling a draft): pause, resume, or move back to draft; send it on its own. release_id (with optional group_id): set or repair external release/group IDs; send it on its own. approval_action (request, approve, request_changes, or reject): change client approval. Only a workspace owner or admin may do this. The actor is the API key user, never a brand guest. request emails the brand reviewers. approve, request_changes, and reject are team-side decisions. request_changes needs approval_note. Optional approval_axis is asset or caption; omit it for both. Send approval_action on its own.\n\n' +
|
|
149
149
|
'REQUIRED BEFORE CALLING: Show the user a side-by-side of the CURRENT post (caption, scheduled time, media, status) and the PROPOSED change, and get explicit confirmation ("yes update it", "apply those changes") before calling. Do not auto-edit posts based on a general instruction - each change needs its own confirmation.',
|
|
150
150
|
inputSchema: z.object({
|
|
151
151
|
post_id: z.number().describe('The post ID to update'),
|
|
@@ -160,6 +160,15 @@ export const updatePostTool = {
|
|
|
160
160
|
.string()
|
|
161
161
|
.optional()
|
|
162
162
|
.describe('New post type: text, image, video, carousel, reel, story, story_series, document, photo, or cover_photo'),
|
|
163
|
+
account_id: z
|
|
164
|
+
.string()
|
|
165
|
+
.optional()
|
|
166
|
+
.describe('Move this unpublished post to another account you can use in the same workspace. The account must belong to the post brand. The platform follows the new account.'),
|
|
167
|
+
thread_posts: z
|
|
168
|
+
.array(z.string())
|
|
169
|
+
.min(2)
|
|
170
|
+
.optional()
|
|
171
|
+
.describe('Replace an X or Threads reply chain. At least 2 non-empty parts. The first part becomes the caption.'),
|
|
163
172
|
// Reel cover controls are also accepted top-level, matching the hosted
|
|
164
173
|
// endpoint. An agent reading the hosted schema will reach for these names,
|
|
165
174
|
// and scripts/check-mcp-schema-parity.ts enforces that both surfaces agree.
|
|
@@ -237,12 +246,24 @@ async function editPost(client, input) {
|
|
|
237
246
|
};
|
|
238
247
|
const result = await client.updatePost(post_id, payload);
|
|
239
248
|
const p = result.post;
|
|
249
|
+
const platform = platformText(p.platform);
|
|
250
|
+
const accountId = p.social_account_id ?? p.account_id;
|
|
251
|
+
const failure = postFailureText(p);
|
|
252
|
+
const platformPostId = platformPostIdText(p);
|
|
253
|
+
const groups = groupReleaseIds(p);
|
|
240
254
|
return [
|
|
241
255
|
mdTitle(`✅ Post ${code(p.id)} updated`),
|
|
242
256
|
mdKeyValue([
|
|
243
257
|
['Status', statusLabel(p.status)],
|
|
258
|
+
...(platform ? [['Platform', platform]] : []),
|
|
259
|
+
...(accountId != null && accountId !== '' ? [['Account ID', String(accountId)]] : []),
|
|
260
|
+
...(p.workspace_id ? [['Workspace', String(p.workspace_id)]] : []),
|
|
244
261
|
['Scheduled', formatDateTime(p.scheduled_at)],
|
|
245
262
|
['Type', p.post_type || 'unknown'],
|
|
263
|
+
...(failure ? [['Failure', failure]] : []),
|
|
264
|
+
...(platformPostId ? [['Platform post ID', platformPostId]] : []),
|
|
265
|
+
...(groups.length ? [['Group', groups.join(', ')]] : []),
|
|
266
|
+
['View in posterly', dashboardUrlForPost({ id: p.id, scheduled_at: p.scheduled_at })],
|
|
246
267
|
...(p.reel_cover_url ? [['Reel cover', p.reel_cover_url]] : []),
|
|
247
268
|
...(p.thumbnail_url ? [['Thumbnail', p.thumbnail_url]] : []),
|
|
248
269
|
...(p.youtube_thumbnail_url ? [['YouTube thumbnail', p.youtube_thumbnail_url]] : []),
|
|
@@ -8,6 +8,9 @@ type UploadMediaInput = {
|
|
|
8
8
|
filename?: string;
|
|
9
9
|
content_type?: string;
|
|
10
10
|
workspace_id?: string;
|
|
11
|
+
asset_id?: string;
|
|
12
|
+
confirm?: boolean;
|
|
13
|
+
preview_id?: string;
|
|
11
14
|
};
|
|
12
15
|
export declare const uploadMediaTool: {
|
|
13
16
|
name: string;
|
|
@@ -19,17 +22,26 @@ export declare const uploadMediaTool: {
|
|
|
19
22
|
filename: z.ZodOptional<z.ZodString>;
|
|
20
23
|
content_type: z.ZodOptional<z.ZodString>;
|
|
21
24
|
workspace_id: z.ZodOptional<z.ZodString>;
|
|
25
|
+
asset_id: z.ZodOptional<z.ZodString>;
|
|
26
|
+
confirm: z.ZodOptional<z.ZodBoolean>;
|
|
27
|
+
preview_id: z.ZodOptional<z.ZodString>;
|
|
22
28
|
}, "strip", z.ZodTypeAny, {
|
|
23
29
|
workspace_id?: string | undefined;
|
|
30
|
+
confirm?: boolean | undefined;
|
|
31
|
+
preview_id?: string | undefined;
|
|
24
32
|
filename?: string | undefined;
|
|
25
33
|
url?: string | undefined;
|
|
34
|
+
asset_id?: string | undefined;
|
|
26
35
|
content_type?: string | undefined;
|
|
27
36
|
file_path?: string | undefined;
|
|
28
37
|
base64_data?: string | undefined;
|
|
29
38
|
}, {
|
|
30
39
|
workspace_id?: string | undefined;
|
|
40
|
+
confirm?: boolean | undefined;
|
|
41
|
+
preview_id?: string | undefined;
|
|
31
42
|
filename?: string | undefined;
|
|
32
43
|
url?: string | undefined;
|
|
44
|
+
asset_id?: string | undefined;
|
|
33
45
|
content_type?: string | undefined;
|
|
34
46
|
file_path?: string | undefined;
|
|
35
47
|
base64_data?: string | undefined;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { mdError, mdSuccess } from '../lib/format.js';
|
|
3
|
-
import { validateArgs } from '../lib/tool-runtime.js';
|
|
2
|
+
import { formatIsoTimestamp, mdError, mdKeyValue, mdSection, mdSuccess } from '../lib/format.js';
|
|
3
|
+
import { previewThenConfirm, readFailedNote, readForPreview, validateArgs } from '../lib/tool-runtime.js';
|
|
4
4
|
export const uploadMediaTool = {
|
|
5
5
|
name: 'upload_media',
|
|
6
6
|
description: 'Upload an image or video to posterly storage and get a URL for create_post. Supports JPEG, PNG, GIF, WebP, MP4, MOV, WebM (PDFs are not accepted here: use create_signed_upload or create_media_drop). Images up to 10MB, videos up to 50MB. Three ways in: file_path (an explicit local path the user gave you), base64_data with filename (PREFERRED for images shared in chat, which are not on the local filesystem), or url (a public HTTPS image or video; local/private network URLs are blocked).\n\n' +
|
|
7
|
-
'This writes to the user\'s media storage (counts against quota) but does NOT publish the file anywhere. Uploading is safe - it\'s the subsequent `create_post` call that publishes content, and that tool has its own confirmation requirements. Never guess file paths. You can also pass public HTTP(S) media URLs directly to create_post/update_post; use url here when you want to upload once and reuse the returned posterly URL.',
|
|
7
|
+
'This writes to the user\'s media storage (counts against quota) but does NOT publish the file anywhere. Uploading is safe - it\'s the subsequent `create_post` call that publishes content, and that tool has its own confirmation requirements. Never guess file paths. You can also pass public HTTP(S) media URLs directly to create_post/update_post; use url here when you want to upload once and reuse the returned posterly URL. Pass asset_id (from list_media) to delete that library file: the first request previews it and deletes nothing; send it again with confirm true and that preview_id only after the user agrees. A file a post still uses is kept.',
|
|
8
8
|
inputSchema: z.object({
|
|
9
9
|
file_path: z
|
|
10
10
|
.string()
|
|
@@ -28,6 +28,9 @@ export const uploadMediaTool = {
|
|
|
28
28
|
.optional()
|
|
29
29
|
.describe('MIME type (auto-detected from filename if omitted)'),
|
|
30
30
|
workspace_id: z.string().optional().describe('Optional. The workspace this acts in and whose plan pays (from whoami). Needed only when your connection can act in several workspaces.'),
|
|
31
|
+
asset_id: z.string().optional().describe('Library file id from list_media. Deletes that file after a preview. Do not combine with url, file_path, or base64_data.'),
|
|
32
|
+
confirm: z.boolean().optional().describe('Delete only. True only after the user explicitly approves the preview, together with preview_id.'),
|
|
33
|
+
preview_id: z.string().optional().describe('The preview_id from the delete preview. Required with confirm: true.'),
|
|
31
34
|
}),
|
|
32
35
|
/** The old tools' exact input schemas, for alias calls (see alias-transport.ts). */
|
|
33
36
|
legacySchemas: {
|
|
@@ -39,11 +42,44 @@ export const uploadMediaTool = {
|
|
|
39
42
|
},
|
|
40
43
|
async execute(client, input, ctx) {
|
|
41
44
|
const { mode, args } = validateArgs(ctx, 'upload_media', input);
|
|
45
|
+
if (mode === 'delete')
|
|
46
|
+
return deleteLibraryFile(client, args, ctx);
|
|
42
47
|
if (mode === 'url')
|
|
43
48
|
return uploadFromUrl(client, args);
|
|
44
49
|
return uploadFile(client, args);
|
|
45
50
|
},
|
|
46
51
|
};
|
|
52
|
+
async function deleteLibraryFile(client, input, ctx) {
|
|
53
|
+
return previewThenConfirm({
|
|
54
|
+
tool: 'upload_media',
|
|
55
|
+
action: 'delete',
|
|
56
|
+
args: input,
|
|
57
|
+
nonce: false,
|
|
58
|
+
legacyRefusal: 'Refusing to delete a library file without confirm=true after explicit user confirmation.',
|
|
59
|
+
ctx,
|
|
60
|
+
describe: async () => {
|
|
61
|
+
const read = await readForPreview(() => client.getMediaAsset(input.asset_id));
|
|
62
|
+
const media = read.ok ? read.data.media : null;
|
|
63
|
+
const details = media
|
|
64
|
+
? mdSection('File', mdKeyValue([
|
|
65
|
+
['File', media.filename || 'file'],
|
|
66
|
+
['Type', media.mime || 'unknown'],
|
|
67
|
+
['Created', formatIsoTimestamp(media.created_at)],
|
|
68
|
+
]))
|
|
69
|
+
: [
|
|
70
|
+
read.ok ? '_This file was not found, so the preview shows the request as given._' : readFailedNote(read.error),
|
|
71
|
+
mdKeyValue([['File ID', input.asset_id]]),
|
|
72
|
+
].join('\n\n');
|
|
73
|
+
return [details, 'This permanently deletes the file from the library. A file a post still uses is kept.'].join('\n\n');
|
|
74
|
+
},
|
|
75
|
+
run: async () => {
|
|
76
|
+
const result = await client.deleteMediaAsset(input.asset_id);
|
|
77
|
+
return result.filename
|
|
78
|
+
? `Deleted ${result.filename} from the library.`
|
|
79
|
+
: 'Deleted the file from the library.';
|
|
80
|
+
},
|
|
81
|
+
});
|
|
82
|
+
}
|
|
47
83
|
async function uploadFile(client, input) {
|
|
48
84
|
if (!input.file_path && !input.base64_data) {
|
|
49
85
|
return mdError('Provide either `file_path` or `base64_data`.');
|
|
@@ -682,7 +682,7 @@ export declare const validatePostInputSchema: import("zod").ZodObject<{
|
|
|
682
682
|
}, import("zod").ZodTypeAny, "passthrough">>>;
|
|
683
683
|
workspace_id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
684
684
|
}, "strip", import("zod").ZodTypeAny, {
|
|
685
|
-
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "x" | "
|
|
685
|
+
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "x" | "bluesky" | "telegram" | "discord" | "wordpress" | "devto" | "hashnode" | "lemmy" | "slack" | "mastodon" | "gmb" | "google-business" | "google_business_profile" | undefined;
|
|
686
686
|
account_id?: string | undefined;
|
|
687
687
|
workspace_id?: string | undefined;
|
|
688
688
|
username?: string | undefined;
|
|
@@ -893,7 +893,7 @@ export declare const validatePostInputSchema: import("zod").ZodObject<{
|
|
|
893
893
|
ai_generated: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
894
894
|
}, import("zod").ZodTypeAny, "passthrough"> | undefined;
|
|
895
895
|
}, {
|
|
896
|
-
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "x" | "
|
|
896
|
+
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "x" | "bluesky" | "telegram" | "discord" | "wordpress" | "devto" | "hashnode" | "lemmy" | "slack" | "mastodon" | "gmb" | "google-business" | "google_business_profile" | undefined;
|
|
897
897
|
account_id?: string | undefined;
|
|
898
898
|
workspace_id?: string | undefined;
|
|
899
899
|
username?: string | undefined;
|
|
@@ -1790,7 +1790,7 @@ export declare const validatePostTool: {
|
|
|
1790
1790
|
}, import("zod").ZodTypeAny, "passthrough">>>;
|
|
1791
1791
|
workspace_id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1792
1792
|
}, "strip", import("zod").ZodTypeAny, {
|
|
1793
|
-
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "x" | "
|
|
1793
|
+
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "x" | "bluesky" | "telegram" | "discord" | "wordpress" | "devto" | "hashnode" | "lemmy" | "slack" | "mastodon" | "gmb" | "google-business" | "google_business_profile" | undefined;
|
|
1794
1794
|
account_id?: string | undefined;
|
|
1795
1795
|
workspace_id?: string | undefined;
|
|
1796
1796
|
username?: string | undefined;
|
|
@@ -2001,7 +2001,7 @@ export declare const validatePostTool: {
|
|
|
2001
2001
|
ai_generated: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
2002
2002
|
}, import("zod").ZodTypeAny, "passthrough"> | undefined;
|
|
2003
2003
|
}, {
|
|
2004
|
-
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "x" | "
|
|
2004
|
+
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "x" | "bluesky" | "telegram" | "discord" | "wordpress" | "devto" | "hashnode" | "lemmy" | "slack" | "mastodon" | "gmb" | "google-business" | "google_business_profile" | undefined;
|
|
2005
2005
|
account_id?: string | undefined;
|
|
2006
2006
|
workspace_id?: string | undefined;
|
|
2007
2007
|
username?: string | undefined;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const WEBHOOK_EVENTS: readonly ["webhook.test", "post.created", "post.updated", "post.deleted", "post.publishing", "post.published", "post.failed", "account.disconnected", "analytics.synced", "approval.requested", "approval.approved", "approval.changes_requested", "approval.rejected", "approval.commented"];
|
|
3
|
-
export declare const webhookEventSchema: z.ZodEnum<["webhook.test", "post.created", "post.updated", "post.deleted", "post.publishing", "post.published", "post.failed", "account.disconnected", "analytics.synced", "approval.requested", "approval.approved", "approval.changes_requested", "approval.rejected", "approval.commented"]>;
|
|
2
|
+
export declare const WEBHOOK_EVENTS: readonly ["webhook.test", "post.created", "post.updated", "post.deleted", "post.publishing", "post.published", "post.failed", "account.disconnected", "account.needs_reconnect", "account.reconnected", "analytics.synced", "approval.requested", "approval.approved", "approval.changes_requested", "approval.rejected", "approval.commented"];
|
|
3
|
+
export declare const webhookEventSchema: z.ZodEnum<["webhook.test", "post.created", "post.updated", "post.deleted", "post.publishing", "post.published", "post.failed", "account.disconnected", "account.needs_reconnect", "account.reconnected", "analytics.synced", "approval.requested", "approval.approved", "approval.changes_requested", "approval.rejected", "approval.commented"]>;
|
package/dist/tools/whoami.d.ts
CHANGED
|
@@ -6,9 +6,12 @@ export declare const whoamiTool: {
|
|
|
6
6
|
description: string;
|
|
7
7
|
inputSchema: z.ZodObject<{
|
|
8
8
|
view: z.ZodOptional<z.ZodEnum<["identity", "status"]>>;
|
|
9
|
+
include: z.ZodOptional<z.ZodEnum<["api_keys"]>>;
|
|
9
10
|
}, "strip", z.ZodTypeAny, {
|
|
11
|
+
include?: "api_keys" | undefined;
|
|
10
12
|
view?: "status" | "identity" | undefined;
|
|
11
13
|
}, {
|
|
14
|
+
include?: "api_keys" | undefined;
|
|
12
15
|
view?: "status" | "identity" | undefined;
|
|
13
16
|
}>;
|
|
14
17
|
/** The old tools' exact input schemas, for alias calls (see alias-transport.ts). */
|
|
@@ -17,5 +20,6 @@ export declare const whoamiTool: {
|
|
|
17
20
|
};
|
|
18
21
|
execute(client: PosterlyClient, input: {
|
|
19
22
|
view?: "identity" | "status";
|
|
23
|
+
include?: "api_keys";
|
|
20
24
|
}, ctx: ToolContext): Promise<string>;
|
|
21
25
|
};
|
package/dist/tools/whoami.js
CHANGED
|
@@ -1,32 +1,36 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { POSTERLY_MCP_VERSION } from '../lib/version.js';
|
|
3
3
|
import { resolvePosterlyBaseUrl } from '../lib/api-client.js';
|
|
4
|
-
import { code, mdKeyValue, mdTable, mdTitle } from '../lib/format.js';
|
|
4
|
+
import { code, formatApiKeyList, mdKeyValue, mdTable, mdTitle } from '../lib/format.js';
|
|
5
5
|
import { validateArgs } from '../lib/tool-runtime.js';
|
|
6
6
|
const NPM_LATEST_URL = 'https://registry.npmjs.org/posterly-mcp-server/latest';
|
|
7
7
|
export const whoamiTool = {
|
|
8
8
|
name: 'whoami',
|
|
9
|
-
description: 'Who you are and how posterly is connected. view=identity (default): the authenticated user, API key scopes, workspaces, and onboarding next step. ALWAYS call this at the start of a session; if onboarding.completed is false, walk the remaining onboarding steps IN THIS conversation (about you, connect, brand voice, first post) and do not send the user to /onboarding-v2 or the dashboard composer wizard. view=status: MCP server version, latest npm version, endpoint and API key health, and update guidance; works before POSTERLY_API_KEY is configured.',
|
|
9
|
+
description: 'Who you are and how posterly is connected. view=identity (default): the authenticated user, API key scopes, workspaces, and onboarding next step. Pass include=api_keys to also list this account\'s API keys (name, prefix, scopes, created, last used). The secret is never included. ALWAYS call this at the start of a session; if onboarding.completed is false, walk the remaining onboarding steps IN THIS conversation (about you, connect, brand voice, first post) and do not send the user to /onboarding-v2 or the dashboard composer wizard. view=status: MCP server version, latest npm version, endpoint and API key health, and update guidance; works before POSTERLY_API_KEY is configured.',
|
|
10
10
|
inputSchema: z.object({
|
|
11
11
|
view: z
|
|
12
12
|
.enum(['identity', 'status'])
|
|
13
13
|
.optional()
|
|
14
14
|
.describe('identity (default): user, scopes, workspaces, onboarding. status: MCP server and connection health.'),
|
|
15
|
+
include: z
|
|
16
|
+
.enum(['api_keys'])
|
|
17
|
+
.optional()
|
|
18
|
+
.describe('identity only. api_keys lists this account\'s API keys. The secret is never included. Omit it for the usual identity answer.'),
|
|
15
19
|
}),
|
|
16
20
|
/** The old tools' exact input schemas, for alias calls (see alias-transport.ts). */
|
|
17
21
|
legacySchemas: {
|
|
18
22
|
get_mcp_status: z.object({}),
|
|
19
23
|
},
|
|
20
24
|
async execute(client, input, ctx) {
|
|
21
|
-
const { mode } = validateArgs(ctx, 'whoami', input);
|
|
25
|
+
const { mode, args } = validateArgs(ctx, 'whoami', input);
|
|
22
26
|
if (mode === 'status')
|
|
23
27
|
return mcpStatus(client);
|
|
24
|
-
return identity(client, ctx);
|
|
28
|
+
return identity(client, ctx, args.include === 'api_keys');
|
|
25
29
|
},
|
|
26
30
|
};
|
|
27
|
-
async function identity(client, ctx) {
|
|
31
|
+
async function identity(client, ctx, includeKeys) {
|
|
28
32
|
const info = await client.whoami();
|
|
29
|
-
|
|
33
|
+
let text = [
|
|
30
34
|
mdTitle('posterly identity'),
|
|
31
35
|
mdKeyValue([
|
|
32
36
|
['User', info.user.email || code(info.user.id)],
|
|
@@ -47,6 +51,10 @@ async function identity(client, ctx) {
|
|
|
47
51
|
])),
|
|
48
52
|
'**Tip:** Pass `workspace_id` to `create_post`, `list_posts`, `list_accounts`, and `find_available_slot` when you want the assistant to stay inside one workspace.',
|
|
49
53
|
].filter(Boolean).join('\n\n');
|
|
54
|
+
if (includeKeys) {
|
|
55
|
+
const listed = await client.listApiKeys();
|
|
56
|
+
text = `${text}\n\n${formatApiKeyList(listed.api_keys)}`;
|
|
57
|
+
}
|
|
50
58
|
// Only when tool sets are filtered, so the default answer is unchanged.
|
|
51
59
|
const toolsets = ctx.toolsets;
|
|
52
60
|
if (!toolsets || toolsets.all)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "posterly-mcp-server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.55.0",
|
|
4
4
|
"mcpName": "io.github.awpthorp/posterly",
|
|
5
5
|
"description": "MCP server for posterly: schedule and publish social media posts across 18 platforms from any MCP client (Claude, ChatGPT, Cursor, Windsurf, Cline, and more)",
|
|
6
6
|
"license": "MIT",
|
package/server.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"name": "io.github.awpthorp/posterly",
|
|
4
4
|
"title": "posterly",
|
|
5
5
|
"description": "Validate, schedule, publish, and analyze social content across 18 platforms with posterly.",
|
|
6
|
-
"version": "0.
|
|
6
|
+
"version": "0.55.0",
|
|
7
7
|
"websiteUrl": "https://www.poster.ly/mcp",
|
|
8
8
|
"repository": {
|
|
9
9
|
"url": "https://github.com/awpthorp/posterly-mcp-server",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
{
|
|
14
14
|
"registryType": "npm",
|
|
15
15
|
"identifier": "posterly-mcp-server",
|
|
16
|
-
"version": "0.
|
|
16
|
+
"version": "0.55.0",
|
|
17
17
|
"transport": {
|
|
18
18
|
"type": "stdio"
|
|
19
19
|
},
|
package/tool-annotations.json
CHANGED
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"list_platforms",
|
|
20
20
|
"trigger_platform_helper",
|
|
21
21
|
"list_brands",
|
|
22
|
+
"manage_brand",
|
|
22
23
|
"list_post_suggestions",
|
|
23
24
|
"dismiss_suggestion",
|
|
24
25
|
"list_posts",
|
|
@@ -49,6 +50,10 @@
|
|
|
49
50
|
"manage_google_business_review",
|
|
50
51
|
"list_google_business_media",
|
|
51
52
|
"manage_google_business_media",
|
|
53
|
+
"list_google_business_service_areas",
|
|
54
|
+
"manage_google_business_service_area",
|
|
55
|
+
"list_google_business_locations",
|
|
56
|
+
"manage_google_business_location",
|
|
52
57
|
"list_conversations",
|
|
53
58
|
"manage_conversation",
|
|
54
59
|
"list_comments",
|
|
@@ -65,6 +70,7 @@
|
|
|
65
70
|
"downgrade_subscription",
|
|
66
71
|
"upgrade_subscription",
|
|
67
72
|
"manage_extra_account",
|
|
73
|
+
"manage_x_posting_addon",
|
|
68
74
|
"get_updates",
|
|
69
75
|
"posterly_status"
|
|
70
76
|
],
|
|
@@ -93,6 +99,8 @@
|
|
|
93
99
|
"list_google_business_reviews",
|
|
94
100
|
"audit_google_business_profile",
|
|
95
101
|
"list_google_business_media",
|
|
102
|
+
"list_google_business_service_areas",
|
|
103
|
+
"list_google_business_locations",
|
|
96
104
|
"list_conversations",
|
|
97
105
|
"list_comments",
|
|
98
106
|
"list_activity",
|
|
@@ -107,11 +115,14 @@
|
|
|
107
115
|
"manage_workspace_member",
|
|
108
116
|
"disconnect_account",
|
|
109
117
|
"manage_oauth_client",
|
|
118
|
+
"manage_brand",
|
|
110
119
|
"dismiss_suggestion",
|
|
111
120
|
"update_post",
|
|
112
121
|
"delete_post",
|
|
122
|
+
"upload_media",
|
|
113
123
|
"manage_google_business_review",
|
|
114
124
|
"manage_google_business_media",
|
|
125
|
+
"manage_google_business_location",
|
|
115
126
|
"manage_comment",
|
|
116
127
|
"manage_webhook",
|
|
117
128
|
"cancel_subscription",
|
|
@@ -119,7 +130,8 @@
|
|
|
119
130
|
"pause_subscription",
|
|
120
131
|
"downgrade_subscription",
|
|
121
132
|
"upgrade_subscription",
|
|
122
|
-
"manage_extra_account"
|
|
133
|
+
"manage_extra_account",
|
|
134
|
+
"manage_x_posting_addon"
|
|
123
135
|
],
|
|
124
136
|
"idempotentMutationTools": [
|
|
125
137
|
"delete_api_key",
|
|
@@ -133,7 +145,9 @@
|
|
|
133
145
|
"resume_subscription",
|
|
134
146
|
"downgrade_subscription",
|
|
135
147
|
"upgrade_subscription",
|
|
136
|
-
"manage_extra_account"
|
|
148
|
+
"manage_extra_account",
|
|
149
|
+
"manage_google_business_service_area",
|
|
150
|
+
"manage_google_business_location"
|
|
137
151
|
],
|
|
138
152
|
"openWorldTools": [
|
|
139
153
|
"start_signup",
|
|
@@ -166,6 +180,10 @@
|
|
|
166
180
|
"manage_google_business_review",
|
|
167
181
|
"list_google_business_media",
|
|
168
182
|
"manage_google_business_media",
|
|
183
|
+
"list_google_business_service_areas",
|
|
184
|
+
"manage_google_business_service_area",
|
|
185
|
+
"list_google_business_locations",
|
|
186
|
+
"manage_google_business_location",
|
|
169
187
|
"manage_conversation",
|
|
170
188
|
"manage_comment",
|
|
171
189
|
"create_webhook",
|
|
@@ -178,6 +196,7 @@
|
|
|
178
196
|
"downgrade_subscription",
|
|
179
197
|
"upgrade_subscription",
|
|
180
198
|
"manage_extra_account",
|
|
199
|
+
"manage_x_posting_addon",
|
|
181
200
|
"delete_post",
|
|
182
201
|
"submit_product_feedback"
|
|
183
202
|
]
|