@salesforce/mcp 0.26.11-qa.0 → 0.26.11

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.
@@ -97,6 +97,11 @@ export class SfMcpServer extends McpServer {
97
97
  // https://modelcontextprotocol.io/specification/2025-06-18/schema#calltoolresult
98
98
  isError: result.isError ?? false,
99
99
  });
100
+ this.telemetry?.sendPdpEvent({
101
+ eventName: 'salesforceMcp.executed',
102
+ productFeatureId: 'aJCEE0000007Uiv4AE', // DX MCP Server
103
+ componentId: name, // MCP tool name
104
+ });
100
105
  return result;
101
106
  };
102
107
  const tool = super.registerTool(name, config, wrappedCb);
@@ -1,4 +1,4 @@
1
- import { Attributes } from '@salesforce/telemetry';
1
+ import { Attributes, PdpEvent } from '@salesforce/telemetry';
2
2
  import { Config } from '@oclif/core';
3
3
  import { TelemetryService } from '@salesforce/mcp-provider-api/src/index.js';
4
4
  export declare class Telemetry implements TelemetryService {
@@ -18,6 +18,7 @@ export declare class Telemetry implements TelemetryService {
18
18
  constructor(config: Config, attributes?: Attributes);
19
19
  addAttributes(attributes: Attributes): void;
20
20
  sendEvent(eventName: string, attributes?: Attributes): void;
21
+ sendPdpEvent(event: PdpEvent): void;
21
22
  start(): Promise<void>;
22
23
  stop(): void;
23
24
  }
package/lib/telemetry.js CHANGED
@@ -126,7 +126,15 @@ export class Telemetry {
126
126
  });
127
127
  }
128
128
  catch {
129
- /* empty */
129
+ /* intentionally empty */
130
+ }
131
+ }
132
+ sendPdpEvent(event) {
133
+ try {
134
+ this.reporter?.sendPdpEvent(event);
135
+ }
136
+ catch {
137
+ /* intentionally empty */
130
138
  }
131
139
  }
132
140
  async start() {