@wisewandtools/mcp-server 2.0.10 → 2.0.11
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 +50 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -289,6 +289,21 @@ var WisewandAPIClient = class {
|
|
|
289
289
|
}, this.config.timeout);
|
|
290
290
|
try {
|
|
291
291
|
const bodyJSON = body ? JSON.stringify(body) : void 0;
|
|
292
|
+
console.error("=".repeat(80));
|
|
293
|
+
console.error("HTTP REQUEST - EXACT PAYLOAD");
|
|
294
|
+
console.error("=".repeat(80));
|
|
295
|
+
console.error("Method:", method);
|
|
296
|
+
console.error("URL:", url);
|
|
297
|
+
console.error("Body JSON:", bodyJSON);
|
|
298
|
+
console.error(
|
|
299
|
+
"Body includes apply_project_brief_config:",
|
|
300
|
+
bodyJSON?.includes("apply_project_brief_config")
|
|
301
|
+
);
|
|
302
|
+
if (bodyJSON && bodyJSON.includes("apply_project_brief_config")) {
|
|
303
|
+
const match = bodyJSON.match(/"apply_project_brief_config":\s*(\w+)/);
|
|
304
|
+
console.error("apply_project_brief_config value in JSON:", match ? match[1] : "NOT FOUND");
|
|
305
|
+
}
|
|
306
|
+
console.error("");
|
|
292
307
|
logger.info("API HTTP REQUEST - EXACT JSON", {
|
|
293
308
|
method,
|
|
294
309
|
endpoint,
|
|
@@ -504,6 +519,13 @@ var WisewandAPIClient = class {
|
|
|
504
519
|
}
|
|
505
520
|
// ============= Content Discovery =============
|
|
506
521
|
async discoverArticles(input) {
|
|
522
|
+
console.error("=".repeat(80));
|
|
523
|
+
console.error("API CLIENT - DISCOVER ARTICLES");
|
|
524
|
+
console.error("=".repeat(80));
|
|
525
|
+
console.error("Input payload:", JSON.stringify(input, null, 2));
|
|
526
|
+
console.error("apply_project_brief_config present:", "apply_project_brief_config" in input);
|
|
527
|
+
console.error("apply_project_brief_config value:", input.apply_project_brief_config);
|
|
528
|
+
console.error("");
|
|
507
529
|
logger.info("API Client discoverArticles - INPUT TO API", {
|
|
508
530
|
input_keys: Object.keys(input),
|
|
509
531
|
has_apply_project_brief_config: "apply_project_brief_config" in input,
|
|
@@ -4099,12 +4121,28 @@ var DiscoverToolHandler = class {
|
|
|
4099
4121
|
},
|
|
4100
4122
|
handler: /* @__PURE__ */ __name(async (args) => {
|
|
4101
4123
|
try {
|
|
4124
|
+
console.error("=".repeat(80));
|
|
4125
|
+
console.error("MCP DISCOVER_CONTENT - STAGE 1: RAW INPUT");
|
|
4126
|
+
console.error("=".repeat(80));
|
|
4127
|
+
console.error("Raw args:", JSON.stringify(args, null, 2));
|
|
4128
|
+
console.error("apply_project_brief_config present:", "apply_project_brief_config" in args);
|
|
4129
|
+
console.error("apply_project_brief_config value:", args.apply_project_brief_config);
|
|
4130
|
+
console.error("apply_project_brief_config type:", typeof args.apply_project_brief_config);
|
|
4131
|
+
console.error("");
|
|
4102
4132
|
logger.info("discover_content RAW INPUT", {
|
|
4103
4133
|
raw_args: args,
|
|
4104
4134
|
apply_project_brief_config_raw: args.apply_project_brief_config,
|
|
4105
4135
|
apply_project_brief_config_raw_type: typeof args.apply_project_brief_config
|
|
4106
4136
|
});
|
|
4107
4137
|
const validated = DiscoverContentSchema.parse(args);
|
|
4138
|
+
console.error("=".repeat(80));
|
|
4139
|
+
console.error("MCP DISCOVER_CONTENT - STAGE 2: AFTER VALIDATION");
|
|
4140
|
+
console.error("=".repeat(80));
|
|
4141
|
+
console.error("Validated:", JSON.stringify(validated, null, 2));
|
|
4142
|
+
console.error("apply_project_brief_config present:", "apply_project_brief_config" in validated);
|
|
4143
|
+
console.error("apply_project_brief_config value:", validated.apply_project_brief_config);
|
|
4144
|
+
console.error("apply_project_brief_config type:", typeof validated.apply_project_brief_config);
|
|
4145
|
+
console.error("");
|
|
4108
4146
|
logger.info("discover_content VALIDATED (after boolField transform)", {
|
|
4109
4147
|
apply_project_brief_config: validated.apply_project_brief_config,
|
|
4110
4148
|
apply_project_brief_config_type: typeof validated.apply_project_brief_config,
|
|
@@ -4117,6 +4155,13 @@ var DiscoverToolHandler = class {
|
|
|
4117
4155
|
cleanedInput[key] = value;
|
|
4118
4156
|
}
|
|
4119
4157
|
}
|
|
4158
|
+
console.error("=".repeat(80));
|
|
4159
|
+
console.error("MCP DISCOVER_CONTENT - STAGE 3: CLEANED INPUT");
|
|
4160
|
+
console.error("=".repeat(80));
|
|
4161
|
+
console.error("Cleaned input:", JSON.stringify(cleanedInput, null, 2));
|
|
4162
|
+
console.error("apply_project_brief_config present:", "apply_project_brief_config" in cleanedInput);
|
|
4163
|
+
console.error("apply_project_brief_config value:", cleanedInput.apply_project_brief_config);
|
|
4164
|
+
console.error("");
|
|
4120
4165
|
logger.info("discover_content CLEANED INPUT (undefined removed)", {
|
|
4121
4166
|
before_cleaning_keys: Object.keys(validated).length,
|
|
4122
4167
|
after_cleaning_keys: Object.keys(cleanedInput).length,
|
|
@@ -4124,6 +4169,11 @@ var DiscoverToolHandler = class {
|
|
|
4124
4169
|
apply_project_brief_config_value: cleanedInput.apply_project_brief_config
|
|
4125
4170
|
});
|
|
4126
4171
|
const discovery = await this.apiClient.discoverArticles(cleanedInput);
|
|
4172
|
+
console.error("=".repeat(80));
|
|
4173
|
+
console.error("MCP DISCOVER_CONTENT - STAGE 4: API RESPONSE");
|
|
4174
|
+
console.error("=".repeat(80));
|
|
4175
|
+
console.error("Discovery ID:", discovery.id);
|
|
4176
|
+
console.error("");
|
|
4127
4177
|
await this.cache.set(`discover:${discovery.id}`, discovery, 300);
|
|
4128
4178
|
this.metrics.recordAPICall("discover_content", "success");
|
|
4129
4179
|
return {
|