@atray/mcp 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/README.md +2 -0
- package/package.json +1 -1
- package/src/index.js +11 -1
- package/src/tools.js +29 -0
package/README.md
CHANGED
|
@@ -59,6 +59,8 @@ Restart the client and the ATRAY tools become available.
|
|
|
59
59
|
| `listPosts` / `createPost` / `getPost` / `updatePost` | Manage posts (text and carousel). |
|
|
60
60
|
| `regeneratePostText` / `regeneratePostImage` | Regenerate caption or image with AI. |
|
|
61
61
|
| `uploadPostVideo` | Upload a video (mp4/mov/webm, up to 120 MB) as the post media; published to Instagram as a Reel. |
|
|
62
|
+
| `listSocialConnections` | List your connected social accounts (read-only) to pick a publish target. |
|
|
63
|
+
| `schedulePost` | Schedule/publish a post (omit `scheduled_at` to publish as soon as possible). |
|
|
62
64
|
|
|
63
65
|
Each AI-generated post consumes 1 content credit from your plan. Creating a campaign
|
|
64
66
|
requires a completed brand profile.
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -10,7 +10,7 @@ import { tools } from './tools.js';
|
|
|
10
10
|
import { api } from './api.js';
|
|
11
11
|
|
|
12
12
|
const server = new Server(
|
|
13
|
-
{ name: 'atray-mcp', version: '1.0.
|
|
13
|
+
{ name: 'atray-mcp', version: '1.0.4' },
|
|
14
14
|
{ capabilities: { tools: {} } }
|
|
15
15
|
);
|
|
16
16
|
|
|
@@ -83,6 +83,16 @@ async function callTool(name, a) {
|
|
|
83
83
|
case 'uploadPostVideo':
|
|
84
84
|
return uploadPostVideo(a);
|
|
85
85
|
|
|
86
|
+
// ─── SOCIAL CONNECTIONS (read-only) ───────────────────────────────────────
|
|
87
|
+
case 'listSocialConnections':
|
|
88
|
+
return api.get('/social-connections');
|
|
89
|
+
|
|
90
|
+
// ─── PUBLISH / SCHEDULE ───────────────────────────────────────────────────
|
|
91
|
+
case 'schedulePost': {
|
|
92
|
+
const { id, ...body } = a;
|
|
93
|
+
return api.post(`/posts/${id}/schedule`, body);
|
|
94
|
+
}
|
|
95
|
+
|
|
86
96
|
default:
|
|
87
97
|
throw new Error(`Unknown tool: ${name}`);
|
|
88
98
|
}
|
package/src/tools.js
CHANGED
|
@@ -152,6 +152,7 @@ export const tools = [
|
|
|
152
152
|
properties: {
|
|
153
153
|
campaign_id: { type: 'string', description: 'Campaign UUID to link to (optional)' },
|
|
154
154
|
type: { type: 'string', enum: ['text', 'carousel'], description: 'Post type (default: text)' },
|
|
155
|
+
placement: { type: 'string', enum: ['feed', 'story'], description: 'Publish destination (default: feed). "story" publishes as an Instagram Story (single media only; not for carousel).' },
|
|
155
156
|
caption_text: { type: 'string', description: 'Post caption text' },
|
|
156
157
|
cta: { type: 'string', description: 'Call-to-action text (e.g. "Link in bio")' },
|
|
157
158
|
hashtags: { type: 'array', items: { type: 'string' }, description: 'Hashtags (without #)' },
|
|
@@ -190,6 +191,7 @@ export const tools = [
|
|
|
190
191
|
image_description: { type: 'string', description: 'Image description for single-image posts' },
|
|
191
192
|
image_descriptions: { type: 'array', items: { type: 'string' }, description: 'Image descriptions per slide for carousel posts (3-6 items)' },
|
|
192
193
|
context: { type: 'string', description: 'Context/brief for AI text generation' },
|
|
194
|
+
placement: { type: 'string', enum: ['feed', 'story'], description: 'Publish destination: feed or story (Instagram Story). Carousel posts are always feed.' },
|
|
193
195
|
status: { type: 'string', enum: ['draft', 'scheduled', 'published'] },
|
|
194
196
|
scheduled_at: { type: 'string', description: 'Publish datetime (ISO-8601, must be in the future)' },
|
|
195
197
|
image_text_enabled: { type: 'boolean' },
|
|
@@ -237,4 +239,31 @@ export const tools = [
|
|
|
237
239
|
},
|
|
238
240
|
},
|
|
239
241
|
},
|
|
242
|
+
|
|
243
|
+
// ─── SOCIAL CONNECTIONS (read-only) ─────────────────────────────────────────
|
|
244
|
+
|
|
245
|
+
{
|
|
246
|
+
name: 'listSocialConnections',
|
|
247
|
+
description: "Lists the user's connected social accounts (Instagram, etc.) with id, platform, username and status. Use the connection id as social_connection_id when scheduling a standalone post. Read-only: connecting and managing accounts is done in the Studio.",
|
|
248
|
+
inputSchema: {
|
|
249
|
+
type: 'object',
|
|
250
|
+
properties: {},
|
|
251
|
+
},
|
|
252
|
+
},
|
|
253
|
+
|
|
254
|
+
// ─── PUBLISH / SCHEDULE ─────────────────────────────────────────────────────
|
|
255
|
+
|
|
256
|
+
{
|
|
257
|
+
name: 'schedulePost',
|
|
258
|
+
description: 'Schedules a post for publishing: marks it as scheduled and creates the delivery job (the worker publishes at scheduled_at). Omit scheduled_at to publish as soon as possible. For standalone posts (no campaign) you MUST pass social_connection_id (get it from listSocialConnections). Campaign posts publish to the campaign accounts.',
|
|
259
|
+
inputSchema: {
|
|
260
|
+
type: 'object',
|
|
261
|
+
required: ['id'],
|
|
262
|
+
properties: {
|
|
263
|
+
id: { type: 'string', description: 'Post UUID' },
|
|
264
|
+
scheduled_at: { type: 'string', description: 'Publish datetime (ISO-8601). Omit to publish as soon as possible.' },
|
|
265
|
+
social_connection_id: { type: 'string', description: 'Target account UUID (from listSocialConnections). Required for standalone posts.' },
|
|
266
|
+
},
|
|
267
|
+
},
|
|
268
|
+
},
|
|
240
269
|
];
|