@agent-inspect/mcp 6.7.1 → 6.7.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/README.md CHANGED
@@ -2,6 +2,9 @@
2
2
 
3
3
  MCP **client** tool-call tracing for AgentInspect (list/call lifecycle).
4
4
 
5
+
6
+ **Support level:** Supported — see [SUPPORT-LEVELS.md](https://github.com/rajudandigam/agent-inspect/blob/main/docs/SUPPORT-LEVELS.md).
7
+
5
8
  ## When to use
6
9
 
7
10
  - Your agent uses an MCP client and you need local tool-call steps
@@ -48,9 +51,10 @@ await traced.callTool({ name: "search", arguments: {} });
48
51
 
49
52
  - **Missing list_tools steps:** Ensure client goes through wrapped instance
50
53
 
54
+
51
55
  ## Version
52
56
 
53
- `agent-inspect@3.5.x`
57
+ Part of the fixed AgentInspect release line. See the npm badge / package manifest for the current version.
54
58
 
55
59
  ## License
56
60
 
package/dist/index.cjs CHANGED
@@ -17,16 +17,24 @@ var chalk__default = /*#__PURE__*/_interopDefault(chalk);
17
17
 
18
18
  // packages/mcp/src/summarize.ts
19
19
  var DEFAULT_MAX_SUMMARY_LENGTH = 240;
20
+ function fallbackString(value) {
21
+ try {
22
+ return String(value);
23
+ } catch {
24
+ return "[unserializable]";
25
+ }
26
+ }
20
27
  function summarizeMcpValue(value, maxLength = DEFAULT_MAX_SUMMARY_LENGTH) {
21
28
  let text;
22
29
  try {
23
30
  if (typeof value === "string") {
24
31
  text = value;
25
32
  } else {
26
- text = JSON.stringify(value);
33
+ const serialized = JSON.stringify(value);
34
+ text = serialized === void 0 ? fallbackString(value) : serialized;
27
35
  }
28
36
  } catch {
29
- text = String(value);
37
+ text = fallbackString(value);
30
38
  }
31
39
  if (text.length <= maxLength) return text;
32
40
  return `${text.slice(0, Math.max(0, maxLength - 3))}...`;