@wisewandtools/mcp-server 2.0.16 → 2.0.18
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/index.js +29 -26
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1139,7 +1139,7 @@ var CreateArticleSchema = z2.object({
|
|
|
1139
1139
|
title: z2.string().optional(),
|
|
1140
1140
|
keep_title: boolField,
|
|
1141
1141
|
type: z2.enum(["blog", "affiliation-product-review", "affiliation-compare-products", "affiliation-top-product"]).optional().default("blog"),
|
|
1142
|
-
lang: z2.enum(LANG_ENUM).optional()
|
|
1142
|
+
lang: z2.enum(LANG_ENUM).optional(),
|
|
1143
1143
|
country: z2.enum(COUNTRY_ENUM).optional(),
|
|
1144
1144
|
length: z2.union([z2.number().max(5e3), z2.literal("auto")]).optional().default("auto"),
|
|
1145
1145
|
target_keyword: z2.string().optional(),
|
|
@@ -3460,6 +3460,15 @@ var CategoryPagesToolHandler = class {
|
|
|
3460
3460
|
static {
|
|
3461
3461
|
__name(this, "CategoryPagesToolHandler");
|
|
3462
3462
|
}
|
|
3463
|
+
buildApiInput(validated) {
|
|
3464
|
+
const input = {};
|
|
3465
|
+
Object.keys(validated).forEach((key) => {
|
|
3466
|
+
if (validated[key] !== void 0 && validated[key] !== null) {
|
|
3467
|
+
input[key] = validated[key];
|
|
3468
|
+
}
|
|
3469
|
+
});
|
|
3470
|
+
return input;
|
|
3471
|
+
}
|
|
3463
3472
|
getTools() {
|
|
3464
3473
|
return [
|
|
3465
3474
|
this.createCategoryPageTool(),
|
|
@@ -3483,7 +3492,7 @@ var CategoryPagesToolHandler = class {
|
|
|
3483
3492
|
subject: { type: "string", description: "Category subject/topic", minLength: 1 },
|
|
3484
3493
|
title: { type: "string", description: "Category page title" },
|
|
3485
3494
|
category: { type: "string", description: "Category name/slug" },
|
|
3486
|
-
lang: { type: "string", enum: [...LANG_ENUM2], description: "Language for the category page"
|
|
3495
|
+
lang: { type: "string", enum: [...LANG_ENUM2], description: "Language for the category page" },
|
|
3487
3496
|
country: { type: "string", enum: [...COUNTRY_ENUM2], description: "Target country for localization" },
|
|
3488
3497
|
project_id: { type: "string", format: "uuid", description: "Project UUID" },
|
|
3489
3498
|
persona_id: { type: "string", format: "uuid", description: "Persona UUID" },
|
|
@@ -3508,11 +3517,13 @@ var CategoryPagesToolHandler = class {
|
|
|
3508
3517
|
handler: /* @__PURE__ */ __name(async (args) => {
|
|
3509
3518
|
try {
|
|
3510
3519
|
const validated = CreateCategoryPageSchema.parse(args);
|
|
3511
|
-
const
|
|
3520
|
+
const input = this.buildApiInput(validated);
|
|
3521
|
+
const categoryPage = await this.apiClient.createCategoryPage(input);
|
|
3512
3522
|
await this.cache.set(`category_page:${categoryPage.id}`, categoryPage, 300);
|
|
3513
3523
|
this.metrics.recordAPICall("create_category_page", "success");
|
|
3524
|
+
const displayName = categoryPage.name || validated.name || args.name || "Unnamed";
|
|
3514
3525
|
return {
|
|
3515
|
-
content: [{ type: "text", text: JSON.stringify({ success: true, category_page_id: categoryPage.id, name:
|
|
3526
|
+
content: [{ type: "text", text: JSON.stringify({ success: true, category_page_id: categoryPage.id, name: displayName, message: `Category page "${displayName}" created successfully`, next_steps: [`Use 'generate_category_page' with id: ${categoryPage.id}`, `Use 'get_category_page' with id: ${categoryPage.id}`] }, null, 2) }]
|
|
3516
3527
|
};
|
|
3517
3528
|
} catch (error) {
|
|
3518
3529
|
logger.error("Failed to create category page", { error: error.message });
|
|
@@ -3761,6 +3772,15 @@ var ProductPagesToolHandler = class {
|
|
|
3761
3772
|
static {
|
|
3762
3773
|
__name(this, "ProductPagesToolHandler");
|
|
3763
3774
|
}
|
|
3775
|
+
buildApiInput(validated) {
|
|
3776
|
+
const input = {};
|
|
3777
|
+
Object.keys(validated).forEach((key) => {
|
|
3778
|
+
if (validated[key] !== void 0 && validated[key] !== null) {
|
|
3779
|
+
input[key] = validated[key];
|
|
3780
|
+
}
|
|
3781
|
+
});
|
|
3782
|
+
return input;
|
|
3783
|
+
}
|
|
3764
3784
|
getTools() {
|
|
3765
3785
|
return [
|
|
3766
3786
|
this.createProductPageTool(),
|
|
@@ -3786,7 +3806,7 @@ var ProductPagesToolHandler = class {
|
|
|
3786
3806
|
product_name: { type: "string", description: "Name of the product" },
|
|
3787
3807
|
product_url: { type: "string", format: "uri", description: "URL of the product" },
|
|
3788
3808
|
product_description: { type: "string", description: "Product description" },
|
|
3789
|
-
lang: { type: "string", enum: [...LANG_ENUM3], description: "Language for the product page"
|
|
3809
|
+
lang: { type: "string", enum: [...LANG_ENUM3], description: "Language for the product page" },
|
|
3790
3810
|
country: { type: "string", enum: [...COUNTRY_ENUM3], description: "Target country for localization" },
|
|
3791
3811
|
project_id: { type: "string", format: "uuid", description: "Project UUID" },
|
|
3792
3812
|
persona_id: { type: "string", format: "uuid", description: "Persona UUID" },
|
|
@@ -3811,10 +3831,12 @@ var ProductPagesToolHandler = class {
|
|
|
3811
3831
|
handler: /* @__PURE__ */ __name(async (args) => {
|
|
3812
3832
|
try {
|
|
3813
3833
|
const validated = CreateProductPageSchema.parse(args);
|
|
3814
|
-
const
|
|
3834
|
+
const input = this.buildApiInput(validated);
|
|
3835
|
+
const productPage = await this.apiClient.createProductPage(input);
|
|
3815
3836
|
await this.cache.set(`product_page:${productPage.id}`, productPage, 300);
|
|
3816
3837
|
this.metrics.recordAPICall("create_product_page", "success");
|
|
3817
|
-
|
|
3838
|
+
const displayName = productPage.name || validated.name || args.name || "Unnamed";
|
|
3839
|
+
return { content: [{ type: "text", text: JSON.stringify({ success: true, product_page_id: productPage.id, name: displayName, message: `Product page "${displayName}" created successfully`, next_steps: [`Use 'generate_product_page' with id: ${productPage.id}`, `Use 'get_product_page' with id: ${productPage.id}`] }, null, 2) }] };
|
|
3818
3840
|
} catch (error) {
|
|
3819
3841
|
logger.error("Failed to create product page", { error: error.message });
|
|
3820
3842
|
this.metrics.recordAPICall("create_product_page", "error");
|
|
@@ -5767,25 +5789,6 @@ Here are 5 powerful workflows that Wisewand users love:
|
|
|
5767
5789
|
|
|
5768
5790
|
---
|
|
5769
5791
|
|
|
5770
|
-
### \u{1F504} Workflow 5: Update Old Content
|
|
5771
|
-
|
|
5772
|
-
**Goal:** Refresh 50 old articles with new info
|
|
5773
|
-
|
|
5774
|
-
\`\`\`
|
|
5775
|
-
1. List existing WordPress posts via get_posts
|
|
5776
|
-
2. Use update_post to refresh content:
|
|
5777
|
-
- Add new statistics/data
|
|
5778
|
-
- Update outdated sections
|
|
5779
|
-
- Improve SEO based on current trends
|
|
5780
|
-
3. Batch process with create_bulk_update
|
|
5781
|
-
4. Monitor via get_job_status
|
|
5782
|
-
5. Re-publish updated articles
|
|
5783
|
-
\`\`\`
|
|
5784
|
-
|
|
5785
|
-
**Impact:** Revive organic traffic from existing content
|
|
5786
|
-
|
|
5787
|
-
---
|
|
5788
|
-
|
|
5789
5792
|
**Which workflow matches your use case?** Each can be customized further with personas, custom images, and advanced SEO settings.
|
|
5790
5793
|
|
|
5791
5794
|
Want to learn best practices next?`
|