@posthog/mcp 0.7.0 → 0.8.0

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.
@@ -1 +1 @@
1
- {"version":3,"file":"capture.d.ts","sourceRoot":"","sources":["../../src/extensions/capture.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAMvD;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,aAAa,EAAE,UAAU,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,SAAS,CAoDnG"}
1
+ {"version":3,"file":"capture.d.ts","sourceRoot":"","sources":["../../src/extensions/capture.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAMvD;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,aAAa,EAAE,UAAU,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,SAAS,CA2DnG"}
@@ -64,6 +64,7 @@ function captureEvent(server, eventInput) {
64
64
  userIntentSource: eventInput.userIntentSource,
65
65
  isError: eventInput.isError,
66
66
  error: eventInput.error,
67
+ errorType: eventInput.errorType,
67
68
  conversationId: eventInput.conversationId,
68
69
  properties: eventInput.properties
69
70
  };
@@ -36,6 +36,7 @@ function captureEvent(server, eventInput) {
36
36
  userIntentSource: eventInput.userIntentSource,
37
37
  isError: eventInput.isError,
38
38
  error: eventInput.error,
39
+ errorType: eventInput.errorType,
39
40
  conversationId: eventInput.conversationId,
40
41
  properties: eventInput.properties
41
42
  };
@@ -22,6 +22,8 @@ export declare const PostHogMCPAnalyticsProperty: {
22
22
  readonly ClientVersion: "$mcp_client_version";
23
23
  readonly ConversationId: "$mcp_conversation_id";
24
24
  readonly DurationMs: "$mcp_duration_ms";
25
+ readonly ErrorMessage: "$mcp_error_message";
26
+ readonly ErrorType: "$mcp_error_type";
25
27
  readonly IsError: "$mcp_is_error";
26
28
  readonly Intent: "$mcp_intent";
27
29
  readonly IntentSource: "$mcp_intent_source";
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/extensions/constants.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,6BAA6B,KAAK,CAAA;AAE/C,eAAO,MAAM,qCAAqC,2hBAAyhB,CAAA;AAE3kB,eAAO,MAAM,mCAAmC,4LACsI,CAAA;AAEtL,eAAO,MAAM,4BAA4B,0BAA0B,CAAA;AAMnE,eAAO,MAAM,oBAAoB,qBAAqB,CAAA;AAItD,eAAO,MAAM,wBAAwB;;;;;;;;;;;;CAY3B,CAAA;AAEV,MAAM,MAAM,wBAAwB,GAAG,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,OAAO,wBAAwB,CAAC,CAAA;AAE/G,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;CAmB9B,CAAA;AAEV,MAAM,MAAM,2BAA2B,GAAG,CAAC,OAAO,2BAA2B,CAAC,CAAC,MAAM,OAAO,2BAA2B,CAAC,CAAA"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/extensions/constants.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,6BAA6B,KAAK,CAAA;AAE/C,eAAO,MAAM,qCAAqC,2hBAAyhB,CAAA;AAE3kB,eAAO,MAAM,mCAAmC,4LACsI,CAAA;AAEtL,eAAO,MAAM,4BAA4B,0BAA0B,CAAA;AAMnE,eAAO,MAAM,oBAAoB,qBAAqB,CAAA;AAItD,eAAO,MAAM,wBAAwB;;;;;;;;;;;;CAY3B,CAAA;AAEV,MAAM,MAAM,wBAAwB,GAAG,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,OAAO,wBAAwB,CAAC,CAAA;AAE/G,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;CAqB9B,CAAA;AAEV,MAAM,MAAM,2BAA2B,GAAG,CAAC,OAAO,2BAA2B,CAAC,CAAC,MAAM,OAAO,2BAA2B,CAAC,CAAA"}
@@ -55,6 +55,8 @@ const PostHogMCPAnalyticsProperty = {
55
55
  ClientVersion: '$mcp_client_version',
56
56
  ConversationId: '$mcp_conversation_id',
57
57
  DurationMs: '$mcp_duration_ms',
58
+ ErrorMessage: '$mcp_error_message',
59
+ ErrorType: '$mcp_error_type',
58
60
  IsError: '$mcp_is_error',
59
61
  Intent: '$mcp_intent',
60
62
  IntentSource: '$mcp_intent_source',
@@ -21,6 +21,8 @@ const PostHogMCPAnalyticsProperty = {
21
21
  ClientVersion: '$mcp_client_version',
22
22
  ConversationId: '$mcp_conversation_id',
23
23
  DurationMs: '$mcp_duration_ms',
24
+ ErrorMessage: '$mcp_error_message',
25
+ ErrorType: '$mcp_error_type',
24
26
  IsError: '$mcp_is_error',
25
27
  Intent: '$mcp_intent',
26
28
  IntentSource: '$mcp_intent_source',
@@ -101,6 +101,12 @@ function addCommonEventProperties(event, properties) {
101
101
  if (event.userIntent) properties[external_constants_js_namespaceObject.PostHogMCPAnalyticsProperty.Intent] = event.userIntent;
102
102
  if (event.userIntentSource) properties[external_constants_js_namespaceObject.PostHogMCPAnalyticsProperty.IntentSource] = event.userIntentSource;
103
103
  if (void 0 !== event.isError) properties[external_constants_js_namespaceObject.PostHogMCPAnalyticsProperty.IsError] = event.isError;
104
+ if (event.isError) {
105
+ const firstException = event.error?.$exception_list?.[0];
106
+ const errorType = event.errorType ?? firstException?.type;
107
+ if (errorType) properties[external_constants_js_namespaceObject.PostHogMCPAnalyticsProperty.ErrorType] = errorType;
108
+ if (firstException?.value) properties[external_constants_js_namespaceObject.PostHogMCPAnalyticsProperty.ErrorMessage] = firstException.value;
109
+ }
104
110
  if (void 0 !== event.parameters) properties[external_constants_js_namespaceObject.PostHogMCPAnalyticsProperty.Parameters] = event.parameters;
105
111
  if (void 0 !== event.response) properties[external_constants_js_namespaceObject.PostHogMCPAnalyticsProperty.Response] = event.response;
106
112
  if (event.identifyActorData && Object.keys(event.identifyActorData).length > 0) properties.$set = {
@@ -73,6 +73,12 @@ function addCommonEventProperties(event, properties) {
73
73
  if (event.userIntent) properties[PostHogMCPAnalyticsProperty.Intent] = event.userIntent;
74
74
  if (event.userIntentSource) properties[PostHogMCPAnalyticsProperty.IntentSource] = event.userIntentSource;
75
75
  if (void 0 !== event.isError) properties[PostHogMCPAnalyticsProperty.IsError] = event.isError;
76
+ if (event.isError) {
77
+ const firstException = event.error?.$exception_list?.[0];
78
+ const errorType = event.errorType ?? firstException?.type;
79
+ if (errorType) properties[PostHogMCPAnalyticsProperty.ErrorType] = errorType;
80
+ if (firstException?.value) properties[PostHogMCPAnalyticsProperty.ErrorMessage] = firstException.value;
81
+ }
76
82
  if (void 0 !== event.parameters) properties[PostHogMCPAnalyticsProperty.Parameters] = event.parameters;
77
83
  if (void 0 !== event.response) properties[PostHogMCPAnalyticsProperty.Response] = event.response;
78
84
  if (event.identifyActorData && Object.keys(event.identifyActorData).length > 0) properties.$set = {
@@ -1 +1 @@
1
- {"version":3,"file":"posthog-mcp.d.ts","sourceRoot":"","sources":["../../src/extensions/posthog-mcp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAA;AAE3D,OAAO,KAAK,EACV,qBAAqB,EAIrB,4BAA4B,EAC5B,gBAAgB,EAChB,sBAAsB,EACtB,mBAAmB,EACnB,oBAAoB,EACrB,MAAM,UAAU,CAAA;AACjB,OAAO,EAIL,KAAK,qBAAqB,EAC3B,MAAM,sBAAsB,CAAA;AAQ7B;;;GAGG;AACH,MAAM,WAAW,iBAAkB,SAAQ,cAAc;IACvD;;;;;OAKG;IACH,yBAAyB,CAAC,EAAE,MAAM,CAAA;CACnC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,qBAAa,UAAW,SAAQ,OAAO;;gBAWzB,MAAM,EAAE,MAA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,eAAe,CAAC,IAAI,EAAE,mBAAmB,GAAG,IAAI;IAiBhD,iEAAiE;IACjE,iBAAiB,CAAC,IAAI,EAAE,qBAAqB,GAAG,IAAI;IAUpD;;;;;OAKG;IACH,gBAAgB,CAAC,IAAI,EAAE,oBAAoB,GAAG,IAAI;IAclD;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,eAAe,CAAC,KAAK,SAAS,qBAAqB,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,OAAO,GAAE,sBAA2B,GAAG,KAAK,EAAE;IAYnH;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,gBAAgB;IAW/E;;;;OAIG;IACH,wBAAwB,CAAC,IAAI,EAAE,4BAA4B,GAAG,IAAI;CAkBnE"}
@@ -51,6 +51,7 @@ class PostHogMCP extends external_posthog_node_namespaceObject.PostHog {
51
51
  event.response = data.response;
52
52
  event.duration = data.durationMs;
53
53
  event.isError = data.isError;
54
+ event.errorType = data.errorType;
54
55
  applyIntent(event, data.intent, data.intentSource);
55
56
  if (data.isError) event.error = (0, external_exceptions_js_namespaceObject.captureException)(data.error ?? `Tool ${data.toolName} returned an error`);
56
57
  this.#emit(event);
@@ -71,6 +72,7 @@ class PostHogMCP extends external_posthog_node_namespaceObject.PostHog {
71
72
  event.response = data.response;
72
73
  event.duration = data.durationMs;
73
74
  event.isError = data.isError;
75
+ event.errorType = data.errorType;
74
76
  if (data.isError) event.error = (0, external_exceptions_js_namespaceObject.captureException)(data.error ?? 'tools/list failed');
75
77
  this.#emit(event);
76
78
  }
@@ -23,6 +23,7 @@ class PostHogMCP extends PostHog {
23
23
  event.response = data.response;
24
24
  event.duration = data.durationMs;
25
25
  event.isError = data.isError;
26
+ event.errorType = data.errorType;
26
27
  applyIntent(event, data.intent, data.intentSource);
27
28
  if (data.isError) event.error = captureException(data.error ?? `Tool ${data.toolName} returned an error`);
28
29
  this.#emit(event);
@@ -43,6 +44,7 @@ class PostHogMCP extends PostHog {
43
44
  event.response = data.response;
44
45
  event.duration = data.durationMs;
45
46
  event.isError = data.isError;
47
+ event.errorType = data.errorType;
46
48
  if (data.isError) event.error = captureException(data.error ?? 'tools/list failed');
47
49
  this.#emit(event);
48
50
  }
@@ -1 +1 @@
1
- {"version":3,"file":"truncation.d.ts","sourceRoot":"","sources":["../../src/extensions/truncation.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAmB,KAAK,EAAc,QAAQ,EAAE,MAAM,UAAU,CAAA;AAG5E,eAAO,MAAM,SAAS,KAAK,CAAA;AAC3B,eAAO,MAAM,WAAW,MAAM,CAAA;AAC9B,eAAO,MAAM,iBAAiB,QAAS,CAAA;AACvC,eAAO,MAAM,eAAe,SAAU,CAAA;AAgBtC;;;;;;;;GAQG;AACH,wBAAgB,SAAS,CACvB,KAAK,EAAE,OAAO,EACd,KAAK,GAAE,MAAkB,EACzB,UAAU,GAAE,MAAoB,EAChC,eAAe,GAAE,MAA0B,GAC1C,OAAO,CAGT;AAkXD;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,KAAK,GAAG,QAAQ,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAmCrE"}
1
+ {"version":3,"file":"truncation.d.ts","sourceRoot":"","sources":["../../src/extensions/truncation.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAmB,KAAK,EAAc,QAAQ,EAAE,MAAM,UAAU,CAAA;AAG5E,eAAO,MAAM,SAAS,KAAK,CAAA;AAC3B,eAAO,MAAM,WAAW,MAAM,CAAA;AAC9B,eAAO,MAAM,iBAAiB,QAAS,CAAA;AACvC,eAAO,MAAM,eAAe,SAAU,CAAA;AAgBtC;;;;;;;;GAQG;AACH,wBAAgB,SAAS,CACvB,KAAK,EAAE,OAAO,EACd,KAAK,GAAE,MAAkB,EACzB,UAAU,GAAE,MAAoB,EAChC,eAAe,GAAE,MAA0B,GAC1C,OAAO,CAGT;AAkXD;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,KAAK,GAAG,QAAQ,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAoCrE"}
@@ -250,6 +250,7 @@ function truncateEvent(event) {
250
250
  result.serverVersion = truncateString(result.serverVersion, MAX_METADATA_LENGTH);
251
251
  result.clientName = truncateString(result.clientName, MAX_METADATA_LENGTH);
252
252
  result.clientVersion = truncateString(result.clientVersion, MAX_METADATA_LENGTH);
253
+ result.errorType = truncateString(result.errorType, MAX_METADATA_LENGTH);
253
254
  if (null != result.error && 'object' == typeof result.error) result.error = truncateExceptionList(result.error);
254
255
  result.response = truncateResponseContent(result.response);
255
256
  if (null != result.parameters) result.parameters = normalize(result.parameters);
@@ -217,6 +217,7 @@ function truncateEvent(event) {
217
217
  result.serverVersion = truncateString(result.serverVersion, MAX_METADATA_LENGTH);
218
218
  result.clientName = truncateString(result.clientName, MAX_METADATA_LENGTH);
219
219
  result.clientVersion = truncateString(result.clientVersion, MAX_METADATA_LENGTH);
220
+ result.errorType = truncateString(result.errorType, MAX_METADATA_LENGTH);
220
221
  if (null != result.error && 'object' == typeof result.error) result.error = truncateExceptionList(result.error);
221
222
  result.response = truncateResponseContent(result.response);
222
223
  if (null != result.parameters) result.parameters = normalize(result.parameters);
package/dist/types.d.ts CHANGED
@@ -114,6 +114,13 @@ export interface Event {
114
114
  conversationId?: string;
115
115
  duration?: number;
116
116
  error?: ErrorProperties | null;
117
+ /**
118
+ * Coarse failure category → `$mcp_error_type`. An explicit, low-cardinality
119
+ * label the host can supply (e.g. `validation`, `permission`, `timeout`).
120
+ * When omitted on an errored call, it falls back to the thrown error's type
121
+ * (the `$exception_list` entry's `type`).
122
+ */
123
+ errorType?: string;
117
124
  eventId?: string;
118
125
  eventType: MCPAnalyticsEventType;
119
126
  groups?: Record<string, string>;
@@ -286,6 +293,13 @@ export interface ToolCallCaptureData extends McpCaptureCommon {
286
293
  * synthesized from the tool name.
287
294
  */
288
295
  error?: unknown;
296
+ /**
297
+ * Coarse failure category → `$mcp_error_type` (e.g. `validation`,
298
+ * `permission`, `timeout`, `rate_limited`). A low-cardinality label that lets
299
+ * the dashboard break failures down by reason without joining to `$exception`.
300
+ * When omitted on an error, the SDK falls back to the thrown error's type.
301
+ */
302
+ errorType?: string;
289
303
  }
290
304
  /** Payload for {@link PostHogMCP.captureInitialize}. Emits `$mcp_initialize`. */
291
305
  export interface InitializeCaptureData extends McpCaptureCommon {
@@ -317,6 +331,8 @@ export interface ToolsListCaptureData extends McpCaptureCommon {
317
331
  isError?: boolean;
318
332
  /** The thrown value when `isError` is true → fans out an `$exception` sibling. */
319
333
  error?: unknown;
334
+ /** Coarse failure category → `$mcp_error_type`. Falls back to the thrown error's type. */
335
+ errorType?: string;
320
336
  }
321
337
  /** Options for {@link PostHogMCP.prepareToolList}. */
322
338
  export interface PrepareToolListOptions {
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAA;AACxE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAA;AACrE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AAC1D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAA;AACtE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AACrD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAEnD,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAEhD,+FAA+F;AAC/F,MAAM,MAAM,eAAe,GAAG,aAAa,CAAC,eAAe,CAAA;AAC3D,qEAA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C,EAAE,MAAM,CAAA;IACnB,6DAA6D;IAC7D,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,kFAAkF;IAClF,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,0FAA0F;IAC1F,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,sDAAsD;AACtD,MAAM,WAAW,sBAAsB;IACrC;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,0BAA0B,CAAA;IAC9C;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;AAED;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B,sEAAsE;IACtE,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,4EAA4E;IAC5E,YAAY,CAAC,EAAE,wBAAwB,CAAA;IACvC,uEAAuE;IACvE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC9B,6DAA6D;IAC7D,mBAAmB,EAAE,OAAO,CAAA;CAC7B;AAED,gGAAgG;AAChG,MAAM,WAAW,4BAA6B,SAAQ,gBAAgB;IACpE;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,2EAA2E;IAC3E,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB"}
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const version = "0.7.0";
1
+ export declare const version = "0.8.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/dist/version.js CHANGED
@@ -26,7 +26,7 @@ __webpack_require__.r(__webpack_exports__);
26
26
  __webpack_require__.d(__webpack_exports__, {
27
27
  version: ()=>version
28
28
  });
29
- const version = '0.7.0';
29
+ const version = '0.8.0';
30
30
  exports.version = __webpack_exports__.version;
31
31
  for(var __webpack_i__ in __webpack_exports__)if (-1 === [
32
32
  "version"
package/dist/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- const version = '0.7.0';
1
+ const version = '0.8.0';
2
2
  export { version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@posthog/mcp",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "bugs": {
5
5
  "url": "https://github.com/PostHog/posthog-js/issues"
6
6
  },
@@ -28,7 +28,7 @@
28
28
  "module": "dist/index.mjs",
29
29
  "types": "dist/index.d.ts",
30
30
  "dependencies": {
31
- "@posthog/core": "^1.39.1"
31
+ "@posthog/core": "^1.39.6"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@babel/preset-env": "^7.27.1",
@@ -39,8 +39,8 @@
39
39
  "@types/node": "^20.0.0",
40
40
  "jest": "29.7.0",
41
41
  "zod": "^3.25.0",
42
- "@posthog-tooling/tsconfig-base": "1.1.1",
43
- "posthog-node": "^5.39.0"
42
+ "posthog-node": "^5.39.4",
43
+ "@posthog-tooling/tsconfig-base": "1.1.1"
44
44
  },
45
45
  "peerDependencies": {
46
46
  "@modelcontextprotocol/sdk": ">=1.26.0",
@@ -61,7 +61,14 @@ export function captureEvent(server: MCPServerLike, eventInput: McpEvent): Promi
61
61
  userIntent: eventInput.userIntent,
62
62
  userIntentSource: eventInput.userIntentSource,
63
63
  isError: eventInput.isError,
64
+ // Two consumers of the same failure: `error` is the full thrown value that
65
+ // fans out into the separate `$exception` event (stacktrace, error-tracking
66
+ // grouping), while `errorType` is a coarse category kept on this tool-call
67
+ // event so the dashboard can break failures down by reason without joining
68
+ // to `$exception`. The error message is derived from `error` onto this event
69
+ // downstream in posthog-events.ts.
64
70
  error: eventInput.error,
71
+ errorType: eventInput.errorType,
65
72
  conversationId: eventInput.conversationId,
66
73
  properties: eventInput.properties,
67
74
  }
@@ -40,6 +40,8 @@ export const PostHogMCPAnalyticsProperty = {
40
40
  ClientVersion: '$mcp_client_version',
41
41
  ConversationId: '$mcp_conversation_id',
42
42
  DurationMs: '$mcp_duration_ms',
43
+ ErrorMessage: '$mcp_error_message',
44
+ ErrorType: '$mcp_error_type',
43
45
  IsError: '$mcp_is_error',
44
46
  Intent: '$mcp_intent',
45
47
  IntentSource: '$mcp_intent_source',
@@ -160,6 +160,21 @@ function addCommonEventProperties(event: Event, properties: Record<string, unkno
160
160
  properties[PostHogMCPAnalyticsProperty.IsError] = event.isError
161
161
  }
162
162
 
163
+ if (event.isError) {
164
+ // Surface the failure reason directly on the primary event so the dashboard
165
+ // can break errors down by cause without joining to the `$exception` sibling
166
+ // (which can be disabled, and isn't emitted when no error value is passed).
167
+ const firstException = event.error?.$exception_list?.[0]
168
+ const errorType = event.errorType ?? firstException?.type
169
+ if (errorType) {
170
+ properties[PostHogMCPAnalyticsProperty.ErrorType] = errorType
171
+ }
172
+ if (firstException?.value) {
173
+ // Already bounded to MAX_ERROR_MESSAGE_LENGTH by `truncateExceptionList`.
174
+ properties[PostHogMCPAnalyticsProperty.ErrorMessage] = firstException.value
175
+ }
176
+ }
177
+
163
178
  if (event.parameters !== undefined) {
164
179
  properties[PostHogMCPAnalyticsProperty.Parameters] = event.parameters
165
180
  }
@@ -99,6 +99,7 @@ export class PostHogMCP extends PostHog {
99
99
  event.response = data.response
100
100
  event.duration = data.durationMs
101
101
  event.isError = data.isError
102
+ event.errorType = data.errorType
102
103
  applyIntent(event, data.intent, data.intentSource)
103
104
  if (data.isError) {
104
105
  event.error = captureException(data.error ?? `Tool ${data.toolName} returned an error`)
@@ -130,6 +131,7 @@ export class PostHogMCP extends PostHog {
130
131
  event.response = data.response
131
132
  event.duration = data.durationMs
132
133
  event.isError = data.isError
134
+ event.errorType = data.errorType
133
135
  if (data.isError) {
134
136
  event.error = captureException(data.error ?? 'tools/list failed')
135
137
  }
@@ -429,6 +429,7 @@ export function truncateEvent<T extends Event | McpEvent>(event: T): T {
429
429
  result.serverVersion = truncateString(result.serverVersion, MAX_METADATA_LENGTH)
430
430
  result.clientName = truncateString(result.clientName, MAX_METADATA_LENGTH)
431
431
  result.clientVersion = truncateString(result.clientVersion, MAX_METADATA_LENGTH)
432
+ result.errorType = truncateString(result.errorType, MAX_METADATA_LENGTH)
432
433
 
433
434
  // Error field limits — operate on the core `$exception_list` shape
434
435
  if (result.error != null && typeof result.error === 'object') {
package/src/types.ts CHANGED
@@ -136,6 +136,13 @@ export interface Event {
136
136
  conversationId?: string
137
137
  duration?: number
138
138
  error?: ErrorProperties | null
139
+ /**
140
+ * Coarse failure category → `$mcp_error_type`. An explicit, low-cardinality
141
+ * label the host can supply (e.g. `validation`, `permission`, `timeout`).
142
+ * When omitted on an errored call, it falls back to the thrown error's type
143
+ * (the `$exception_list` entry's `type`).
144
+ */
145
+ errorType?: string
139
146
  eventId?: string
140
147
  eventType: MCPAnalyticsEventType
141
148
  groups?: Record<string, string>
@@ -317,6 +324,13 @@ export interface ToolCallCaptureData extends McpCaptureCommon {
317
324
  * synthesized from the tool name.
318
325
  */
319
326
  error?: unknown
327
+ /**
328
+ * Coarse failure category → `$mcp_error_type` (e.g. `validation`,
329
+ * `permission`, `timeout`, `rate_limited`). A low-cardinality label that lets
330
+ * the dashboard break failures down by reason without joining to `$exception`.
331
+ * When omitted on an error, the SDK falls back to the thrown error's type.
332
+ */
333
+ errorType?: string
320
334
  }
321
335
 
322
336
  /** Payload for {@link PostHogMCP.captureInitialize}. Emits `$mcp_initialize`. */
@@ -350,6 +364,8 @@ export interface ToolsListCaptureData extends McpCaptureCommon {
350
364
  isError?: boolean
351
365
  /** The thrown value when `isError` is true → fans out an `$exception` sibling. */
352
366
  error?: unknown
367
+ /** Coarse failure category → `$mcp_error_type`. Falls back to the thrown error's type. */
368
+ errorType?: string
353
369
  }
354
370
 
355
371
  /** Options for {@link PostHogMCP.prepareToolList}. */
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const version = '0.7.0'
1
+ export const version = '0.8.0'