@wisewandtools/mcp-server 2.0.18 → 2.0.19

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 CHANGED
@@ -370,6 +370,14 @@ var WisewandAPIClient = class {
370
370
  return this.request("POST", "/v1/articles/cost", input);
371
371
  }
372
372
  async createBulkArticles(articles) {
373
+ logger.info("BULK CREATE DEBUG - API Client sending:", {
374
+ articles_type: typeof articles,
375
+ is_array: Array.isArray(articles),
376
+ articles_length: Array.isArray(articles) ? articles.length : "N/A",
377
+ wrapped_format: { articles },
378
+ wrapped_type: typeof { articles },
379
+ wrapped_stringified: JSON.stringify({ articles }).substring(0, 200)
380
+ });
373
381
  return this.request("POST", "/v1/articles/bulk", { articles });
374
382
  }
375
383
  async calculateBulkCost(articles) {
@@ -1764,7 +1772,7 @@ var ArticleToolHandler = class {
1764
1772
  try {
1765
1773
  const cost = await this.apiClient.calculateArticleCost(args);
1766
1774
  this.metrics.recordAPICall("estimate_cost", "success");
1767
- return { content: [{ type: "text", text: JSON.stringify({ success: true, cost_estimate: cost, message: `Estimated cost: ${cost.credits} credits ($${cost.cost_usd})` }, null, 2) }] };
1775
+ return { content: [{ type: "text", text: JSON.stringify({ success: true, cost_estimate: cost, message: `Estimated cost: ${cost.credits} credits ($${cost.cost})` }, null, 2) }] };
1768
1776
  } catch (error) {
1769
1777
  logger.error("Failed to estimate cost", { error: error.message });
1770
1778
  this.metrics.recordAPICall("estimate_cost", "error");
@@ -2760,6 +2768,14 @@ var BulkOperationsToolHandler = class {
2760
2768
  handler: /* @__PURE__ */ __name(async (args) => {
2761
2769
  try {
2762
2770
  const { articles, auto_generate = false } = args;
2771
+ logger.info("BULK CREATE DEBUG - Handler received:", {
2772
+ articles_type: typeof articles,
2773
+ is_array: Array.isArray(articles),
2774
+ articles_length: Array.isArray(articles) ? articles.length : "N/A",
2775
+ articles_stringified: typeof articles === "string",
2776
+ first_article: Array.isArray(articles) && articles.length > 0 ? articles[0] : null,
2777
+ auto_generate
2778
+ });
2763
2779
  logger.info("Starting bulk article creation", { count: articles.length });
2764
2780
  const createResult = await this.apiClient.createBulkArticles(articles);
2765
2781
  const results = {