@@ -55,6 +55,18 @@ type ServerBootClassification = {
55
55
serverVersion : { classification : 'SystemMetaData' ; purpose : 'FeatureInsight' ; comment : 'The version of the MCP server' } ;
56
56
} ;
57
57
58
+ type ElicitationTelemetryData = {
59
+ serverName : string ;
60
+ serverVersion : string ;
61
+ } ;
62
+
63
+ type ElicitationTelemetryClassification = {
64
+ owner : 'connor4312' ;
65
+ comment : 'Triggered when elictation is requested' ;
66
+ serverName : { classification : 'SystemMetaData' ; purpose : 'FeatureInsight' ; comment : 'The name of the MCP server' } ;
67
+ serverVersion : { classification : 'SystemMetaData' ; purpose : 'FeatureInsight' ; comment : 'The version of the MCP server' } ;
68
+ } ;
69
+
58
70
type ServerBootState = {
59
71
state : string ;
60
72
time : number ;
@@ -477,8 +489,17 @@ export class McpServer extends Disposable implements IMcpServer {
477
489
server : this ,
478
490
params,
479
491
} ) . then ( r => r . sample ) ,
480
- elicitationRequestHandler : req => this . _elicitationService . elicit (
481
- this , Iterable . first ( this . runningToolCalls ) , req , CancellationToken . None ) ,
492
+ elicitationRequestHandler : req => {
493
+ const serverInfo = connection . handler . get ( ) ?. serverInfo ;
494
+ if ( serverInfo ) {
495
+ this . _telemetryService . publicLog2 < ElicitationTelemetryData , ElicitationTelemetryClassification > ( 'mcp.elicitationRequested' , {
496
+ serverName : serverInfo . name ,
497
+ serverVersion : serverInfo . version ,
498
+ } ) ;
499
+ }
500
+
501
+ return this . _elicitationService . elicit ( this , Iterable . first ( this . runningToolCalls ) , req , CancellationToken . None ) ;
502
+ }
482
503
} ) ;
483
504
484
505
this . _telemetryService . publicLog2 < ServerBootState , ServerBootStateClassification > ( 'mcp/serverBootState' , {
@@ -670,6 +691,7 @@ class McpPrompt implements IMcpPrompt {
670
691
readonly id : string ;
671
692
readonly name : string ;
672
693
readonly description ?: string ;
694
+ readonly title ?: string ;
673
695
readonly arguments : readonly MCP . PromptArgument [ ] ;
674
696
675
697
constructor (
@@ -678,6 +700,7 @@ class McpPrompt implements IMcpPrompt {
678
700
) {
679
701
this . id = mcpPromptReplaceSpecialChars ( this . _server . definition . label + '.' + _definition . name ) ;
680
702
this . name = _definition . name ;
703
+ this . title = _definition . title ;
681
704
this . description = _definition . description ;
682
705
this . arguments = _definition . arguments || [ ] ;
683
706
}
@@ -824,18 +847,20 @@ function warnInvalidTools(instaService: IInstantiationService, serverName: strin
824
847
}
825
848
826
849
class McpResource implements IMcpResource {
827
- uri : URI ;
828
- mcpUri : string ;
829
- name : string ;
830
- description : string | undefined ;
831
- mimeType : string | undefined ;
832
- sizeInBytes : number | undefined ;
850
+ readonly uri : URI ;
851
+ readonly mcpUri : string ;
852
+ readonly name : string ;
853
+ readonly description : string | undefined ;
854
+ readonly mimeType : string | undefined ;
855
+ readonly sizeInBytes : number | undefined ;
856
+ readonly title : string | undefined ;
833
857
834
858
constructor (
835
859
server : McpServer ,
836
860
original : MCP . Resource ,
837
861
) {
838
862
this . mcpUri = original . uri ;
863
+ this . title = original . title ;
839
864
this . uri = McpResourceURI . fromServer ( server . definition , original . uri ) ;
840
865
this . name = original . name ;
841
866
this . description = original . description ;
@@ -846,6 +871,7 @@ class McpResource implements IMcpResource {
846
871
847
872
class McpResourceTemplate implements IMcpResourceTemplate {
848
873
readonly name : string ;
874
+ readonly title ?: string | undefined ;
849
875
readonly description ?: string ;
850
876
readonly mimeType ?: string ;
851
877
readonly template : UriTemplate ;
@@ -857,6 +883,7 @@ class McpResourceTemplate implements IMcpResourceTemplate {
857
883
this . name = _definition . name ;
858
884
this . description = _definition . description ;
859
885
this . mimeType = _definition . mimeType ;
886
+ this . title = _definition . title ;
860
887
this . template = UriTemplate . parse ( _definition . uriTemplate ) ;
861
888
}
862
889
0 commit comments