@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.
Files changed (2) hide show
  1. package/index.js +14 -5
  2. 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
- // Claude가 호출하면 -> AWS 서버로 전달
45
- const result = await client.callTool({
46
- name: tool.name,
47
- arguments: args,
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@takch02/server-doctor",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "type": "module",
5
5
  "description": "",
6
6
  "main": "index.js",