@omnisocials/mcp-server 1.0.2 → 1.0.4
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/build/tools/accounts.js +1 -1
- package/build/tools/media.js +1 -1
- package/build/tools/posts.js +37 -3
- package/package.json +3 -2
package/build/tools/accounts.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export function registerAccountTools(server, client) {
|
|
3
|
-
server.tool("list_accounts", "List all connected social media accounts in the workspace.", {}, async () => {
|
|
3
|
+
server.tool("list_accounts", "List all connected social media accounts in the workspace. Each account includes its platform, display name, channel ID (used for create_post), and supported content_types (post, story, reel). Call this to help users pick which platforms to post to.", {}, async () => {
|
|
4
4
|
const result = await client.listAccounts();
|
|
5
5
|
return {
|
|
6
6
|
content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
|
package/build/tools/media.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export function registerMediaTools(server, client) {
|
|
3
|
-
server.tool("list_media", "List all media files in the workspace.", {
|
|
3
|
+
server.tool("list_media", "List all media files in the workspace. Returns each file's ID, URL, type (image/video), and size. Use this to help users pick media for posts, stories, or reels. Media IDs or URLs from this list can be passed to create_post.", {
|
|
4
4
|
limit: z.string().optional().describe("Max results to return"),
|
|
5
5
|
offset: z.string().optional().describe("Offset for pagination"),
|
|
6
6
|
}, async (params) => {
|
package/build/tools/posts.js
CHANGED
|
@@ -18,7 +18,26 @@ export function registerPostTools(server, client) {
|
|
|
18
18
|
content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
|
|
19
19
|
};
|
|
20
20
|
});
|
|
21
|
-
server.tool("create_post",
|
|
21
|
+
server.tool("create_post", `Create a new social media post, story, or reel.
|
|
22
|
+
|
|
23
|
+
IMPORTANT — Before calling this tool, make sure you have all required information from the user. If anything is missing, ASK the user before calling:
|
|
24
|
+
|
|
25
|
+
1. **Content/caption**: What text should the post have?
|
|
26
|
+
2. **Channels**: Which platforms to post to? Use list_accounts to show available options if needed.
|
|
27
|
+
3. **Schedule**: When should it be published? (Or save as draft?)
|
|
28
|
+
4. **Media** (REQUIRED for some types):
|
|
29
|
+
- Stories: ALWAYS require an image or video. Ask the user which image/video to use. Use list_media to show their uploaded media, or ask for an external URL.
|
|
30
|
+
- Reels: ALWAYS require a video. Ask the user which video to use. Use list_media to find available videos.
|
|
31
|
+
- Instagram posts: ALWAYS require at least one image or video.
|
|
32
|
+
- TikTok posts: ALWAYS require at least one image or video.
|
|
33
|
+
- Pinterest posts: ALWAYS require an image AND a board_id.
|
|
34
|
+
- Other platforms (LinkedIn, X, Bluesky, etc.): Media is optional.
|
|
35
|
+
5. **Platform-specific options** (ask only when relevant):
|
|
36
|
+
- Pinterest: Which board? Any link to attach?
|
|
37
|
+
- YouTube: Title, privacy status, tags?
|
|
38
|
+
- TikTok: Privacy level?
|
|
39
|
+
|
|
40
|
+
Do NOT call this tool without media when creating stories, reels, Instagram posts, TikTok posts, or Pinterest posts — it will fail.`, {
|
|
22
41
|
content: z.string().describe("The post content/caption text"),
|
|
23
42
|
channels: z.array(z.string()).optional().describe("Array of channel IDs to post to"),
|
|
24
43
|
scheduled_at: z.string().optional().describe("ISO 8601 date for scheduled publishing"),
|
|
@@ -68,7 +87,20 @@ export function registerPostTools(server, client) {
|
|
|
68
87
|
content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
|
|
69
88
|
};
|
|
70
89
|
});
|
|
71
|
-
server.tool("create_and_publish_post",
|
|
90
|
+
server.tool("create_and_publish_post", `Create a new post and publish it immediately (no scheduling).
|
|
91
|
+
|
|
92
|
+
IMPORTANT — Before calling this tool, make sure you have all required information. If anything is missing, ASK the user first:
|
|
93
|
+
|
|
94
|
+
1. **Content/caption**: What text?
|
|
95
|
+
2. **Channels**: Which platforms? Use list_accounts if needed.
|
|
96
|
+
3. **Media** (REQUIRED for some types — same rules as create_post):
|
|
97
|
+
- Stories: ALWAYS need an image or video.
|
|
98
|
+
- Reels: ALWAYS need a video.
|
|
99
|
+
- Instagram/TikTok posts: ALWAYS need at least one image or video.
|
|
100
|
+
- Pinterest: ALWAYS need an image + board_id.
|
|
101
|
+
- Ask the user which media to use. Use list_media to show options.
|
|
102
|
+
|
|
103
|
+
Do NOT call without required media — it will fail.`, {
|
|
72
104
|
content: z.string().describe("The post content/caption text"),
|
|
73
105
|
channels: z.array(z.string()).optional().describe("Array of channel IDs to post to"),
|
|
74
106
|
media_ids: z.union([
|
|
@@ -126,7 +158,9 @@ export function registerPostTools(server, client) {
|
|
|
126
158
|
content: [{ type: "text", text: result.error ? JSON.stringify(result.error) : "Post deleted successfully." }],
|
|
127
159
|
};
|
|
128
160
|
});
|
|
129
|
-
server.tool("publish_post",
|
|
161
|
+
server.tool("publish_post", `Publish a draft or scheduled post immediately. The post will be queued for publishing.
|
|
162
|
+
|
|
163
|
+
IMPORTANT: Before publishing, verify the post has all required media. If publishing a story or reel, ensure media was attached when the post was created/updated. If it's missing, use update_post to add media first, or inform the user.`, {
|
|
130
164
|
id: z.string().describe("The post ID to publish"),
|
|
131
165
|
}, async ({ id }) => {
|
|
132
166
|
const result = await client.publishPost(id);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@omnisocials/mcp-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "MCP server for OmniSocials API - manage social media posts, media, accounts, analytics, and webhooks",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "build/index.js",
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
"omnisocials-mcp": "build/index.js"
|
|
9
9
|
},
|
|
10
10
|
"files": [
|
|
11
|
-
"build/"
|
|
11
|
+
"build/",
|
|
12
|
+
"README.md"
|
|
12
13
|
],
|
|
13
14
|
"scripts": {
|
|
14
15
|
"build": "tsc",
|