@anaella/mcp 0.4.1 → 0.5.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.
|
@@ -19,7 +19,9 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
|
19
19
|
|
|
20
20
|
// src/tools.ts
|
|
21
21
|
import { z } from "zod";
|
|
22
|
-
import {
|
|
22
|
+
import {
|
|
23
|
+
AnaellaApiError
|
|
24
|
+
} from "@anaella/client";
|
|
23
25
|
var ok = (data) => ({
|
|
24
26
|
content: [{ type: "text", text: JSON.stringify(data, null, 2) }]
|
|
25
27
|
});
|
|
@@ -77,7 +79,7 @@ function buildTools(client) {
|
|
|
77
79
|
{
|
|
78
80
|
name: "create_post",
|
|
79
81
|
config: {
|
|
80
|
-
description: 'Create and (optionally) publish a post to one or more channels. Get channel ids from list_channels first. `when`: "now" publishes immediately, "draft" (default) saves without publishing, or an ISO-8601 timestamp schedules it. `media` are PUBLIC file URLs the API downloads. Publishing is asynchronous \u2014 poll get_post for the final per-channel status.',
|
|
82
|
+
description: 'Create and (optionally) publish a post to one or more channels. Get channel ids from list_channels first. To change a draft or scheduled post later, use update_post. `when`: "now" publishes immediately, "draft" (default) saves without publishing, or an ISO-8601 timestamp schedules it. `media` are PUBLIC file URLs the API downloads. Publishing is asynchronous \u2014 poll get_post for the final per-channel status.',
|
|
81
83
|
inputSchema: {
|
|
82
84
|
channels: z.array(z.string()).min(1).describe("Channel ids from list_channels"),
|
|
83
85
|
text: z.string().optional().describe("Post text / caption"),
|
|
@@ -96,6 +98,28 @@ function buildTools(client) {
|
|
|
96
98
|
(args) => client.createPost(args)
|
|
97
99
|
)
|
|
98
100
|
},
|
|
101
|
+
{
|
|
102
|
+
name: "update_post",
|
|
103
|
+
config: {
|
|
104
|
+
description: 'Edit a draft or scheduled post in place (no need to delete and recreate it). Only the fields you pass change; `media` replaces the whole media list, so pass every image the post should have (e.g. to add an image to a text-only draft: `{ id, media: [{ url }] }`). `media` items are public URLs or `{ id }` of an upload_media result. `when`: "draft" unschedules, "now" publishes, an ISO-8601 timestamp (re)schedules; omitted, a scheduled post stays scheduled. The post type cannot change. Published posts cannot be edited.',
|
|
105
|
+
inputSchema: {
|
|
106
|
+
id: z.string().describe("Post id (from create_post or list_posts)"),
|
|
107
|
+
text: z.string().optional().describe("New post text / caption"),
|
|
108
|
+
media: z.array(z.union([z.object({ url: z.string().url() }), z.object({ id: z.string() })])).optional().describe("The full new media list: public URLs or uploaded resource ids"),
|
|
109
|
+
channels: z.array(z.string()).min(1).optional().describe("The full new channel list"),
|
|
110
|
+
when: z.string().optional().describe('"now" | "draft" | ISO-8601 timestamp'),
|
|
111
|
+
firstComment: z.string().max(2e3).nullable().optional(),
|
|
112
|
+
title: z.string().max(512).optional().describe("Article title (articles only)"),
|
|
113
|
+
markdown: z.string().optional().describe("Article body in Markdown (articles only)"),
|
|
114
|
+
excerpt: z.string().max(1024).optional(),
|
|
115
|
+
tags: z.array(z.string().max(64)).max(50).optional(),
|
|
116
|
+
canonicalUrl: z.string().max(2048).optional()
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
handler: wrap(
|
|
120
|
+
({ id, ...body }) => client.updatePost(id, body)
|
|
121
|
+
)
|
|
122
|
+
},
|
|
99
123
|
{
|
|
100
124
|
name: "list_posts",
|
|
101
125
|
config: {
|
package/dist/http.js
CHANGED
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anaella/mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "MCP server for anaella.com — schedule and publish social posts via the /v1 API.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"smoke": "bun run src/smoke.ts"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@anaella/client": "^0.
|
|
23
|
+
"@anaella/client": "^0.5.0",
|
|
24
24
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
25
25
|
"zod": "^3.25.76"
|
|
26
26
|
},
|