postfast-mcp 0.5.1 → 0.5.3
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/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/README.md +1 -1
- package/dist/core/build-tools.d.ts +7 -3
- package/dist/core/build-tools.js +7 -5
- package/dist/core/build-tools.js.map +1 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.js +1 -1
- package/dist/core/index.js.map +1 -1
- package/dist/core/instructions.js +4 -4
- package/dist/core/instructions.js.map +1 -1
- package/dist/core/shared.d.ts +0 -9
- package/dist/core/shared.js +0 -7
- package/dist/core/shared.js.map +1 -1
- package/dist/core/tool-def.d.ts +0 -2
- package/dist/core/tools/accounts.js +0 -14
- package/dist/core/tools/accounts.js.map +1 -1
- package/dist/core/tools/inbox.d.ts +2 -2
- package/dist/core/tools/inbox.js +7 -16
- package/dist/core/tools/inbox.js.map +1 -1
- package/dist/core/tools/posts.js +2 -11
- package/dist/core/tools/posts.js.map +1 -1
- package/dist/core/tools/tiktok.js +0 -2
- package/dist/core/tools/tiktok.js.map +1 -1
- package/dist/core/tools/uploads.js +1 -15
- package/dist/core/tools/uploads.js.map +1 -1
- package/dist/core/tools/workspaces.js +0 -2
- package/dist/core/tools/workspaces.js.map +1 -1
- package/dist/stdio/index.js +1 -1
- package/package.json +1 -1
- package/skills/social-inbox/SKILL.md +2 -2
- package/skills/social-media-post/SKILL.md +1 -1
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
{
|
|
12
12
|
"name": "postfast",
|
|
13
13
|
"description": "Schedule, manage, and analyze social media posts via PostFast. Supports Facebook, Instagram, X, TikTok, LinkedIn, YouTube, BlueSky, Threads, Pinterest, Telegram, and Google Business Profile.",
|
|
14
|
-
"version": "0.5.
|
|
14
|
+
"version": "0.5.3",
|
|
15
15
|
"author": {
|
|
16
16
|
"name": "PostFast",
|
|
17
17
|
"email": "me@peturgeorgievv.com"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "postfast",
|
|
3
3
|
"description": "Schedule, manage, and analyze social media posts via PostFast. Supports Facebook, Instagram, X, TikTok, LinkedIn, YouTube, BlueSky, Threads, Pinterest, Telegram, and Google Business Profile. After installing, tell Cowork: 'Set my PostFast API key' — get your key at https://app.postfa.st/dashboard → API.",
|
|
4
|
-
"version": "0.5.
|
|
4
|
+
"version": "0.5.3",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "PostFast",
|
|
7
7
|
"email": "me@peturgeorgievv.com"
|
package/README.md
CHANGED
|
@@ -136,7 +136,7 @@ Ask your AI assistant things like:
|
|
|
136
136
|
|
|
137
137
|
### Social Inbox (comments)
|
|
138
138
|
|
|
139
|
-
Comments on your posts — TikTok, Instagram, Facebook Pages,
|
|
139
|
+
Comments on your posts — TikTok, Instagram, Facebook Pages, and Threads — in one inbox (an account's `inboxCapable` flag says what is live today). Comments only (no direct messages), from connect onward (no history backfill). Reply capability is always server-computed per conversation (`canReply`, `maxReplyLength`, `windowState`, `disabledReason`) — render from those fields, never platform assumptions.
|
|
140
140
|
|
|
141
141
|
| Tool | Description |
|
|
142
142
|
|------|-------------|
|
|
@@ -22,9 +22,13 @@ export declare function buildTools(options: BuildToolsOptions): ResolvedTool[];
|
|
|
22
22
|
/**
|
|
23
23
|
* Wrap backend data as MCP content: a JSON text block (proven across all
|
|
24
24
|
* clients — and byte-stable for existing stdio consumers) plus
|
|
25
|
-
* structuredContent for clients that
|
|
26
|
-
*
|
|
27
|
-
*
|
|
25
|
+
* structuredContent for clients that read it. No catalog tool declares an
|
|
26
|
+
* outputSchema: the SDK renders zod shapes as JSON Schema draft-07, and
|
|
27
|
+
* clients whose validators accept only the 2020-12 dialect reject such a tool
|
|
28
|
+
* at list time, before any call. structuredContent without a schema is valid
|
|
29
|
+
* MCP and is never validated or stripped. Bare-array responses are wrapped as
|
|
30
|
+
* { data } there, since structuredContent must be an object; the text block
|
|
31
|
+
* stays the raw response.
|
|
28
32
|
*/
|
|
29
33
|
export declare function toolResult(data: unknown): CallToolResult;
|
|
30
34
|
/** A business/tool error the model should see and react to (not a protocol error). */
|
package/dist/core/build-tools.js
CHANGED
|
@@ -22,7 +22,6 @@ export function buildTools(options) {
|
|
|
22
22
|
inputSchema: withWorkspaceField && def.workspaceScoped !== false
|
|
23
23
|
? { ...inputSchema, workspaceId: workspaceIdField }
|
|
24
24
|
: inputSchema,
|
|
25
|
-
outputSchema: def.outputSchema,
|
|
26
25
|
annotations: def.annotations,
|
|
27
26
|
_meta: def._meta,
|
|
28
27
|
portMethod: def.portMethod,
|
|
@@ -33,9 +32,13 @@ export function buildTools(options) {
|
|
|
33
32
|
/**
|
|
34
33
|
* Wrap backend data as MCP content: a JSON text block (proven across all
|
|
35
34
|
* clients — and byte-stable for existing stdio consumers) plus
|
|
36
|
-
* structuredContent for clients that
|
|
37
|
-
*
|
|
38
|
-
*
|
|
35
|
+
* structuredContent for clients that read it. No catalog tool declares an
|
|
36
|
+
* outputSchema: the SDK renders zod shapes as JSON Schema draft-07, and
|
|
37
|
+
* clients whose validators accept only the 2020-12 dialect reject such a tool
|
|
38
|
+
* at list time, before any call. structuredContent without a schema is valid
|
|
39
|
+
* MCP and is never validated or stripped. Bare-array responses are wrapped as
|
|
40
|
+
* { data } there, since structuredContent must be an object; the text block
|
|
41
|
+
* stays the raw response.
|
|
39
42
|
*/
|
|
40
43
|
export function toolResult(data) {
|
|
41
44
|
const result = {
|
|
@@ -72,7 +75,6 @@ export function registerCatalogTools(server, options) {
|
|
|
72
75
|
title: tool.title,
|
|
73
76
|
description: tool.description,
|
|
74
77
|
inputSchema: tool.inputSchema,
|
|
75
|
-
...(tool.outputSchema ? { outputSchema: tool.outputSchema } : {}),
|
|
76
78
|
annotations: tool.annotations,
|
|
77
79
|
...(tool._meta ? { _meta: tool._meta } : {}),
|
|
78
80
|
}, (args) => runTool(() => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
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AAC;IAChC,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,SAAS,CAAE,GAAa,CAAC,OAAO,IAAI,wBAAwB,CAAC,CAAC;IACvE,CAAC;AACH,CAAC;AAMD,oEAAoE;AACpE,MAAM,UAAU,oBAAoB,CAClC,MAAiB,EACjB,OAA6B;IAE7B,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC;IAEzB,KAAK,MAAM,IAAI,IAAI,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;QACvC,MAAM,CAAC,YAAY,CACjB,IAAI,CAAC,IAAI,EACT;YACE,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAC7C,EACD,CAAC,IAA6B,EAAE,EAAE,CAChC,OAAO,CAAC,GAAG,EAAE;YACX,MAAM,EAAE,WAAW,EAAE,GAAG,IAAI,EAAE,GAAG,IAAI,IAAI,EAAE,CAAC;YAC5C,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,WAAiC,CAAC,CAAC;QACjE,CAAC,CAAC,CACL,CAAC;IACJ,CAAC;AACH,CAAC"}
|
package/dist/core/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
export * from './backend-port.js';
|
|
7
7
|
export { buildTools, registerCatalogTools, runTool, toolError, toolResult, type BuildToolsOptions, type RegisterToolsOptions, } from './build-tools.js';
|
|
8
8
|
export { SERVER_INSTRUCTIONS, instructionsFor } from './instructions.js';
|
|
9
|
-
export { CREATE_APPROVAL_STATUSES, CREATE_STATUSES, IMAGE_MIME_TYPES, PLATFORMS, POST_STATUSES, SET_APPROVAL_STATUSES, VIDEO_MIME_TYPES,
|
|
9
|
+
export { CREATE_APPROVAL_STATUSES, CREATE_STATUSES, IMAGE_MIME_TYPES, PLATFORMS, POST_STATUSES, SET_APPROVAL_STATUSES, VIDEO_MIME_TYPES, jsonParse, workspaceIdField, } from './shared.js';
|
|
10
10
|
export type { Binding, ResolvedTool, ToolAnnotations, ToolDef, } from './tool-def.js';
|
|
11
11
|
export { ALL_TOOLS } from './tools/index.js';
|
|
12
12
|
export * from './types.js';
|
package/dist/core/index.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
export * from './backend-port.js';
|
|
7
7
|
export { buildTools, registerCatalogTools, runTool, toolError, toolResult, } from './build-tools.js';
|
|
8
8
|
export { SERVER_INSTRUCTIONS, instructionsFor } from './instructions.js';
|
|
9
|
-
export { CREATE_APPROVAL_STATUSES, CREATE_STATUSES, IMAGE_MIME_TYPES, PLATFORMS, POST_STATUSES, SET_APPROVAL_STATUSES, VIDEO_MIME_TYPES,
|
|
9
|
+
export { CREATE_APPROVAL_STATUSES, CREATE_STATUSES, IMAGE_MIME_TYPES, PLATFORMS, POST_STATUSES, SET_APPROVAL_STATUSES, VIDEO_MIME_TYPES, jsonParse, workspaceIdField, } from './shared.js';
|
|
10
10
|
export { ALL_TOOLS } from './tools/index.js';
|
|
11
11
|
export * from './types.js';
|
|
12
12
|
//# sourceMappingURL=index.js.map
|
package/dist/core/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,cAAc,mBAAmB,CAAC;AAClC,OAAO,EACL,UAAU,EACV,oBAAoB,EACpB,OAAO,EACP,SAAS,EACT,UAAU,GAGX,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EACL,wBAAwB,EACxB,eAAe,EACf,gBAAgB,EAChB,SAAS,EACT,aAAa,EACb,qBAAqB,EACrB,gBAAgB,EAChB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,cAAc,mBAAmB,CAAC;AAClC,OAAO,EACL,UAAU,EACV,oBAAoB,EACpB,OAAO,EACP,SAAS,EACT,UAAU,GAGX,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EACL,wBAAwB,EACxB,eAAe,EACf,gBAAgB,EAChB,SAAS,EACT,aAAa,EACb,qBAAqB,EACrB,gBAAgB,EAChB,SAAS,EACT,gBAAgB,GACjB,MAAM,aAAa,CAAC;AAOrB,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,cAAc,YAAY,CAAC"}
|
|
@@ -12,14 +12,14 @@ const SHARED_TAIL = `Before scheduling, confirm the target account's connectionS
|
|
|
12
12
|
|
|
13
13
|
Status & timing: status=SCHEDULED requires scheduledAt on every post (ISO-8601, in the future, within 1 year); status=DRAFT must omit scheduledAt. approvalStatus=APPROVED publishes; PENDING_APPROVAL holds it for review. There is no instant "publish now" — for an immediate post, set scheduledAt a few minutes ahead of now (a time at or before the current moment is rejected).
|
|
14
14
|
|
|
15
|
-
Media: use the key returned by an upload tool, and set mediaItems[].type to match the file (IMAGE for image/* keys, VIDEO for video/* keys — a mismatch is rejected). Videos are capped at 250MB (Telegram 50MB, Bluesky 100MB). Media is REQUIRED on TikTok, YouTube (video only), Instagram,
|
|
15
|
+
Media: use the key returned by an upload tool, and set mediaItems[].type to match the file (IMAGE for image/* keys, VIDEO for video/* keys — a mismatch is rejected). Videos are capped at 250MB (Telegram 50MB, Bluesky 100MB). Media is REQUIRED on TikTok, YouTube (video only), Instagram, and Pinterest; X, LinkedIn, Facebook, Threads, Bluesky, Telegram, and Google Business Profile allow text-only posts (GBP accepts 1 image and no video). This requirement applies even to DRAFTS — a draft to a media-required platform without media is rejected. So if the user asks to post to a media-required platform and provides no media, ask them for an image/video (or generate and upload one) BEFORE calling create_posts; don't attempt the post without media.
|
|
16
16
|
|
|
17
17
|
Per-platform limits (media counts / characters):
|
|
18
18
|
- X: up to 4 images or 1 video (no mixing); 280 chars (4,000 with X Premium).
|
|
19
19
|
- TikTok: 1 video OR up to 10 images; 4,000 chars.
|
|
20
20
|
- Instagram: up to 10 images + 10 videos (mixed OK); 2,200 chars, max 30 hashtags.
|
|
21
21
|
- YouTube: 1 video, no images; title max 100 chars.
|
|
22
|
-
- Facebook / LinkedIn: up to 10 images
|
|
22
|
+
- Facebook / LinkedIn: up to 10 images OR 1 video (no mixing).
|
|
23
23
|
- Threads: up to 10 images + 10 videos; 500 chars.
|
|
24
24
|
- Pinterest: up to 5 images or 1 video; title max 100, description max 800.
|
|
25
25
|
- Google Business Profile: 1 image; 1,500 chars.
|
|
@@ -30,7 +30,7 @@ Platform-specific options go in the controls object, e.g.:
|
|
|
30
30
|
- Pinterest: controls.pinterestBoardId is REQUIRED — it is a board's boardId from list_pinterest_boards, NOT the Pinterest account's socialMediaId.
|
|
31
31
|
- Google Business Profile: controls.gbpLocationId is required — the locationId from list_gbp_locations.
|
|
32
32
|
- YouTube: controls.youtubePlaylistId is the playlistId from list_youtube_playlists; youtubeIsShort defaults true; title falls back to the first 100 chars of content.
|
|
33
|
-
- TikTok: controls.tiktokPrivacy is deprecated (videos use the account default, photos default to public); tiktokTitle applies to photo carousels only (max 90); firstComment (max
|
|
33
|
+
- TikTok: controls.tiktokPrivacy is deprecated (videos use the account default, photos default to public); tiktokTitle applies to photo carousels only (max 90); firstComment (max 1,200, requires a Business API connection).
|
|
34
34
|
- Instagram: controls.instagramPublishType = TIMELINE | STORY | REEL.
|
|
35
35
|
- Facebook: controls.facebookContentType = POST | REEL | STORY. controls.facebookTargetCountries limits who can see a FEED post by country (ISO 3166-1 alpha-2, max 25; not Reels/Stories).
|
|
36
36
|
- Geotag a place (Facebook/Instagram): call search_places, then pass a returned id as controls.facebookPlaceId (Facebook feed posts only — not Reels/Stories/video) and/or controls.instagramLocationId (Instagram single media only — not carousels). One id works for both.
|
|
@@ -42,7 +42,7 @@ Failed posts carry lastError — usually a disconnected account (reconnect, then
|
|
|
42
42
|
|
|
43
43
|
delete_post removes a post from PostFast only — it never deletes an already-published post from the social platform. Say so when a user asks to delete something that has already gone out.
|
|
44
44
|
|
|
45
|
-
Social inbox (comments on your posts — TikTok, Instagram, Facebook Pages, Threads
|
|
45
|
+
Social inbox (comments on your posts — TikTok, Instagram, Facebook Pages, Threads; an account's inboxCapable flag from list_accounts says what is live today): read with list_inbox_conversations → list_inbox_items (get_inbox_unread_count for the total), reply with reply_to_inbox_item (public, under a specific comment item) or send_inbox_private_reply (Instagram only: one per comment, within 7 days). Whether and how long a reply can be comes ONLY from the conversation's server-computed canReply / maxReplyLength / windowState / disabledReason — never assume platform rules. Moderate with set_inbox_item_state (HIDE / UNHIDE / DELETE — DELETE removes the comment on the platform and cannot be undone), triage with set_inbox_conversation_status and assign_inbox_conversation, and call mark_inbox_conversation_read after presenting a thread. It is a comments inbox — never present it as DMs or messages.`;
|
|
46
46
|
const STDIO_INSTRUCTIONS = `PostFast schedules and publishes social posts across X, Instagram, Facebook, TikTok, LinkedIn, YouTube, Threads, Pinterest, Bluesky, Telegram, and Google Business Profile.
|
|
47
47
|
|
|
48
48
|
Flow: list_accounts to see what's connected → create_posts (one socialMediaId per post; batch up to 15) → attach media via upload_media (a local file, by absolute path) or get_upload_urls (signed PUT upload for raw bytes) → a post publishes when status=SCHEDULED and approvalStatus=APPROVED.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instructions.js","sourceRoot":"","sources":["../../src/core/instructions.ts"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AAEH,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"instructions.js","sourceRoot":"","sources":["../../src/core/instructions.ts"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AAEH,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;w4BAkCo3B,CAAC;AAEz4B,MAAM,kBAAkB,GAAG;;;;;;EAMzB,WAAW,EAAE,CAAC;AAEhB,MAAM,mBAAmB,GAAG;;;;;;EAM1B,WAAW,EAAE,CAAC;AAEhB,MAAM,CAAC,MAAM,mBAAmB,GAA4B;IAC1D,KAAK,EAAE,kBAAkB;IACzB,MAAM,EAAE,mBAAmB;CAC5B,CAAC;AAEF,MAAM,UAAU,eAAe,CAAC,OAAgB;IAC9C,OAAO,mBAAmB,CAAC,OAAO,CAAC,CAAC;AACtC,CAAC"}
|
package/dist/core/shared.d.ts
CHANGED
|
@@ -10,14 +10,5 @@ export declare const IMAGE_MIME_TYPES: readonly ["image/jpeg", "image/png", "ima
|
|
|
10
10
|
export declare const VIDEO_MIME_TYPES: readonly ["video/mp4", "video/webm", "video/quicktime"];
|
|
11
11
|
/** Some MCP clients stringify complex params — parse them back before validation. */
|
|
12
12
|
export declare function jsonParse<T extends z.ZodTypeAny>(schema: T): z.ZodPreprocess<T>;
|
|
13
|
-
/**
|
|
14
|
-
* Permissive output schema for list-style tools: { data: [...] }. Items are
|
|
15
|
-
* unknown (never type-rejected) and extra top-level keys (totalCount, pageInfo)
|
|
16
|
-
* pass through — so structuredContent is advertised without breaking on real
|
|
17
|
-
* backend responses.
|
|
18
|
-
*/
|
|
19
|
-
export declare const dataListOutputSchema: {
|
|
20
|
-
data: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
21
|
-
};
|
|
22
13
|
/** Optional per-call workspace selector, injected only on the remote binding. */
|
|
23
14
|
export declare const workspaceIdField: z.ZodOptional<z.ZodUUID>;
|
package/dist/core/shared.js
CHANGED
|
@@ -45,13 +45,6 @@ export function jsonParse(schema) {
|
|
|
45
45
|
return val;
|
|
46
46
|
}, schema);
|
|
47
47
|
}
|
|
48
|
-
/**
|
|
49
|
-
* Permissive output schema for list-style tools: { data: [...] }. Items are
|
|
50
|
-
* unknown (never type-rejected) and extra top-level keys (totalCount, pageInfo)
|
|
51
|
-
* pass through — so structuredContent is advertised without breaking on real
|
|
52
|
-
* backend responses.
|
|
53
|
-
*/
|
|
54
|
-
export const dataListOutputSchema = { data: z.array(z.unknown()).optional() };
|
|
55
48
|
/** Optional per-call workspace selector, injected only on the remote binding. */
|
|
56
49
|
export const workspaceIdField = z
|
|
57
50
|
.uuid()
|
package/dist/core/shared.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.js","sourceRoot":"","sources":["../../src/core/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,UAAU;IACV,WAAW;IACX,GAAG;IACH,QAAQ;IACR,UAAU;IACV,SAAS;IACT,SAAS;IACT,SAAS;IACT,WAAW;IACX,UAAU;IACV,yBAAyB;CACjB,CAAC;AAEX,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,CAAU,CAAC;AACpF,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,MAAM,EAAE,SAAS,EAAE,QAAQ,CAAU,CAAC;AAClF,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,QAAQ,CAAU,CAAC;AAC9E,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,OAAO,EAAE,WAAW,CAAU,CAAC;AAC/D,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,kBAAkB,EAAE,UAAU,CAAU,CAAC;AAClF,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,kBAAkB;IAClB,aAAa;IACb,UAAU;IACV,UAAU;IACV,YAAY;CACJ,CAAC;AAEX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,wBAAwB,GAAG,CAAC,kBAAkB,EAAE,UAAU,CAAU,CAAC;AAClF,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,kBAAkB;IAClB,aAAa;IACb,UAAU;IACV,UAAU;IACV,YAAY;CACJ,CAAC;AAEX,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,YAAY;IACZ,WAAW;IACX,WAAW;IACX,YAAY;CACJ,CAAC;AACX,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,WAAW,EAAE,YAAY,EAAE,iBAAiB,CAAU,CAAC;AAExF,qFAAqF;AACrF,MAAM,UAAU,SAAS,CAAyB,MAAS;IACzD,OAAO,CAAC,CAAC,UAAU,CAAC,CAAC,GAAG,EAAE,EAAE;QAC1B,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE,CAAC;YAC5B,IAAI,CAAC;gBACH,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACzB,CAAC;YAAC,MAAM,CAAC;gBACP,OAAO,GAAG,CAAC;YACb,CAAC;QACH,CAAC;QACD,OAAO,GAAG,CAAC;IACb,CAAC,EAAE,MAAM,CAAC,CAAC;AACb,CAAC;AAED,iFAAiF;AACjF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC;KAC9B,IAAI,EAAE;KACN,QAAQ,EAAE;KACV,QAAQ,CACP,6FAA6F,CAC9F,CAAC"}
|
package/dist/core/tool-def.d.ts
CHANGED
|
@@ -21,7 +21,6 @@ export interface ToolDef {
|
|
|
21
21
|
title: string;
|
|
22
22
|
description: string | ((binding: Binding) => string);
|
|
23
23
|
inputSchema: ZodRawShape | ((binding: Binding) => ZodRawShape);
|
|
24
|
-
outputSchema?: ZodRawShape;
|
|
25
24
|
annotations: ToolAnnotations;
|
|
26
25
|
/** Extra tool metadata, e.g. the ChatGPT file-param marker on upload_media. */
|
|
27
26
|
_meta?: Record<string, unknown>;
|
|
@@ -47,7 +46,6 @@ export interface ResolvedTool {
|
|
|
47
46
|
title: string;
|
|
48
47
|
description: string;
|
|
49
48
|
inputSchema: ZodRawShape;
|
|
50
|
-
outputSchema?: ZodRawShape;
|
|
51
49
|
annotations: ToolAnnotations;
|
|
52
50
|
_meta?: Record<string, unknown>;
|
|
53
51
|
portMethod?: keyof BackendPort;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { dataListOutputSchema } from '../shared.js';
|
|
3
2
|
export const accountTools = [
|
|
4
3
|
{
|
|
5
4
|
name: 'list_accounts',
|
|
@@ -7,7 +6,6 @@ export const accountTools = [
|
|
|
7
6
|
title: 'List Accounts',
|
|
8
7
|
description: 'List all social media accounts connected to the workspace. Each account includes connectionStatus (CONNECTED or DISABLED) and disabledReason (null unless DISABLED), plus followerCount (latest stored snapshot, a string; absent for platforms without follower data), followerCountUpdatedAt, and inboxCapable (whether the account can appear in the social inbox, i.e. comment ingestion is supported). A DISABLED account will not publish until the user reconnects it — pre-check before scheduling. For a follower trend over time, use get_follower_history.',
|
|
9
8
|
inputSchema: {},
|
|
10
|
-
outputSchema: dataListOutputSchema,
|
|
11
9
|
annotations: { readOnlyHint: true, destructiveHint: false, openWorldHint: false },
|
|
12
10
|
run: (port, _args, workspaceId) => port.listAccounts(workspaceId),
|
|
13
11
|
},
|
|
@@ -19,7 +17,6 @@ export const accountTools = [
|
|
|
19
17
|
inputSchema: {
|
|
20
18
|
socialMediaId: z.uuid().describe('Pinterest account id (from list_accounts)'),
|
|
21
19
|
},
|
|
22
|
-
outputSchema: dataListOutputSchema,
|
|
23
20
|
// openWorld false: reads boards already stored in our database.
|
|
24
21
|
annotations: { readOnlyHint: true, destructiveHint: false, openWorldHint: false },
|
|
25
22
|
run: (port, args, workspaceId) => port.listPinterestBoards(args.socialMediaId, workspaceId),
|
|
@@ -32,7 +29,6 @@ export const accountTools = [
|
|
|
32
29
|
inputSchema: {
|
|
33
30
|
socialMediaId: z.uuid().describe('YouTube account id (from list_accounts)'),
|
|
34
31
|
},
|
|
35
|
-
outputSchema: dataListOutputSchema,
|
|
36
32
|
// openWorld false: reads playlists already stored in our database.
|
|
37
33
|
annotations: { readOnlyHint: true, destructiveHint: false, openWorldHint: false },
|
|
38
34
|
run: (port, args, workspaceId) => port.listYoutubePlaylists(args.socialMediaId, workspaceId),
|
|
@@ -45,7 +41,6 @@ export const accountTools = [
|
|
|
45
41
|
inputSchema: {
|
|
46
42
|
socialMediaId: z.uuid().describe('GBP account id (from list_accounts)'),
|
|
47
43
|
},
|
|
48
|
-
outputSchema: dataListOutputSchema,
|
|
49
44
|
// openWorld false: reads locations already stored in our database.
|
|
50
45
|
annotations: { readOnlyHint: true, destructiveHint: false, openWorldHint: false },
|
|
51
46
|
run: (port, args, workspaceId) => port.listGbpLocations(args.socialMediaId, workspaceId),
|
|
@@ -66,13 +61,6 @@ export const accountTools = [
|
|
|
66
61
|
.optional()
|
|
67
62
|
.describe('Range end (ISO 8601). Defaults to now; range is capped at 365 days.'),
|
|
68
63
|
},
|
|
69
|
-
outputSchema: {
|
|
70
|
-
socialMediaId: z.string().optional(),
|
|
71
|
-
series: z.array(z.unknown()).optional(),
|
|
72
|
-
currentFollowerCount: z.string().optional(),
|
|
73
|
-
delta: z.string().optional(),
|
|
74
|
-
trackingStartedAt: z.string().optional(),
|
|
75
|
-
},
|
|
76
64
|
annotations: { readOnlyHint: true, destructiveHint: false, openWorldHint: false },
|
|
77
65
|
run: (port, args, workspaceId) => port.getFollowerHistory(args, workspaceId),
|
|
78
66
|
},
|
|
@@ -84,7 +72,6 @@ export const accountTools = [
|
|
|
84
72
|
inputSchema: {
|
|
85
73
|
query: z.string().min(2).describe('Place search text, min 2 characters (e.g. "eiffel tower")'),
|
|
86
74
|
},
|
|
87
|
-
outputSchema: dataListOutputSchema,
|
|
88
75
|
annotations: { readOnlyHint: true, destructiveHint: false, openWorldHint: true },
|
|
89
76
|
run: (port, args, workspaceId) => port.searchPlaces(args.query, workspaceId),
|
|
90
77
|
},
|
|
@@ -107,7 +94,6 @@ export const accountTools = [
|
|
|
107
94
|
.optional()
|
|
108
95
|
.describe('Recipient email (required when sendEmail is true)'),
|
|
109
96
|
},
|
|
110
|
-
outputSchema: { connectUrl: z.string().optional() },
|
|
111
97
|
// destructive: sendEmail delivers a real email that cannot be recalled, and the
|
|
112
98
|
// minted link grants account-connect access until it expires.
|
|
113
99
|
annotations: { readOnlyHint: false, destructiveHint: true, openWorldHint: true },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accounts.js","sourceRoot":"","sources":["../../../src/core/tools/accounts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"accounts.js","sourceRoot":"","sources":["../../../src/core/tools/accounts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,MAAM,CAAC,MAAM,YAAY,GAAc;IACrC;QACE,IAAI,EAAE,eAAe;QACrB,OAAO,EAAE,MAAM;QACf,KAAK,EAAE,eAAe;QACtB,WAAW,EACT,uiBAAuiB;QACziB,WAAW,EAAE,EAAE;QACf,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,eAAe,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE;QACjF,GAAG,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,WAAW,CAAC;KAClE;IACD;QACE,IAAI,EAAE,uBAAuB;QAC7B,OAAO,EAAE,MAAM;QACf,KAAK,EAAE,uBAAuB;QAC9B,WAAW,EACT,sKAAsK;QACxK,WAAW,EAAE;YACX,aAAa,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,2CAA2C,CAAC;SAC9E;QACD,gEAAgE;QAChE,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,eAAe,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EA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AC;YACpD,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,yBAAyB,CAAC;YACzE,KAAK,EAAE,CAAC;iBACL,KAAK,EAAE;iBACP,QAAQ,EAAE;iBACV,QAAQ,CAAC,mDAAmD,CAAC;SACjE;QACD,gFAAgF;QAChF,8DAA8D;QAC9D,WAAW,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,eAAe,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE;QAChF,GAAG,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,CAC/B,IAAI,CAAC,mBAAmB,CAAC,IAAkC,EAAE,WAAW,CAAC;KAC5E;CACF,CAAC"}
|
|
@@ -2,8 +2,8 @@ import type { ToolDef } from '../tool-def.js';
|
|
|
2
2
|
/**
|
|
3
3
|
* Social inbox — a COMMENTS inbox (comments on the workspace's own posts;
|
|
4
4
|
* never described as DMs/messages). Coverage: TikTok, Instagram, Facebook
|
|
5
|
-
* Pages, Threads
|
|
6
|
-
*
|
|
5
|
+
* Pages, Threads — per account, `inboxCapable` from list_accounts is the
|
|
6
|
+
* authority on what is live today. Reply capability is server-computed per
|
|
7
7
|
* conversation (canReply / maxReplyLength / windowState / disabledReason) —
|
|
8
8
|
* descriptions steer models to render from those fields, never platform rules.
|
|
9
9
|
* Every def carries portMethod so bindings whose adapter predates this wave
|
package/dist/core/tools/inbox.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { INBOX_CONVERSATION_STATUSES, INBOX_ITEM_STATE_ACTIONS, PLATFORMS,
|
|
2
|
+
import { INBOX_CONVERSATION_STATUSES, INBOX_ITEM_STATE_ACTIONS, PLATFORMS, } from '../shared.js';
|
|
3
3
|
/**
|
|
4
4
|
* Social inbox — a COMMENTS inbox (comments on the workspace's own posts;
|
|
5
5
|
* never described as DMs/messages). Coverage: TikTok, Instagram, Facebook
|
|
6
|
-
* Pages, Threads
|
|
7
|
-
*
|
|
6
|
+
* Pages, Threads — per account, `inboxCapable` from list_accounts is the
|
|
7
|
+
* authority on what is live today. Reply capability is server-computed per
|
|
8
8
|
* conversation (canReply / maxReplyLength / windowState / disabledReason) —
|
|
9
9
|
* descriptions steer models to render from those fields, never platform rules.
|
|
10
10
|
* Every def carries portMethod so bindings whose adapter predates this wave
|
|
@@ -15,7 +15,7 @@ export const inboxTools = [
|
|
|
15
15
|
name: 'list_inbox_conversations',
|
|
16
16
|
binding: 'both',
|
|
17
17
|
title: 'List Inbox Conversations',
|
|
18
|
-
description: "List comment conversations from the social inbox — comments on your connected accounts' posts, grouped per post, newest activity first. Covers TikTok, Instagram, Facebook Pages,
|
|
18
|
+
description: "List comment conversations from the social inbox — comments on your connected accounts' posts, grouped per post, newest activity first. Covers TikTok, Instagram, Facebook Pages, and Threads; an account's inboxCapable flag (from list_accounts) tells you whether comments can flow for it today. Comments arrive within seconds of being posted and only from connect/launch onward (no history backfill). Each conversation carries a server-computed reply capability — canReply, maxReplyLength, windowState, disabledReason — plus unreadCount, status (OPEN | SNOOZED | CLOSED), and assignedToUserId. ALWAYS derive whether and how long you can reply from those fields; never assume platform rules. postPreview carries the post's caption and, when available, its public permalink — use the permalink to link the user to the post on the platform (null on Instagram for now).",
|
|
19
19
|
inputSchema: {
|
|
20
20
|
page: z.number().int().min(0).default(0).describe('Page number (0-based)'),
|
|
21
21
|
limit: z
|
|
@@ -43,7 +43,6 @@ export const inboxTools = [
|
|
|
43
43
|
.optional()
|
|
44
44
|
.describe('Only conversations assigned to this workspace member'),
|
|
45
45
|
},
|
|
46
|
-
outputSchema: dataListOutputSchema,
|
|
47
46
|
annotations: { readOnlyHint: true, destructiveHint: false, openWorldHint: false },
|
|
48
47
|
portMethod: 'listInboxConversations',
|
|
49
48
|
run: (port, args, workspaceId) => port.listInboxConversations(args, workspaceId),
|
|
@@ -52,7 +51,7 @@ export const inboxTools = [
|
|
|
52
51
|
name: 'get_inbox_conversation',
|
|
53
52
|
binding: 'both',
|
|
54
53
|
title: 'Get Inbox Conversation',
|
|
55
|
-
description: "Fetch one inbox conversation by id, including its server-computed reply capability (canReply, maxReplyLength, windowState, disabledReason) — derive reply ability from these fields, never from hardcoded platform rules. postPreview carries the post's caption and
|
|
54
|
+
description: "Fetch one inbox conversation by id, including its server-computed reply capability (canReply, maxReplyLength, windowState, disabledReason) — derive reply ability from these fields, never from hardcoded platform rules. postPreview carries the post's caption and, when available, its public permalink — use the permalink to link the user to the post on the platform (null on Instagram for now). Returns null when the conversation does not exist in the workspace.",
|
|
56
55
|
inputSchema: {
|
|
57
56
|
id: z.uuid().describe('Conversation id (from list_inbox_conversations)'),
|
|
58
57
|
},
|
|
@@ -76,7 +75,6 @@ export const inboxTools = [
|
|
|
76
75
|
.optional()
|
|
77
76
|
.describe('Sort by comment time. Default ASC (oldest first); DESC for newest first.'),
|
|
78
77
|
},
|
|
79
|
-
outputSchema: dataListOutputSchema,
|
|
80
78
|
annotations: { readOnlyHint: true, destructiveHint: false, openWorldHint: false },
|
|
81
79
|
portMethod: 'listInboxItems',
|
|
82
80
|
run: (port, args, workspaceId) => port.listInboxItems(args, workspaceId),
|
|
@@ -87,7 +85,6 @@ export const inboxTools = [
|
|
|
87
85
|
title: 'Get Inbox Unread Count',
|
|
88
86
|
description: 'Total unread comment count across all inbox conversations in the workspace (the sum of per-conversation unreadCount). Use mark_inbox_conversation_read after presenting a conversation to the user.',
|
|
89
87
|
inputSchema: {},
|
|
90
|
-
outputSchema: { unreadCount: z.number().optional() },
|
|
91
88
|
annotations: { readOnlyHint: true, destructiveHint: false, openWorldHint: false },
|
|
92
89
|
portMethod: 'getInboxUnreadCount',
|
|
93
90
|
run: (port, _args, workspaceId) => port.getInboxUnreadCount(workspaceId),
|
|
@@ -96,12 +93,11 @@ export const inboxTools = [
|
|
|
96
93
|
name: 'reply_to_inbox_item',
|
|
97
94
|
binding: 'both',
|
|
98
95
|
title: 'Reply to Inbox Comment',
|
|
99
|
-
description: "Reply publicly UNDER a specific comment — pass the comment item's id (from list_inbox_items), not the conversation id. BEFORE replying, check the conversation's canReply and maxReplyLength and stay within them; the caps are per platform (TikTok 1,200, Instagram 2,200, Facebook 8,000,
|
|
96
|
+
description: "Reply publicly UNDER a specific comment — pass the comment item's id (from list_inbox_items), not the conversation id. BEFORE replying, check the conversation's canReply and maxReplyLength and stay within them; the caps are per platform (TikTok 1,200, Instagram 2,200, Facebook 8,000, Threads 500 characters) but the server-computed fields are authoritative — never assume. Failures return inbox.* codes (e.g. replyTooLong, replyNotSupported, rateLimited).",
|
|
100
97
|
inputSchema: {
|
|
101
98
|
itemId: z.uuid().describe('The comment item id to reply under (from list_inbox_items)'),
|
|
102
99
|
text: z.string().min(1).describe("Reply text. Must fit the conversation's maxReplyLength."),
|
|
103
100
|
},
|
|
104
|
-
outputSchema: { id: z.string().optional() },
|
|
105
101
|
// destructive: publishes a public comment; Threads exposes no delete verb, so a
|
|
106
102
|
// reply there cannot be removed through our API.
|
|
107
103
|
annotations: { readOnlyHint: false, destructiveHint: true, openWorldHint: true },
|
|
@@ -119,7 +115,6 @@ export const inboxTools = [
|
|
|
119
115
|
.describe('The Instagram comment item id to reply privately to (canPrivateReply must be true)'),
|
|
120
116
|
text: z.string().min(1).describe('Private reply text (max 1,000 bytes)'),
|
|
121
117
|
},
|
|
122
|
-
outputSchema: { id: z.string().optional() },
|
|
123
118
|
// destructive: sends a real direct message with no unsend path, and the
|
|
124
119
|
// once-per-comment guard means the attempt cannot be repeated.
|
|
125
120
|
annotations: { readOnlyHint: false, destructiveHint: true, openWorldHint: true },
|
|
@@ -130,14 +125,13 @@ export const inboxTools = [
|
|
|
130
125
|
name: 'set_inbox_item_state',
|
|
131
126
|
binding: 'both',
|
|
132
127
|
title: 'Moderate Inbox Comment',
|
|
133
|
-
description: 'Moderate a comment on the platform: HIDE hides it from the public, UNHIDE restores it, DELETE removes the comment on the platform — cannot be undone. HIDE/UNHIDE work on TikTok, Instagram, Facebook, and Threads
|
|
128
|
+
description: 'Moderate a comment on the platform: HIDE hides it from the public, UNHIDE restores it, DELETE removes the comment on the platform — cannot be undone. HIDE/UNHIDE work on TikTok, Instagram, Facebook, and Threads; DELETE is not supported on Threads (inbox.deleteNotSupported). State changes made on the platform itself sync back to the inbox automatically.',
|
|
134
129
|
inputSchema: {
|
|
135
130
|
itemId: z.uuid().describe('The comment item id (from list_inbox_items)'),
|
|
136
131
|
action: z
|
|
137
132
|
.enum(INBOX_ITEM_STATE_ACTIONS)
|
|
138
133
|
.describe('HIDE, UNHIDE, or DELETE (DELETE is irreversible)'),
|
|
139
134
|
},
|
|
140
|
-
outputSchema: { id: z.string().optional() },
|
|
141
135
|
annotations: { readOnlyHint: false, destructiveHint: true, openWorldHint: true },
|
|
142
136
|
portMethod: 'setInboxItemState',
|
|
143
137
|
run: (port, args, workspaceId) => port.setInboxItemState(args, workspaceId),
|
|
@@ -152,7 +146,6 @@ export const inboxTools = [
|
|
|
152
146
|
.uuid()
|
|
153
147
|
.describe('Conversation id (from list_inbox_conversations)'),
|
|
154
148
|
},
|
|
155
|
-
outputSchema: { id: z.string().optional() },
|
|
156
149
|
annotations: { readOnlyHint: false, destructiveHint: false, openWorldHint: false },
|
|
157
150
|
portMethod: 'markInboxConversationRead',
|
|
158
151
|
run: (port, args, workspaceId) => port.markInboxConversationRead(args.conversationId, workspaceId),
|
|
@@ -168,7 +161,6 @@ export const inboxTools = [
|
|
|
168
161
|
.describe('Conversation id (from list_inbox_conversations)'),
|
|
169
162
|
status: z.enum(INBOX_CONVERSATION_STATUSES).describe('New conversation status'),
|
|
170
163
|
},
|
|
171
|
-
outputSchema: { id: z.string().optional() },
|
|
172
164
|
annotations: { readOnlyHint: false, destructiveHint: false, openWorldHint: false },
|
|
173
165
|
portMethod: 'setInboxConversationStatus',
|
|
174
166
|
run: (port, args, workspaceId) => port.setInboxConversationStatus(args, workspaceId),
|
|
@@ -187,7 +179,6 @@ export const inboxTools = [
|
|
|
187
179
|
.optional()
|
|
188
180
|
.describe('Workspace member user id to assign. Omit to unassign.'),
|
|
189
181
|
},
|
|
190
|
-
outputSchema: { id: z.string().optional() },
|
|
191
182
|
annotations: { readOnlyHint: false, destructiveHint: false, openWorldHint: false },
|
|
192
183
|
portMethod: 'assignInboxConversation',
|
|
193
184
|
run: (port, args, workspaceId) => port.assignInboxConversation(args, workspaceId),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inbox.js","sourceRoot":"","sources":["../../../src/core/tools/inbox.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,OAAO,EACL,2BAA2B,EAC3B,wBAAwB,EACxB,SAAS,
|
|
1
|
+
{"version":3,"file":"inbox.js","sourceRoot":"","sources":["../../../src/core/tools/inbox.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,OAAO,EACL,2BAA2B,EAC3B,wBAAwB,EACxB,SAAS,GACV,MAAM,cAAc,CAAC;AAGtB;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,UAAU,GAAc;IACnC;QACE,IAAI,EAAE,0BAA0B;QAChC,OAAO,EAAE,MAAM;QACf,KAAK,EAAE,0BAA0B;QACjC,WAAW,EACT,i2BAAi2B;QACn2B,WAAW,EAAE;YACX,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,uBAAuB,CAAC;YAC1E,KAAK,EAAE,CAAC;iBACL,MAAM,EAAE;iBACR,GAAG,EAAE;iBACL,GAAG,CAAC,CAAC,CAAC;iBACN,GAAG,CAAC,EAAE,CAAC;iBACP,OAAO,CAAC,EAAE,CAAC;iBACX,QAAQ,CAAC,iCAAiC,CAAC;YAC9C,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC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E;YACX,cAAc,EAAE,CAAC;iBACd,IAAI,EAAE;iBACN,QAAQ,CAAC,iDAAiD,CAAC;YAC9D,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC,QAAQ,CAAC,yBAAyB,CAAC;SAChF;QACD,WAAW,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE;QAClF,UAAU,EAAE,4BAA4B;QACxC,GAAG,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,CAC/B,IAAI,CAAC,0BAA2B,CAC9B,IAAiD,EACjD,WAAW,CACZ;KACJ;IACD;QACE,IAAI,EAAE,2BAA2B;QACjC,OAAO,EAAE,MAAM;QACf,KAAK,EAAE,2BAA2B;QAClC,WAAW,EACT,4OAA4O;QAC9O,WAAW,EAAE;YACX,cAAc,EAAE,CAAC;iBACd,IAAI,EAAE;iBACN,QAAQ,CAAC,iDAAiD,CAAC;YAC9D,cAAc,EAAE,CAAC;iBACd,IAAI,EAAE;iBACN,QAAQ,EAAE;iBACV,QAAQ,CAAC,uDAAuD,CAAC;SACrE;QACD,WAAW,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE;QAClF,UAAU,EAAE,yBAAyB;QACrC,GAAG,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,CAC/B,IAAI,CAAC,uBAAwB,CAC3B,IAA8C,EAC9C,WAAW,CACZ;KACJ;CACF,CAAC"}
|
package/dist/core/tools/posts.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { CREATE_APPROVAL_STATUSES, CREATE_STATUSES, PLATFORMS, POST_STATUSES, SET_APPROVAL_STATUSES,
|
|
2
|
+
import { CREATE_APPROVAL_STATUSES, CREATE_STATUSES, PLATFORMS, POST_STATUSES, SET_APPROVAL_STATUSES, jsonParse, } from '../shared.js';
|
|
3
3
|
/** The upload tools available on each binding, for prose that names them. */
|
|
4
4
|
const UPLOAD_TOOLS = {
|
|
5
5
|
stdio: 'upload_media / get_upload_urls',
|
|
@@ -25,7 +25,7 @@ const postItemSchema = (binding) => z.object({
|
|
|
25
25
|
firstComment: z
|
|
26
26
|
.string()
|
|
27
27
|
.optional()
|
|
28
|
-
.describe('First comment posted automatically after publishing. Supported on X, Instagram, Facebook, YouTube, Threads, and TikTok (TikTok: max
|
|
28
|
+
.describe('First comment posted automatically after publishing. Supported on X, Instagram, Facebook, YouTube, Threads, and TikTok (TikTok: max 1,200 chars and requires a TikTok Business API connection).'),
|
|
29
29
|
mediaItems: z
|
|
30
30
|
.array(mediaItemSchema(binding))
|
|
31
31
|
.optional()
|
|
@@ -197,11 +197,6 @@ export const postTools = [
|
|
|
197
197
|
.optional()
|
|
198
198
|
.describe('End date filter (ISO 8601, e.g. 2026-01-31T23:59:59.999Z)'),
|
|
199
199
|
},
|
|
200
|
-
outputSchema: {
|
|
201
|
-
data: z.array(z.unknown()).optional(),
|
|
202
|
-
totalCount: z.unknown().optional(),
|
|
203
|
-
pageInfo: z.unknown().optional(),
|
|
204
|
-
},
|
|
205
200
|
annotations: { readOnlyHint: true, destructiveHint: false, openWorldHint: false },
|
|
206
201
|
run: (port, args, workspaceId) => port.listPosts(args, workspaceId),
|
|
207
202
|
},
|
|
@@ -229,7 +224,6 @@ export const postTools = [
|
|
|
229
224
|
.optional()
|
|
230
225
|
.describe('Platform-specific controls (shared across all posts in the batch)')),
|
|
231
226
|
}),
|
|
232
|
-
outputSchema: { postIds: z.array(z.string()).optional() },
|
|
233
227
|
// destructive: a SCHEDULED+APPROVED post (both defaults) publishes publicly and
|
|
234
228
|
// cannot be retracted through our API — delete_post removes our row, not the
|
|
235
229
|
// platform post.
|
|
@@ -245,7 +239,6 @@ export const postTools = [
|
|
|
245
239
|
postIds: z.array(z.uuid()).min(1).describe('Post ids to update'),
|
|
246
240
|
approvalStatus: z.enum(SET_APPROVAL_STATUSES).describe('New approval status'),
|
|
247
241
|
},
|
|
248
|
-
outputSchema: { success: z.boolean().optional() },
|
|
249
242
|
// destructive: APPROVED is the last gate before the scheduler publishes, and a
|
|
250
243
|
// published post cannot be un-published through our API.
|
|
251
244
|
annotations: { readOnlyHint: false, destructiveHint: true, openWorldHint: true },
|
|
@@ -259,7 +252,6 @@ export const postTools = [
|
|
|
259
252
|
inputSchema: {
|
|
260
253
|
id: z.uuid().describe('Post id to delete'),
|
|
261
254
|
},
|
|
262
|
-
outputSchema: { deleted: z.boolean().optional() },
|
|
263
255
|
// openWorld false: deletes the PostFast record only — no platform call is made.
|
|
264
256
|
annotations: {
|
|
265
257
|
readOnlyHint: false,
|
|
@@ -287,7 +279,6 @@ export const postTools = [
|
|
|
287
279
|
.optional()
|
|
288
280
|
.describe('Filter by specific social media account ids'),
|
|
289
281
|
},
|
|
290
|
-
outputSchema: dataListOutputSchema,
|
|
291
282
|
// openWorld false: reads metrics already synced into our database; no live
|
|
292
283
|
// platform call at request time.
|
|
293
284
|
annotations: { readOnlyHint: true, destructiveHint: false, openWorldHint: false },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"posts.js","sourceRoot":"","sources":["../../../src/core/tools/posts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,OAAO,EACL,wBAAwB,EACxB,eAAe,EACf,SAAS,EACT,aAAa,EACb,qBAAqB,EACrB,
|
|
1
|
+
{"version":3,"file":"posts.js","sourceRoot":"","sources":["../../../src/core/tools/posts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,OAAO,EACL,wBAAwB,EACxB,eAAe,EACf,SAAS,EACT,aAAa,EACb,qBAAqB,EACrB,SAAS,GACV,MAAM,cAAc,CAAC;AAGtB,6EAA6E;AAC7E,MAAM,YAAY,GAA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E,OAAO,EAAE,CAAC;iBACP,MAAM,EAAE;iBACR,QAAQ,CAAC,6DAA6D,CAAC;YAC1E,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,qBAAqB,CAAC;YAChF,cAAc,EAAE,CAAC;iBACd,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;iBACf,QAAQ,EAAE;iBACV,QAAQ,CAAC,6CAA6C,CAAC;SAC3D;QACD,2EAA2E;QAC3E,iCAAiC;QACjC,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,eAAe,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE;QACjF,GAAG,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,CAC/B,IAAI,CAAC,gBAAgB,CAAC,IAAgC,EAAE,WAAW,CAAC;KACvE;CACF,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { dataListOutputSchema } from '../shared.js';
|
|
3
2
|
export const tiktokTools = [
|
|
4
3
|
{
|
|
5
4
|
name: 'list_tiktok_sounds',
|
|
@@ -22,7 +21,6 @@ export const tiktokTools = [
|
|
|
22
21
|
.optional()
|
|
23
22
|
.describe('Trending window (default 7DAY)'),
|
|
24
23
|
},
|
|
25
|
-
outputSchema: dataListOutputSchema,
|
|
26
24
|
annotations: { readOnlyHint: true, destructiveHint: false, openWorldHint: true },
|
|
27
25
|
portMethod: 'listTikTokSounds',
|
|
28
26
|
run: (port, args, workspaceId) => port.listTikTokSounds(args, workspaceId),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tiktok.js","sourceRoot":"","sources":["../../../src/core/tools/tiktok.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"tiktok.js","sourceRoot":"","sources":["../../../src/core/tools/tiktok.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,MAAM,CAAC,MAAM,WAAW,GAAc;IACpC;QACE,IAAI,EAAE,oBAAoB;QAC1B,OAAO,EAAE,MAAM;QACf,KAAK,EAAE,oBAAoB;QAC3B,WAAW,EACT,0pBAA0pB;QAC5pB,WAAW,EAAE;YACX,aAAa,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,wCAAwC,CAAC;YAC1E,KAAK,EAAE,CAAC;iBACL,MAAM,EAAE;iBACR,QAAQ,EAAE;iBACV,QAAQ,CACP,yJAAyJ,CAC1J;YACH,WAAW,EAAE,CAAC;iBACX,MAAM,EAAE;iBACR,MAAM,CAAC,CAAC,CAAC;iBACT,QAAQ,EAAE;iBACV,QAAQ,CAAC,mFAAmF,CAAC;YAChG,SAAS,EAAE,CAAC;iBACT,IAAI,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;iBACxC,QAAQ,EAAE;iBACV,QAAQ,CAAC,gCAAgC,CAAC;SAC9C;QACD,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,eAAe,EAAE,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE;QAChF,UAAU,EAAE,kBAAkB;QAC9B,GAAG,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,CAC/B,IAAI,CAAC,gBAAiB,CAAC,IAAuC,EAAE,WAAW,CAAC;KAC/E;CACF,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { IMAGE_MIME_TYPES, VIDEO_MIME_TYPES
|
|
2
|
+
import { IMAGE_MIME_TYPES, VIDEO_MIME_TYPES } from '../shared.js';
|
|
3
3
|
const SUPPORTED_MIME_TYPES = [...IMAGE_MIME_TYPES, ...VIDEO_MIME_TYPES].join(', ');
|
|
4
4
|
/**
|
|
5
5
|
* `upload_media` exists on BOTH bindings but is a different tool on each:
|
|
@@ -25,7 +25,6 @@ export const uploadTools = [
|
|
|
25
25
|
.default(1)
|
|
26
26
|
.describe('Number of upload URLs (1-8 for images, 1 for videos)'),
|
|
27
27
|
},
|
|
28
|
-
outputSchema: dataListOutputSchema,
|
|
29
28
|
annotations: { readOnlyHint: false, destructiveHint: false, openWorldHint: true },
|
|
30
29
|
run: (port, args, workspaceId) => port.getUploadUrls(args, workspaceId),
|
|
31
30
|
},
|
|
@@ -39,11 +38,6 @@ export const uploadTools = [
|
|
|
39
38
|
.string()
|
|
40
39
|
.describe('Absolute path to the local file (e.g. /Users/me/photo.jpg)'),
|
|
41
40
|
},
|
|
42
|
-
outputSchema: {
|
|
43
|
-
key: z.string().optional(),
|
|
44
|
-
type: z.string().optional(),
|
|
45
|
-
contentType: z.string().optional(),
|
|
46
|
-
},
|
|
47
41
|
annotations: { readOnlyHint: false, destructiveHint: false, openWorldHint: true },
|
|
48
42
|
run: (port, args) => port.uploadLocalFile(args.filePath),
|
|
49
43
|
},
|
|
@@ -59,10 +53,6 @@ export const uploadTools = [
|
|
|
59
53
|
.optional()
|
|
60
54
|
.describe("MIME type override. If omitted, the source's Content-Type is used."),
|
|
61
55
|
},
|
|
62
|
-
outputSchema: {
|
|
63
|
-
media_id: z.string().optional(),
|
|
64
|
-
type: z.string().optional(),
|
|
65
|
-
},
|
|
66
56
|
annotations: { readOnlyHint: false, destructiveHint: false, openWorldHint: true },
|
|
67
57
|
run: (port, args, workspaceId) => port.uploadFromUrl(args, workspaceId),
|
|
68
58
|
},
|
|
@@ -90,10 +80,6 @@ export const uploadTools = [
|
|
|
90
80
|
.optional()
|
|
91
81
|
.describe('MIME type for base64 data (e.g. image/png). Required with data.'),
|
|
92
82
|
},
|
|
93
|
-
outputSchema: {
|
|
94
|
-
media_id: z.string().optional(),
|
|
95
|
-
type: z.string().optional(),
|
|
96
|
-
},
|
|
97
83
|
annotations: { readOnlyHint: false, destructiveHint: false, openWorldHint: true },
|
|
98
84
|
_meta: { 'openai/fileParams': ['file'] },
|
|
99
85
|
run: (port, args, workspaceId) => port.uploadMedia(args, workspaceId),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uploads.js","sourceRoot":"","sources":["../../../src/core/tools/uploads.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,OAAO,
|
|
1
|
+
{"version":3,"file":"uploads.js","sourceRoot":"","sources":["../../../src/core/tools/uploads.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAGlE,MAAM,oBAAoB,GAAG,CAAC,GAAG,gBAAgB,EAAE,GAAG,gBAAgB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEnF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,WAAW,GAAc;IACpC;QACE,IAAI,EAAE,iBAAiB;QACvB,OAAO,EAAE,OAAO;QAChB,KAAK,EAAE,iBAAiB;QACxB,WAAW,EACT,oIAAoI;QACtI,WAAW,EAAE;YACX,WAAW,EAAE,CAAC;iBACX,MAAM,EAAE;iBACR,QAAQ,CAAC,qCAAqC,oBAAoB,EAAE,CAAC;YACxE,KAAK,EAAE,CAAC;iBACL,MAAM,EAAE;iBACR,GAAG,EAAE;iBACL,GAAG,CAAC,CAAC,CAAC;iBACN,GAAG,CAAC,CAAC,CAAC;iBACN,OAAO,CAAC,CAAC,CAAC;iBACV,QAAQ,CAAC,sDAAsD,CAAC;SACpE;QACD,WAAW,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE;QACjF,GAAG,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,C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CAAC;gBACjE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;gBACnB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;gBAChC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;aACjC,CAAC;iBACD,QAAQ,EAAE;iBACV,QAAQ,CAAC,sFAAsF,CAAC;YACnG,IAAI,EAAE,CAAC;iBACJ,MAAM,EAAE;iBACR,QAAQ,EAAE;iBACV,QAAQ,CAAC,kEAAkE,CAAC;YAC/E,WAAW,EAAE,CAAC;iBACX,MAAM,EAAE;iBACR,QAAQ,EAAE;iBACV,QAAQ,CAAC,iEAAiE,CAAC;SAC/E;QACD,WAAW,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE;QACjF,KAAK,EAAE,EAAE,mBAAmB,EAAE,CAAC,MAAM,CAAC,EAAE;QACxC,GAAG,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,CAC/B,IAAI,CAAC,WAAW,CAAC,IAAkC,EAAE,WAAW,CAAC;KACpE;CACF,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { dataListOutputSchema } from '../shared.js';
|
|
2
1
|
export const workspaceTools = [
|
|
3
2
|
{
|
|
4
3
|
name: 'list_workspaces',
|
|
@@ -6,7 +5,6 @@ export const workspaceTools = [
|
|
|
6
5
|
title: 'List Workspaces',
|
|
7
6
|
description: 'List the workspaces this connection can act in. Use a workspace id as the optional workspaceId argument on other tools to operate across multiple workspaces (the default workspace is used when omitted).',
|
|
8
7
|
inputSchema: {},
|
|
9
|
-
outputSchema: dataListOutputSchema,
|
|
10
8
|
annotations: { readOnlyHint: true, destructiveHint: false, openWorldHint: false },
|
|
11
9
|
workspaceScoped: false,
|
|
12
10
|
run: (port) => port.listWorkspaces(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspaces.js","sourceRoot":"","sources":["../../../src/core/tools/workspaces.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"workspaces.js","sourceRoot":"","sources":["../../../src/core/tools/workspaces.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,cAAc,GAAc;IACvC;QACE,IAAI,EAAE,iBAAiB;QACvB,OAAO,EAAE,QAAQ;QACjB,KAAK,EAAE,iBAAiB;QACxB,WAAW,EACT,4MAA4M;QAC9M,WAAW,EAAE,EAAE;QACf,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,eAAe,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE;QACjF,eAAe,EAAE,KAAK;QACtB,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,cAAc,EAAE;KACrC;CACF,CAAC"}
|
package/dist/stdio/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { instructionsFor } from '../core/instructions.js';
|
|
|
6
6
|
import { RestAdapter } from './rest-adapter.js';
|
|
7
7
|
const server = new McpServer({
|
|
8
8
|
name: 'postfast',
|
|
9
|
-
version: '0.5.
|
|
9
|
+
version: '0.5.3',
|
|
10
10
|
}, { instructions: instructionsFor('stdio') });
|
|
11
11
|
const port = new RestAdapter();
|
|
12
12
|
registerCatalogTools(server, { binding: 'stdio', port });
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@ description: Read, reply to, moderate, and triage comments on social posts using
|
|
|
5
5
|
|
|
6
6
|
# Social Inbox (comments) via PostFast
|
|
7
7
|
|
|
8
|
-
You have access to PostFast MCP inbox tools — a **comments** inbox for the workspace's own posts. It is never a DM/messages inbox. Covered platforms: TikTok, Instagram, Facebook Pages, Threads
|
|
8
|
+
You have access to PostFast MCP inbox tools — a **comments** inbox for the workspace's own posts. It is never a DM/messages inbox. Covered platforms: TikTok, Instagram, Facebook Pages, Threads — an account's `inboxCapable` flag (from `list_accounts`) is the authority on what is live today. Not covered: X, YouTube, Pinterest, Bluesky, Telegram, Google Business Profile, LinkedIn. Comments appear from connect/launch onward — there is no history backfill.
|
|
9
9
|
|
|
10
10
|
## The one rule that overrides everything
|
|
11
11
|
|
|
@@ -20,7 +20,7 @@ Reply capability is **server-computed per conversation**: `canReply`, `maxReplyL
|
|
|
20
20
|
|
|
21
21
|
## Replying
|
|
22
22
|
|
|
23
|
-
- **Public reply** — `reply_to_inbox_item` with the **comment item's id** (not the conversation id). Respect `maxReplyLength` (platform caps as context: TikTok 1,200, Instagram 2,200, Facebook 8,000,
|
|
23
|
+
- **Public reply** — `reply_to_inbox_item` with the **comment item's id** (not the conversation id). Respect `maxReplyLength` (platform caps as context: TikTok 1,200, Instagram 2,200, Facebook 8,000, Threads 500 — the fields are authoritative). Confirm the reply text with the user before sending; it posts publicly.
|
|
24
24
|
- **Instagram private reply** — `send_inbox_private_reply`, only where the item's `canPrivateReply` is true: exactly one per comment, within 7 days of the comment, up to 1,000 bytes (emoji count multi-byte), and it may land in the recipient's Message Requests. A second attempt fails with `inbox.privateReplyAlreadySent`.
|
|
25
25
|
- Replies sent through PostFast appear once in the thread — no duplicates when the platform confirms them.
|
|
26
26
|
|
|
@@ -28,7 +28,7 @@ If any PostFast tool call fails with an authentication/401 error, tell the user:
|
|
|
28
28
|
- `scheduledAt`: ISO 8601 datetime (required unless status is DRAFT)
|
|
29
29
|
- `mediaItems`: array of `{key, type, sortOrder}` from uploaded media
|
|
30
30
|
- `status`: SCHEDULED (default) or DRAFT
|
|
31
|
-
- `firstComment`: optional first comment text, posted automatically after publishing (supported on X, Instagram, Facebook, YouTube, Threads, and TikTok — TikTok: max
|
|
31
|
+
- `firstComment`: optional first comment text, posted automatically after publishing (supported on X, Instagram, Facebook, YouTube, Threads, and TikTok — TikTok: max 1,200 chars, requires a Business API connection)
|
|
32
32
|
- `controls`: platform-specific settings (see below)
|
|
33
33
|
- You can batch up to 15 posts in a single call — great for content calendars
|
|
34
34
|
- Don't schedule to a `DISABLED` account — the API rejects it with HTTP 400 `socialMediaDisconnected`. Saving as DRAFT is still allowed. Check `connectionStatus` from step 1 first.
|