File tree 3 files changed +214
-45
lines changed
3 files changed +214
-45
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,8 @@ import {
29
29
ListToolsResultSchema ,
30
30
EmptyResultSchema ,
31
31
LoggingLevel ,
32
+ ListResourceTemplatesRequest ,
33
+ ListResourceTemplatesResultSchema ,
32
34
} from "../types.js" ;
33
35
34
36
/**
@@ -177,6 +179,17 @@ export class Client<
177
179
) ;
178
180
}
179
181
182
+ async listResourceTemplates (
183
+ params ?: ListResourceTemplatesRequest [ "params" ] ,
184
+ onprogress ?: ProgressCallback ,
185
+ ) {
186
+ return this . request (
187
+ { method : "resources/templates/list" , params } ,
188
+ ListResourceTemplatesResultSchema ,
189
+ onprogress ,
190
+ ) ;
191
+ }
192
+
180
193
async readResource (
181
194
params : ReadResourceRequest [ "params" ] ,
182
195
onprogress ?: ProgressCallback ,
@@ -223,4 +236,8 @@ export class Client<
223
236
onprogress ,
224
237
) ;
225
238
}
239
+
240
+ async sendRootsListChanged ( ) {
241
+ return this . notification ( { method : "notifications/roots/list_changed" } ) ;
242
+ }
226
243
}
Original file line number Diff line number Diff line change @@ -23,6 +23,8 @@ import {
23
23
EmptyResultSchema ,
24
24
LoggingMessageNotification ,
25
25
ResourceUpdatedNotification ,
26
+ ListRootsRequest ,
27
+ ListRootsResultSchema ,
26
28
} from "../types.js" ;
27
29
28
30
/**
@@ -154,6 +156,17 @@ export class Server<
154
156
) ;
155
157
}
156
158
159
+ async listRoots (
160
+ params ?: ListRootsRequest [ "params" ] ,
161
+ onprogress ?: ProgressCallback ,
162
+ ) {
163
+ return this . request (
164
+ { method : "roots/list" , params } ,
165
+ ListRootsResultSchema ,
166
+ onprogress ,
167
+ ) ;
168
+ }
169
+
157
170
async sendLoggingMessage ( params : LoggingMessageNotification [ "params" ] ) {
158
171
return this . notification ( { method : "notifications/message" , params } ) ;
159
172
}
You can’t perform that action at this time.
0 commit comments