@atray/mcp 1.0.2 → 1.0.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/README.md +2 -0
- package/package.json +1 -1
- package/src/index.js +11 -1
- package/src/tools.js +27 -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.3' },
|
|
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
|
@@ -237,4 +237,31 @@ export const tools = [
|
|
|
237
237
|
},
|
|
238
238
|
},
|
|
239
239
|
},
|
|
240
|
+
|
|
241
|
+
// ─── SOCIAL CONNECTIONS (read-only) ─────────────────────────────────────────
|
|
242
|
+
|
|
243
|
+
{
|
|
244
|
+
name: 'listSocialConnections',
|
|
245
|
+
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.",
|
|
246
|
+
inputSchema: {
|
|
247
|
+
type: 'object',
|
|
248
|
+
properties: {},
|
|
249
|
+
},
|
|
250
|
+
},
|
|
251
|
+
|
|
252
|
+
// ─── PUBLISH / SCHEDULE ─────────────────────────────────────────────────────
|
|
253
|
+
|
|
254
|
+
{
|
|
255
|
+
name: 'schedulePost',
|
|
256
|
+
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.',
|
|
257
|
+
inputSchema: {
|
|
258
|
+
type: 'object',
|
|
259
|
+
required: ['id'],
|
|
260
|
+
properties: {
|
|
261
|
+
id: { type: 'string', description: 'Post UUID' },
|
|
262
|
+
scheduled_at: { type: 'string', description: 'Publish datetime (ISO-8601). Omit to publish as soon as possible.' },
|
|
263
|
+
social_connection_id: { type: 'string', description: 'Target account UUID (from listSocialConnections). Required for standalone posts.' },
|
|
264
|
+
},
|
|
265
|
+
},
|
|
266
|
+
},
|
|
240
267
|
];
|