@frase/mcp-server 0.3.0 → 0.3.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/dist/formatter.d.ts +1 -1
- package/dist/formatter.d.ts.map +1 -1
- package/dist/formatter.js +1 -1
- package/dist/formatter.js.map +1 -1
- package/dist/lib/mcp-audit.d.ts +3 -0
- package/dist/lib/mcp-audit.d.ts.map +1 -0
- package/dist/lib/mcp-audit.js +95 -0
- package/dist/lib/mcp-audit.js.map +1 -0
- package/dist/mcpb-bundle.js +30072 -0
- package/dist/prompts/content-pipeline.d.ts.map +1 -1
- package/dist/prompts/content-pipeline.js +10 -18
- package/dist/prompts/content-pipeline.js.map +1 -1
- package/dist/prompts/create-seo-article.d.ts.map +1 -1
- package/dist/prompts/create-seo-article.js +17 -42
- package/dist/prompts/create-seo-article.js.map +1 -1
- package/dist/prompts/keyword-research.d.ts.map +1 -1
- package/dist/prompts/keyword-research.js +20 -31
- package/dist/prompts/keyword-research.js.map +1 -1
- package/dist/resources/briefs.d.ts.map +1 -1
- package/dist/resources/briefs.js +12 -6
- package/dist/resources/briefs.js.map +1 -1
- package/dist/tools/ai-visibility.d.ts.map +1 -1
- package/dist/tools/ai-visibility.js +67 -12
- package/dist/tools/ai-visibility.js.map +1 -1
- package/dist/tools/analytics.d.ts.map +1 -1
- package/dist/tools/analytics.js +9 -4
- package/dist/tools/analytics.js.map +1 -1
- package/dist/tools/audits.d.ts +8 -5
- package/dist/tools/audits.d.ts.map +1 -1
- package/dist/tools/audits.js +112 -20
- package/dist/tools/audits.js.map +1 -1
- package/dist/tools/briefs.d.ts +40 -145
- package/dist/tools/briefs.d.ts.map +1 -1
- package/dist/tools/briefs.js +153 -163
- package/dist/tools/briefs.js.map +1 -1
- package/dist/tools/cms-posts.d.ts +7 -0
- package/dist/tools/cms-posts.d.ts.map +1 -0
- package/dist/tools/cms-posts.js +499 -0
- package/dist/tools/cms-posts.js.map +1 -0
- package/dist/tools/content.d.ts +37 -6
- package/dist/tools/content.d.ts.map +1 -1
- package/dist/tools/content.js +362 -32
- package/dist/tools/content.js.map +1 -1
- package/dist/tools/discover.js +3 -3
- package/dist/tools/discover.js.map +1 -1
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +5 -0
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/optimizations.d.ts +6 -0
- package/dist/tools/optimizations.d.ts.map +1 -1
- package/dist/tools/optimizations.js +440 -26
- package/dist/tools/optimizations.js.map +1 -1
- package/dist/tools/publish.d.ts +3 -3
- package/dist/tools/publish.js +6 -6
- package/dist/tools/publish.js.map +1 -1
- package/dist/tools/research.d.ts +18 -6
- package/dist/tools/research.d.ts.map +1 -1
- package/dist/tools/research.js +210 -19
- package/dist/tools/research.js.map +1 -1
- package/dist/tools/rules.d.ts +76 -0
- package/dist/tools/rules.d.ts.map +1 -1
- package/dist/tools/rules.js +355 -12
- package/dist/tools/rules.js.map +1 -1
- package/dist/tools/serp.d.ts.map +1 -1
- package/dist/tools/serp.js +30 -18
- package/dist/tools/serp.js.map +1 -1
- package/dist/tools/site-health.js +10 -10
- package/dist/tools/site-health.js.map +1 -1
- package/dist/tools/templates.js +5 -5
- package/dist/tools/templates.js.map +1 -1
- package/dist/tools/webhooks.d.ts.map +1 -1
- package/dist/tools/webhooks.js +24 -3
- package/dist/tools/webhooks.js.map +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +8 -11
- package/server.json +4 -4
|
@@ -0,0 +1,499 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CMS Posts tools — CRUD, publish/unpublish, bulk import
|
|
3
|
+
*/
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
import { formatTable, formatStatus, formatDate, formatPagination, formatKeyValue, truncate, } from "../formatter.js";
|
|
6
|
+
import { CACHE_TTL } from "../cache.js";
|
|
7
|
+
// ============================================
|
|
8
|
+
// list_cms_posts
|
|
9
|
+
// ============================================
|
|
10
|
+
const listCmsPostsSchema = z.object({
|
|
11
|
+
site_id: z.string().min(1),
|
|
12
|
+
status: z.enum(["draft", "published", "scheduled"]).optional(),
|
|
13
|
+
type: z.enum(["blog_post", "page"]).optional(),
|
|
14
|
+
page: z.number().min(1).optional().default(1),
|
|
15
|
+
page_size: z.number().min(1).max(100).optional().default(20),
|
|
16
|
+
});
|
|
17
|
+
const listCmsPostsTool = {
|
|
18
|
+
name: "list_cms_posts",
|
|
19
|
+
description: "List CMS posts for a site. Filter by status (draft, published, scheduled) or type (blog_post, page). Returns paginated results with title, slug, status, and dates.",
|
|
20
|
+
inputSchema: {
|
|
21
|
+
type: "object",
|
|
22
|
+
properties: {
|
|
23
|
+
site_id: { type: "string", description: "Site ID (required). Use list_sites to find site IDs." },
|
|
24
|
+
status: { type: "string", enum: ["draft", "published", "scheduled"], description: "Filter by post status" },
|
|
25
|
+
type: { type: "string", enum: ["blog_post", "page"], description: "Filter by post type" },
|
|
26
|
+
page: { type: "number", description: "Page number (default: 1)" },
|
|
27
|
+
page_size: { type: "number", description: "Items per page, max 100 (default: 20)" },
|
|
28
|
+
},
|
|
29
|
+
required: ["site_id"],
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
async function executeListCmsPosts(input, context) {
|
|
33
|
+
const parsed = listCmsPostsSchema.safeParse(input);
|
|
34
|
+
if (!parsed.success)
|
|
35
|
+
return { success: false, markdown: `**Error:** ${parsed.error.message}` };
|
|
36
|
+
const { site_id, status, type, page, page_size } = parsed.data;
|
|
37
|
+
try {
|
|
38
|
+
const params = { site_id, page: String(page), page_size: String(page_size) };
|
|
39
|
+
if (status)
|
|
40
|
+
params.status = status;
|
|
41
|
+
if (type)
|
|
42
|
+
params.type = type;
|
|
43
|
+
const response = await context.client.get("/cms/posts", params, CACHE_TTL.lists);
|
|
44
|
+
const posts = response.data;
|
|
45
|
+
const pagination = response.pagination;
|
|
46
|
+
if (!posts || posts.length === 0) {
|
|
47
|
+
return { success: true, markdown: "No CMS posts found for this site." };
|
|
48
|
+
}
|
|
49
|
+
const headers = ["Title", "Slug", "Status", "Type", "Published"];
|
|
50
|
+
const rows = posts.map((p) => [
|
|
51
|
+
truncate(p.title, 40),
|
|
52
|
+
truncate(p.slug, 30),
|
|
53
|
+
formatStatus(p.status),
|
|
54
|
+
p.type === "blog_post" ? "Blog Post" : "Page",
|
|
55
|
+
p.published_at ? formatDate(p.published_at) : "—",
|
|
56
|
+
]);
|
|
57
|
+
const table = formatTable(headers, rows);
|
|
58
|
+
const pag = formatPagination(pagination);
|
|
59
|
+
return { success: true, markdown: `## CMS Posts\n\n${table}\n\n${pag}`, data: response };
|
|
60
|
+
}
|
|
61
|
+
catch (error) {
|
|
62
|
+
return { success: false, markdown: `**Error:** ${error instanceof Error ? error.message : "Unknown error"}` };
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
// ============================================
|
|
66
|
+
// get_cms_post
|
|
67
|
+
// ============================================
|
|
68
|
+
const getCmsPostSchema = z.object({
|
|
69
|
+
post_id: z.string().min(1),
|
|
70
|
+
});
|
|
71
|
+
const getCmsPostTool = {
|
|
72
|
+
name: "get_cms_post",
|
|
73
|
+
description: "Get a single CMS post by ID, including full content body, SEO fields, and metadata.",
|
|
74
|
+
inputSchema: {
|
|
75
|
+
type: "object",
|
|
76
|
+
properties: {
|
|
77
|
+
post_id: { type: "string", description: "Post ID (required)" },
|
|
78
|
+
},
|
|
79
|
+
required: ["post_id"],
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
async function executeGetCmsPost(input, context) {
|
|
83
|
+
const parsed = getCmsPostSchema.safeParse(input);
|
|
84
|
+
if (!parsed.success)
|
|
85
|
+
return { success: false, markdown: `**Error:** ${parsed.error.message}` };
|
|
86
|
+
try {
|
|
87
|
+
const response = await context.client.get(`/cms/posts/${parsed.data.post_id}`, undefined, CACHE_TTL.resources);
|
|
88
|
+
const post = response.data;
|
|
89
|
+
const markdown = `## ${post.title}\n\n${formatKeyValue({
|
|
90
|
+
ID: post.id,
|
|
91
|
+
Slug: post.slug,
|
|
92
|
+
Status: formatStatus(post.status),
|
|
93
|
+
Type: post.type === "blog_post" ? "Blog Post" : "Page",
|
|
94
|
+
"Published At": post.published_at ? formatDate(post.published_at) : "—",
|
|
95
|
+
"Created At": formatDate(post.created_at),
|
|
96
|
+
"SEO Title": post.seo_title || "—",
|
|
97
|
+
"SEO Description": post.seo_description ? truncate(post.seo_description, 80) : "—",
|
|
98
|
+
"Focus Keyword": post.focus_keyword || "—",
|
|
99
|
+
"Featured Image": post.featured_image || "—",
|
|
100
|
+
"Canonical URL": post.canonical_url || "—",
|
|
101
|
+
})}\n\n### Content\n\n${truncate(post.content, 2000)}`;
|
|
102
|
+
return { success: true, markdown, data: response };
|
|
103
|
+
}
|
|
104
|
+
catch (error) {
|
|
105
|
+
return { success: false, markdown: `**Error:** ${error instanceof Error ? error.message : "Unknown error"}` };
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
// ============================================
|
|
109
|
+
// create_cms_post
|
|
110
|
+
// ============================================
|
|
111
|
+
const createCmsPostSchema = z.object({
|
|
112
|
+
site_id: z.string().min(1),
|
|
113
|
+
title: z.string().min(1),
|
|
114
|
+
content: z.string().min(1),
|
|
115
|
+
slug: z.string().optional(),
|
|
116
|
+
status: z.enum(["draft", "published", "scheduled"]).optional(),
|
|
117
|
+
type: z.enum(["blog_post", "page"]).optional(),
|
|
118
|
+
excerpt: z.string().optional(),
|
|
119
|
+
featured_image: z.string().url().optional(),
|
|
120
|
+
seo_title: z.string().optional(),
|
|
121
|
+
seo_description: z.string().optional(),
|
|
122
|
+
focus_keyword: z.string().optional(),
|
|
123
|
+
canonical_url: z.string().url().optional(),
|
|
124
|
+
published_at: z.string().optional(),
|
|
125
|
+
schema_markup: z.record(z.unknown()).optional(),
|
|
126
|
+
});
|
|
127
|
+
const createCmsPostTool = {
|
|
128
|
+
name: "create_cms_post",
|
|
129
|
+
description: "Create a new CMS post. Requires site_id, title, and content (HTML). Optionally set slug, status, type, SEO fields, and featured image.",
|
|
130
|
+
inputSchema: {
|
|
131
|
+
type: "object",
|
|
132
|
+
properties: {
|
|
133
|
+
site_id: { type: "string", description: "Site ID (required)" },
|
|
134
|
+
title: { type: "string", description: "Post title (required)" },
|
|
135
|
+
content: { type: "string", description: "Post content as HTML (required)" },
|
|
136
|
+
slug: { type: "string", description: "URL slug (auto-generated from title if omitted)" },
|
|
137
|
+
status: { type: "string", enum: ["draft", "published", "scheduled"], description: "Post status (default: draft)" },
|
|
138
|
+
type: { type: "string", enum: ["blog_post", "page"], description: "Post type (default: blog_post)" },
|
|
139
|
+
excerpt: { type: "string", description: "Short excerpt/summary" },
|
|
140
|
+
featured_image: { type: "string", description: "Featured image HTTPS URL" },
|
|
141
|
+
seo_title: { type: "string", description: "SEO title (meta title)" },
|
|
142
|
+
seo_description: { type: "string", description: "SEO meta description" },
|
|
143
|
+
focus_keyword: { type: "string", description: "Target keyword for SEO" },
|
|
144
|
+
canonical_url: { type: "string", description: "Canonical URL (HTTPS)" },
|
|
145
|
+
published_at: { type: "string", description: "ISO 8601 publish date" },
|
|
146
|
+
schema_markup: { type: "object", description: "JSON-LD schema markup" },
|
|
147
|
+
},
|
|
148
|
+
required: ["site_id", "title", "content"],
|
|
149
|
+
},
|
|
150
|
+
};
|
|
151
|
+
async function executeCreateCmsPost(input, context) {
|
|
152
|
+
const parsed = createCmsPostSchema.safeParse(input);
|
|
153
|
+
if (!parsed.success)
|
|
154
|
+
return { success: false, markdown: `**Error:** ${parsed.error.message}` };
|
|
155
|
+
try {
|
|
156
|
+
const response = await context.client.post("/cms/posts", parsed.data);
|
|
157
|
+
const post = response.data;
|
|
158
|
+
return {
|
|
159
|
+
success: true,
|
|
160
|
+
markdown: `## Post Created\n\n${formatKeyValue({
|
|
161
|
+
ID: post.id,
|
|
162
|
+
Title: post.title,
|
|
163
|
+
Slug: post.slug,
|
|
164
|
+
Status: formatStatus(post.status),
|
|
165
|
+
Type: post.type === "blog_post" ? "Blog Post" : "Page",
|
|
166
|
+
})}`,
|
|
167
|
+
data: response,
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
catch (error) {
|
|
171
|
+
return { success: false, markdown: `**Error:** ${error instanceof Error ? error.message : "Unknown error"}` };
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
// ============================================
|
|
175
|
+
// update_cms_post
|
|
176
|
+
// ============================================
|
|
177
|
+
const updateCmsPostSchema = z.object({
|
|
178
|
+
post_id: z.string().min(1),
|
|
179
|
+
title: z.string().optional(),
|
|
180
|
+
content: z.string().optional(),
|
|
181
|
+
slug: z.string().optional(),
|
|
182
|
+
type: z.enum(["blog_post", "page"]).optional(),
|
|
183
|
+
excerpt: z.string().optional(),
|
|
184
|
+
featured_image: z.string().url().optional(),
|
|
185
|
+
seo_title: z.string().optional(),
|
|
186
|
+
seo_description: z.string().optional(),
|
|
187
|
+
focus_keyword: z.string().optional(),
|
|
188
|
+
canonical_url: z.string().url().optional(),
|
|
189
|
+
schema_markup: z.record(z.unknown()).optional(),
|
|
190
|
+
});
|
|
191
|
+
const updateCmsPostTool = {
|
|
192
|
+
name: "update_cms_post",
|
|
193
|
+
description: "Update an existing CMS post. Only provide the fields you want to change — omitted fields remain unchanged.",
|
|
194
|
+
inputSchema: {
|
|
195
|
+
type: "object",
|
|
196
|
+
properties: {
|
|
197
|
+
post_id: { type: "string", description: "Post ID (required)" },
|
|
198
|
+
title: { type: "string", description: "New title" },
|
|
199
|
+
content: { type: "string", description: "New HTML content" },
|
|
200
|
+
slug: { type: "string", description: "New URL slug" },
|
|
201
|
+
type: { type: "string", enum: ["blog_post", "page"], description: "Post type" },
|
|
202
|
+
excerpt: { type: "string", description: "Short excerpt/summary" },
|
|
203
|
+
featured_image: { type: "string", description: "Featured image HTTPS URL" },
|
|
204
|
+
seo_title: { type: "string", description: "SEO title" },
|
|
205
|
+
seo_description: { type: "string", description: "SEO meta description" },
|
|
206
|
+
focus_keyword: { type: "string", description: "Target keyword" },
|
|
207
|
+
canonical_url: { type: "string", description: "Canonical URL (HTTPS)" },
|
|
208
|
+
schema_markup: { type: "object", description: "JSON-LD schema markup" },
|
|
209
|
+
},
|
|
210
|
+
required: ["post_id"],
|
|
211
|
+
},
|
|
212
|
+
};
|
|
213
|
+
async function executeUpdateCmsPost(input, context) {
|
|
214
|
+
const parsed = updateCmsPostSchema.safeParse(input);
|
|
215
|
+
if (!parsed.success)
|
|
216
|
+
return { success: false, markdown: `**Error:** ${parsed.error.message}` };
|
|
217
|
+
const { post_id, ...updates } = parsed.data;
|
|
218
|
+
try {
|
|
219
|
+
const response = await context.client.put(`/cms/posts/${post_id}`, updates);
|
|
220
|
+
const post = response.data;
|
|
221
|
+
return {
|
|
222
|
+
success: true,
|
|
223
|
+
markdown: `## Post Updated\n\n${formatKeyValue({
|
|
224
|
+
ID: post.id,
|
|
225
|
+
Title: post.title,
|
|
226
|
+
Slug: post.slug,
|
|
227
|
+
Status: formatStatus(post.status),
|
|
228
|
+
})}`,
|
|
229
|
+
data: response,
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
catch (error) {
|
|
233
|
+
return { success: false, markdown: `**Error:** ${error instanceof Error ? error.message : "Unknown error"}` };
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
// ============================================
|
|
237
|
+
// delete_cms_post
|
|
238
|
+
// ============================================
|
|
239
|
+
const deleteCmsPostSchema = z.object({
|
|
240
|
+
post_id: z.string().min(1),
|
|
241
|
+
});
|
|
242
|
+
const deleteCmsPostTool = {
|
|
243
|
+
name: "delete_cms_post",
|
|
244
|
+
description: "Delete a CMS post by ID. This action is irreversible.",
|
|
245
|
+
inputSchema: {
|
|
246
|
+
type: "object",
|
|
247
|
+
properties: {
|
|
248
|
+
post_id: { type: "string", description: "Post ID to delete (required)" },
|
|
249
|
+
},
|
|
250
|
+
required: ["post_id"],
|
|
251
|
+
},
|
|
252
|
+
};
|
|
253
|
+
async function executeDeleteCmsPost(input, context) {
|
|
254
|
+
const parsed = deleteCmsPostSchema.safeParse(input);
|
|
255
|
+
if (!parsed.success)
|
|
256
|
+
return { success: false, markdown: `**Error:** ${parsed.error.message}` };
|
|
257
|
+
try {
|
|
258
|
+
await context.client.delete(`/cms/posts/${parsed.data.post_id}`);
|
|
259
|
+
return { success: true, markdown: `**Post deleted** (${parsed.data.post_id})` };
|
|
260
|
+
}
|
|
261
|
+
catch (error) {
|
|
262
|
+
return { success: false, markdown: `**Error:** ${error instanceof Error ? error.message : "Unknown error"}` };
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
// ============================================
|
|
266
|
+
// publish_cms_post
|
|
267
|
+
// ============================================
|
|
268
|
+
const publishCmsPostSchema = z.object({
|
|
269
|
+
post_id: z.string().min(1),
|
|
270
|
+
});
|
|
271
|
+
const publishCmsPostTool = {
|
|
272
|
+
name: "publish_cms_post",
|
|
273
|
+
description: "Publish a CMS post (changes status from draft to published). The post becomes visible on the public blog.",
|
|
274
|
+
inputSchema: {
|
|
275
|
+
type: "object",
|
|
276
|
+
properties: {
|
|
277
|
+
post_id: { type: "string", description: "Post ID to publish (required)" },
|
|
278
|
+
},
|
|
279
|
+
required: ["post_id"],
|
|
280
|
+
},
|
|
281
|
+
};
|
|
282
|
+
async function executePublishCmsPost(input, context) {
|
|
283
|
+
const parsed = publishCmsPostSchema.safeParse(input);
|
|
284
|
+
if (!parsed.success)
|
|
285
|
+
return { success: false, markdown: `**Error:** ${parsed.error.message}` };
|
|
286
|
+
try {
|
|
287
|
+
const response = await context.client.post(`/cms/posts/${parsed.data.post_id}/publish`, {});
|
|
288
|
+
const post = response.data;
|
|
289
|
+
return {
|
|
290
|
+
success: true,
|
|
291
|
+
markdown: `## Post Published\n\n${formatKeyValue({
|
|
292
|
+
ID: post.id,
|
|
293
|
+
Title: post.title,
|
|
294
|
+
Slug: post.slug,
|
|
295
|
+
Status: formatStatus(post.status),
|
|
296
|
+
"Published At": post.published_at ? formatDate(post.published_at) : "—",
|
|
297
|
+
})}`,
|
|
298
|
+
data: response,
|
|
299
|
+
};
|
|
300
|
+
}
|
|
301
|
+
catch (error) {
|
|
302
|
+
return { success: false, markdown: `**Error:** ${error instanceof Error ? error.message : "Unknown error"}` };
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
// ============================================
|
|
306
|
+
// unpublish_cms_post
|
|
307
|
+
// ============================================
|
|
308
|
+
const unpublishCmsPostSchema = z.object({
|
|
309
|
+
post_id: z.string().min(1),
|
|
310
|
+
});
|
|
311
|
+
const unpublishCmsPostTool = {
|
|
312
|
+
name: "unpublish_cms_post",
|
|
313
|
+
description: "Unpublish a CMS post (changes status from published back to draft). The post is removed from the public blog.",
|
|
314
|
+
inputSchema: {
|
|
315
|
+
type: "object",
|
|
316
|
+
properties: {
|
|
317
|
+
post_id: { type: "string", description: "Post ID to unpublish (required)" },
|
|
318
|
+
},
|
|
319
|
+
required: ["post_id"],
|
|
320
|
+
},
|
|
321
|
+
};
|
|
322
|
+
async function executeUnpublishCmsPost(input, context) {
|
|
323
|
+
const parsed = unpublishCmsPostSchema.safeParse(input);
|
|
324
|
+
if (!parsed.success)
|
|
325
|
+
return { success: false, markdown: `**Error:** ${parsed.error.message}` };
|
|
326
|
+
try {
|
|
327
|
+
const response = await context.client.post(`/cms/posts/${parsed.data.post_id}/unpublish`, {});
|
|
328
|
+
const post = response.data;
|
|
329
|
+
return {
|
|
330
|
+
success: true,
|
|
331
|
+
markdown: `## Post Unpublished\n\n${formatKeyValue({
|
|
332
|
+
ID: post.id,
|
|
333
|
+
Title: post.title,
|
|
334
|
+
Status: formatStatus(post.status),
|
|
335
|
+
})}`,
|
|
336
|
+
data: response,
|
|
337
|
+
};
|
|
338
|
+
}
|
|
339
|
+
catch (error) {
|
|
340
|
+
return { success: false, markdown: `**Error:** ${error instanceof Error ? error.message : "Unknown error"}` };
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
// ============================================
|
|
344
|
+
// import_cms_posts
|
|
345
|
+
// ============================================
|
|
346
|
+
const importCmsPostsSchema = z.object({
|
|
347
|
+
site_id: z.string().min(1),
|
|
348
|
+
posts: z.array(z.object({
|
|
349
|
+
title: z.string().min(1),
|
|
350
|
+
content: z.string().min(1),
|
|
351
|
+
slug: z.string().optional(),
|
|
352
|
+
status: z.enum(["draft", "published", "scheduled"]).optional(),
|
|
353
|
+
type: z.enum(["blog_post", "page"]).optional(),
|
|
354
|
+
excerpt: z.string().optional(),
|
|
355
|
+
featured_image: z.string().optional(),
|
|
356
|
+
seo_title: z.string().optional(),
|
|
357
|
+
seo_description: z.string().optional(),
|
|
358
|
+
focus_keyword: z.string().optional(),
|
|
359
|
+
canonical_url: z.string().optional(),
|
|
360
|
+
published_at: z.string().optional(),
|
|
361
|
+
})).min(1).max(100),
|
|
362
|
+
options: z.object({
|
|
363
|
+
on_conflict: z.enum(["skip", "overwrite"]).optional(),
|
|
364
|
+
default_status: z.enum(["draft", "published", "scheduled"]).optional(),
|
|
365
|
+
}).optional(),
|
|
366
|
+
});
|
|
367
|
+
const importCmsPostsTool = {
|
|
368
|
+
name: "import_cms_posts",
|
|
369
|
+
description: "Start an async bulk import of CMS posts (max 100 per request). Returns a job ID to poll for progress. Use get_cms_import_status to check completion.",
|
|
370
|
+
inputSchema: {
|
|
371
|
+
type: "object",
|
|
372
|
+
properties: {
|
|
373
|
+
site_id: { type: "string", description: "Site ID (required)" },
|
|
374
|
+
posts: {
|
|
375
|
+
type: "array",
|
|
376
|
+
description: "Array of posts to import (max 100). Each must have title and content.",
|
|
377
|
+
items: {
|
|
378
|
+
type: "object",
|
|
379
|
+
properties: {
|
|
380
|
+
title: { type: "string" },
|
|
381
|
+
content: { type: "string" },
|
|
382
|
+
slug: { type: "string" },
|
|
383
|
+
status: { type: "string", enum: ["draft", "published", "scheduled"] },
|
|
384
|
+
type: { type: "string", enum: ["blog_post", "page"] },
|
|
385
|
+
excerpt: { type: "string" },
|
|
386
|
+
featured_image: { type: "string" },
|
|
387
|
+
seo_title: { type: "string" },
|
|
388
|
+
seo_description: { type: "string" },
|
|
389
|
+
focus_keyword: { type: "string" },
|
|
390
|
+
canonical_url: { type: "string" },
|
|
391
|
+
published_at: { type: "string" },
|
|
392
|
+
},
|
|
393
|
+
required: ["title", "content"],
|
|
394
|
+
},
|
|
395
|
+
},
|
|
396
|
+
options: {
|
|
397
|
+
type: "object",
|
|
398
|
+
description: "Import options",
|
|
399
|
+
properties: {
|
|
400
|
+
on_conflict: { type: "string", enum: ["skip", "overwrite"], description: "What to do if slug already exists (default: skip)" },
|
|
401
|
+
default_status: { type: "string", enum: ["draft", "published", "scheduled"], description: "Default status for posts without explicit status (default: draft)" },
|
|
402
|
+
},
|
|
403
|
+
},
|
|
404
|
+
},
|
|
405
|
+
required: ["site_id", "posts"],
|
|
406
|
+
},
|
|
407
|
+
};
|
|
408
|
+
async function executeImportCmsPosts(input, context) {
|
|
409
|
+
const parsed = importCmsPostsSchema.safeParse(input);
|
|
410
|
+
if (!parsed.success)
|
|
411
|
+
return { success: false, markdown: `**Error:** ${parsed.error.message}` };
|
|
412
|
+
try {
|
|
413
|
+
const response = await context.client.post("/cms/posts/import", parsed.data);
|
|
414
|
+
const job = response.data;
|
|
415
|
+
return {
|
|
416
|
+
success: true,
|
|
417
|
+
markdown: `## Import Started\n\n${formatKeyValue({
|
|
418
|
+
"Job ID": job.job_id,
|
|
419
|
+
Status: formatStatus(job.status),
|
|
420
|
+
"Posts Queued": job.posts_queued,
|
|
421
|
+
})}\n\n> Use \`get_cms_import_status\` with job ID to check progress.`,
|
|
422
|
+
data: response,
|
|
423
|
+
};
|
|
424
|
+
}
|
|
425
|
+
catch (error) {
|
|
426
|
+
return { success: false, markdown: `**Error:** ${error instanceof Error ? error.message : "Unknown error"}` };
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
// ============================================
|
|
430
|
+
// get_cms_import_status
|
|
431
|
+
// ============================================
|
|
432
|
+
const getCmsImportStatusSchema = z.object({
|
|
433
|
+
job_id: z.string().min(1),
|
|
434
|
+
});
|
|
435
|
+
const getCmsImportStatusTool = {
|
|
436
|
+
name: "get_cms_import_status",
|
|
437
|
+
description: "Check the status of a CMS bulk import job. Shows posts queued, succeeded, failed, and skipped counts.",
|
|
438
|
+
inputSchema: {
|
|
439
|
+
type: "object",
|
|
440
|
+
properties: {
|
|
441
|
+
job_id: { type: "string", description: "Import job ID (required)" },
|
|
442
|
+
},
|
|
443
|
+
required: ["job_id"],
|
|
444
|
+
},
|
|
445
|
+
};
|
|
446
|
+
async function executeGetCmsImportStatus(input, context) {
|
|
447
|
+
const parsed = getCmsImportStatusSchema.safeParse(input);
|
|
448
|
+
if (!parsed.success)
|
|
449
|
+
return { success: false, markdown: `**Error:** ${parsed.error.message}` };
|
|
450
|
+
try {
|
|
451
|
+
const response = await context.client.get(`/cms/posts/import/${parsed.data.job_id}`);
|
|
452
|
+
const job = response.data;
|
|
453
|
+
let markdown = `## Import Job Status\n\n${formatKeyValue({
|
|
454
|
+
"Job ID": job.job_id,
|
|
455
|
+
Status: formatStatus(job.status),
|
|
456
|
+
"Posts Queued": job.posts_queued,
|
|
457
|
+
"Succeeded": job.posts_succeeded,
|
|
458
|
+
"Failed": job.posts_failed,
|
|
459
|
+
"Skipped": job.posts_skipped,
|
|
460
|
+
"Created At": formatDate(job.created_at),
|
|
461
|
+
"Completed At": job.completed_at ? formatDate(job.completed_at) : "—",
|
|
462
|
+
})}`;
|
|
463
|
+
if (job.errors && job.errors.length > 0) {
|
|
464
|
+
const errHeaders = ["Index", "Slug", "Error"];
|
|
465
|
+
const errRows = job.errors.map((e) => [String(e.index), e.slug, truncate(e.error, 60)]);
|
|
466
|
+
markdown += `\n\n### Errors\n\n${formatTable(errHeaders, errRows)}`;
|
|
467
|
+
}
|
|
468
|
+
return { success: true, markdown, data: response };
|
|
469
|
+
}
|
|
470
|
+
catch (error) {
|
|
471
|
+
return { success: false, markdown: `**Error:** ${error instanceof Error ? error.message : "Unknown error"}` };
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
// ============================================
|
|
475
|
+
// Exports
|
|
476
|
+
// ============================================
|
|
477
|
+
export const cmsPostTools = [
|
|
478
|
+
listCmsPostsTool,
|
|
479
|
+
getCmsPostTool,
|
|
480
|
+
createCmsPostTool,
|
|
481
|
+
updateCmsPostTool,
|
|
482
|
+
deleteCmsPostTool,
|
|
483
|
+
publishCmsPostTool,
|
|
484
|
+
unpublishCmsPostTool,
|
|
485
|
+
importCmsPostsTool,
|
|
486
|
+
getCmsImportStatusTool,
|
|
487
|
+
];
|
|
488
|
+
export const cmsPostExecutors = {
|
|
489
|
+
list_cms_posts: executeListCmsPosts,
|
|
490
|
+
get_cms_post: executeGetCmsPost,
|
|
491
|
+
create_cms_post: executeCreateCmsPost,
|
|
492
|
+
update_cms_post: executeUpdateCmsPost,
|
|
493
|
+
delete_cms_post: executeDeleteCmsPost,
|
|
494
|
+
publish_cms_post: executePublishCmsPost,
|
|
495
|
+
unpublish_cms_post: executeUnpublishCmsPost,
|
|
496
|
+
import_cms_posts: executeImportCmsPosts,
|
|
497
|
+
get_cms_import_status: executeGetCmsImportStatus,
|
|
498
|
+
};
|
|
499
|
+
//# sourceMappingURL=cms-posts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cms-posts.js","sourceRoot":"","sources":["../../src/tools/cms-posts.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,WAAW,EACX,YAAY,EACZ,UAAU,EACV,gBAAgB,EAChB,cAAc,EACd,QAAQ,GACT,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,+CAA+C;AAC/C,iBAAiB;AACjB,+CAA+C;AAE/C,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IAClC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC1B,MAAM,EA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AAE,CAAC;IACrD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,cAAc,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,EAAE,EAAE,CAAC;IAChH,CAAC;AACH,CAAC;AAED,+CAA+C;AAC/C,UAAU;AACV,+CAA+C;AAE/C,MAAM,CAAC,MAAM,YAAY,GAAwB;IAC/C,gBAAgB;IAChB,cAAc;IACd,iBAAiB;IACjB,iBAAiB;IACjB,iBAAiB;IACjB,kBAAkB;IAClB,oBAAoB;IACpB,kBAAkB;IAClB,sBAAsB;CACvB,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAkF;IAC7G,cAAc,EAAE,mBAAmB;IACnC,YAAY,EAAE,iBAAiB;IAC/B,eAAe,EAAE,oBAAoB;IACrC,eAAe,EAAE,oBAAoB;IACrC,eAAe,EAAE,oBAAoB;IACrC,gBAAgB,EAAE,qBAAqB;IACvC,kBAAkB,EAAE,uBAAuB;IAC3C,gBAAgB,EAAE,qBAAqB;IACvC,qBAAqB,EAAE,yBAAyB;CACjD,CAAC"}
|
package/dist/tools/content.d.ts
CHANGED
|
@@ -6,18 +6,21 @@ import type { McpToolDefinition, ToolContext, ToolResult } from "../types.js";
|
|
|
6
6
|
declare const listContentInputSchema: z.ZodObject<{
|
|
7
7
|
page: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
8
8
|
page_size: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
9
|
-
status: z.ZodOptional<z.ZodEnum<["
|
|
9
|
+
status: z.ZodOptional<z.ZodEnum<["drafting", "review", "published", "archived"]>>;
|
|
10
10
|
site_id: z.ZodOptional<z.ZodString>;
|
|
11
|
+
is_monitored: z.ZodOptional<z.ZodBoolean>;
|
|
11
12
|
}, "strip", z.ZodTypeAny, {
|
|
12
13
|
page: number;
|
|
13
14
|
page_size: number;
|
|
14
|
-
status?: "
|
|
15
|
+
status?: "drafting" | "review" | "published" | "archived" | undefined;
|
|
15
16
|
site_id?: string | undefined;
|
|
17
|
+
is_monitored?: boolean | undefined;
|
|
16
18
|
}, {
|
|
17
19
|
page?: number | undefined;
|
|
18
20
|
page_size?: number | undefined;
|
|
19
|
-
status?: "
|
|
21
|
+
status?: "drafting" | "review" | "published" | "archived" | undefined;
|
|
20
22
|
site_id?: string | undefined;
|
|
23
|
+
is_monitored?: boolean | undefined;
|
|
21
24
|
}>;
|
|
22
25
|
export type ListContentInput = z.infer<typeof listContentInputSchema>;
|
|
23
26
|
export declare const listContentTool: McpToolDefinition;
|
|
@@ -52,19 +55,19 @@ declare const updateContentInputSchema: z.ZodObject<{
|
|
|
52
55
|
id: z.ZodString;
|
|
53
56
|
title: z.ZodOptional<z.ZodString>;
|
|
54
57
|
body: z.ZodOptional<z.ZodString>;
|
|
55
|
-
status: z.ZodOptional<z.ZodEnum<["
|
|
58
|
+
status: z.ZodOptional<z.ZodEnum<["drafting", "review", "published"]>>;
|
|
56
59
|
meta_title: z.ZodOptional<z.ZodString>;
|
|
57
60
|
meta_description: z.ZodOptional<z.ZodString>;
|
|
58
61
|
}, "strip", z.ZodTypeAny, {
|
|
59
62
|
id: string;
|
|
60
|
-
status?: "
|
|
63
|
+
status?: "drafting" | "review" | "published" | undefined;
|
|
61
64
|
title?: string | undefined;
|
|
62
65
|
body?: string | undefined;
|
|
63
66
|
meta_title?: string | undefined;
|
|
64
67
|
meta_description?: string | undefined;
|
|
65
68
|
}, {
|
|
66
69
|
id: string;
|
|
67
|
-
status?: "
|
|
70
|
+
status?: "drafting" | "review" | "published" | undefined;
|
|
68
71
|
title?: string | undefined;
|
|
69
72
|
body?: string | undefined;
|
|
70
73
|
meta_title?: string | undefined;
|
|
@@ -132,6 +135,34 @@ declare const rescoreContentInputSchema: z.ZodObject<{
|
|
|
132
135
|
export type RescoreContentInput = z.infer<typeof rescoreContentInputSchema>;
|
|
133
136
|
export declare const rescoreContentTool: McpToolDefinition;
|
|
134
137
|
export declare function executeRescoreContent(input: unknown, context: ToolContext): Promise<ToolResult>;
|
|
138
|
+
export declare const getContentSummaryTool: McpToolDefinition;
|
|
139
|
+
export declare function executeGetContentSummary(_input: unknown, context: ToolContext): Promise<ToolResult>;
|
|
140
|
+
declare const restoreContentInputSchema: z.ZodObject<{
|
|
141
|
+
id: z.ZodString;
|
|
142
|
+
}, "strip", z.ZodTypeAny, {
|
|
143
|
+
id: string;
|
|
144
|
+
}, {
|
|
145
|
+
id: string;
|
|
146
|
+
}>;
|
|
147
|
+
export type RestoreContentInput = z.infer<typeof restoreContentInputSchema>;
|
|
148
|
+
export declare const restoreContentTool: McpToolDefinition;
|
|
149
|
+
export declare function executeRestoreContent(input: unknown, context: ToolContext): Promise<ToolResult>;
|
|
150
|
+
declare const listTrashInputSchema: z.ZodObject<{
|
|
151
|
+
limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
152
|
+
offset: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
153
|
+
site_id: z.ZodOptional<z.ZodString>;
|
|
154
|
+
}, "strip", z.ZodTypeAny, {
|
|
155
|
+
limit: number;
|
|
156
|
+
offset: number;
|
|
157
|
+
site_id?: string | undefined;
|
|
158
|
+
}, {
|
|
159
|
+
site_id?: string | undefined;
|
|
160
|
+
limit?: number | undefined;
|
|
161
|
+
offset?: number | undefined;
|
|
162
|
+
}>;
|
|
163
|
+
export type ListTrashInput = z.infer<typeof listTrashInputSchema>;
|
|
164
|
+
export declare const listTrashTool: McpToolDefinition;
|
|
165
|
+
export declare function executeListTrash(input: unknown, context: ToolContext): Promise<ToolResult>;
|
|
135
166
|
export declare const contentTools: McpToolDefinition[];
|
|
136
167
|
export declare const contentExecutors: Record<string, (input: unknown, context: ToolContext) => Promise<ToolResult>>;
|
|
137
168
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../src/tools/content.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../src/tools/content.ts"],"names":[],"mappings":"AAAA;;GAEG;AAgEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,UAAU,EAAiC,MAAM,aAAa,CAAC;AA2B7G,QAAA,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;EAO1B,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE,eAAO,MAAM,eAAe,EAAE,iBA8B7B,CAAC;AAEF,wBAAsB,kBAAkB,CACtC,KAAK,EAAE,OAAO,EACd,OAAO,EAAE,WAAW,GACnB,OAAO,CAAC,UAAU,CAAC,CAuErB;AAMD,QAAA,MAAM,qBAAqB;;;;;;;;;EAGzB,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,eAAO,MAAM,cAAc,EAAE,iBAiB5B,CAAC;AA8CF,wBAAsB,iBAAiB,CACrC,KAAK,EAAE,OAAO,EACd,OAAO,EAAE,WAAW,GACnB,OAAO,CAAC,UAAU,CAAC,CA4HrB;AAMD,QAAA,MAAM,0BAA0B;;;;;;;;;EAG9B,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E,eAAO,MAAM,mBAAmB,EAAE,iBAkBjC,CAAC;AAaF,wBAAsB,sBAAsB,CAC1C,KAAK,EAAE,OAAO,EACd,OAAO,EAAE,WAAW,GACnB,OAAO,CAAC,UAAU,CAAC,CAoErB;AAaD,QAAA,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;EAO5B,CAAC;AAEH,MAAM,MAAM,kB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