@intangle/mcp-server 1.1.3 → 1.1.4

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 (3) hide show
  1. package/dist/index.js +10 -1
  2. package/index.ts +10 -1
  3. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -952,8 +952,17 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
952
952
  default:
953
953
  throw new McpError(ErrorCode.MethodNotFound, `Unknown tool: ${name}`);
954
954
  }
955
+ // Extract response field for Layer 2 compressed tools, otherwise stringify full result
956
+ let responseText;
957
+ if (result && typeof result === 'object' && 'response' in result && typeof result.response === 'string') {
958
+ // Tool has Layer 2 compression - use the formatted response field
959
+ responseText = result.response;
960
+ }
961
+ else {
962
+ // Standard tool - return full JSON
963
+ responseText = JSON.stringify(result, null, 2);
964
+ }
955
965
  // Add version warning to response if outdated
956
- let responseText = JSON.stringify(result, null, 2);
957
966
  if (latestVersion && latestVersion !== CURRENT_VERSION) {
958
967
  const warning = `\n\n⚠️ UPDATE AVAILABLE: MCP Server v${latestVersion} is available (you're on v${CURRENT_VERSION}). Update with: npx @intangle/mcp-server@latest`;
959
968
  responseText += warning;
package/index.ts CHANGED
@@ -1090,8 +1090,17 @@ server.setRequestHandler(CallToolRequestSchema, async (request: any) => {
1090
1090
  throw new McpError(ErrorCode.MethodNotFound, `Unknown tool: ${name}`);
1091
1091
  }
1092
1092
 
1093
+ // Extract response field for Layer 2 compressed tools, otherwise stringify full result
1094
+ let responseText: string;
1095
+ if (result && typeof result === 'object' && 'response' in result && typeof result.response === 'string') {
1096
+ // Tool has Layer 2 compression - use the formatted response field
1097
+ responseText = result.response;
1098
+ } else {
1099
+ // Standard tool - return full JSON
1100
+ responseText = JSON.stringify(result, null, 2);
1101
+ }
1102
+
1093
1103
  // Add version warning to response if outdated
1094
- let responseText = JSON.stringify(result, null, 2);
1095
1104
  if (latestVersion && latestVersion !== CURRENT_VERSION) {
1096
1105
  const warning = `\n\n⚠️ UPDATE AVAILABLE: MCP Server v${latestVersion} is available (you're on v${CURRENT_VERSION}). Update with: npx @intangle/mcp-server@latest`;
1097
1106
  responseText += warning;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intangle/mcp-server",
3
- "version": "1.1.3",
3
+ "version": "1.1.4",
4
4
  "description": "Model Context Protocol server for Intangle - AI memory that persists across conversations",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",