File tree Expand file tree Collapse file tree 4 files changed +46
-8
lines changed Expand file tree Collapse file tree 4 files changed +46
-8
lines changed Original file line number Diff line number Diff line change @@ -51,11 +51,9 @@ let server = Server(
51
51
name : " MyServer" ,
52
52
version : " 1.0.0" ,
53
53
capabilities : .init (
54
- prompts : .init (),
55
- resources : .init (
56
- subscribe : true
57
- ),
58
- tools : .init ()
54
+ prompts : true ,
55
+ resources : true ,
56
+ tools : true
59
57
)
60
58
)
61
59
Original file line number Diff line number Diff line change @@ -408,3 +408,17 @@ public actor Client {
408
408
return value
409
409
}
410
410
}
411
+
412
+ // MARK: - ExpressibleByBooleanLiteral
413
+
414
+ extension Client . Capabilities . Roots : ExpressibleByBooleanLiteral {
415
+ public init ( booleanLiteral value: Bool ) {
416
+ self . init ( )
417
+ }
418
+ }
419
+
420
+ extension Client . Capabilities . Sampling : ExpressibleByBooleanLiteral {
421
+ public init ( booleanLiteral value: Bool ) {
422
+ self . init ( )
423
+ }
424
+ }
Original file line number Diff line number Diff line change @@ -408,3 +408,29 @@ public actor Server {
408
408
self . isInitialized = true
409
409
}
410
410
}
411
+
412
+ // MARK: - ExpressibleByBooleanLiteral
413
+
414
+ extension Server . Capabilities . Logging : ExpressibleByBooleanLiteral {
415
+ public init ( booleanLiteral value: Bool ) {
416
+ self . init ( )
417
+ }
418
+ }
419
+
420
+ extension Server . Capabilities . Prompts : ExpressibleByBooleanLiteral {
421
+ public init ( booleanLiteral value: Bool ) {
422
+ self . init ( )
423
+ }
424
+ }
425
+
426
+ extension Server . Capabilities . Resources : ExpressibleByBooleanLiteral {
427
+ public init ( booleanLiteral value: Bool ) {
428
+ self . init ( )
429
+ }
430
+ }
431
+
432
+ extension Server . Capabilities . Tools : ExpressibleByBooleanLiteral {
433
+ public init ( booleanLiteral value: Bool ) {
434
+ self . init ( )
435
+ }
436
+ }
Original file line number Diff line number Diff line change @@ -34,9 +34,9 @@ struct RoundtripTests {
34
34
name: " TestServer " ,
35
35
version: " 1.0.0 " ,
36
36
capabilities: . init(
37
- prompts: . init ( ) ,
38
- resources: . init ( ) ,
39
- tools: . init ( )
37
+ prompts: true ,
38
+ resources: true ,
39
+ tools: true
40
40
)
41
41
)
42
42
await server. withMethodHandler ( ListTools . self) { _ in
You can’t perform that action at this time.
0 commit comments