@takch02/server-doctor 1.0.2 → 1.0.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/index.js +14 -5
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -41,11 +41,20 @@ async function main() {
|
|
|
41
41
|
for (const tool of tools.tools) {
|
|
42
42
|
// AWS 서버의 도구를 그대로 중계(Forwarding) 등록
|
|
43
43
|
server.tool(tool.name, tool.description, tool.inputSchema, async (args) => {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
44
|
+
|
|
45
|
+
console.error(`[Bridge Debug] Tool: ${tool.name}`);
|
|
46
|
+
console.error(`[Bridge Debug] RawArgs:`, JSON.stringify(rawArgs));
|
|
47
|
+
|
|
48
|
+
let realArgs = rawArgs;
|
|
49
|
+
|
|
50
|
+
if (rawArgs && (rawArgs.signal || rawArgs.requestId)) {
|
|
51
|
+
console.error("⚠️ 인자 위치 오류 감지! 메타데이터가 args로 들어왔습니다.");
|
|
52
|
+
realArgs = {};
|
|
53
|
+
}
|
|
54
|
+
const result = await client.callTool({
|
|
55
|
+
name: tool.name,
|
|
56
|
+
arguments: realArgs, // 정제된 인자 전송
|
|
57
|
+
});
|
|
49
58
|
return result;
|
|
50
59
|
});
|
|
51
60
|
}
|