Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,11 @@ let server = Server(
name: "MyServer",
version: "1.0.0",
capabilities: .init(
prompts: true,
resources: true,
tools: true
prompts: .init(),
resources: .init(
subscribe: true
),
tools: .init()
)
)

Expand Down
14 changes: 0 additions & 14 deletions Sources/MCP/Client/Client.swift
Original file line number Diff line number Diff line change
Expand Up @@ -423,17 +423,3 @@ public actor Client {
return value
}
}

// MARK: - ExpressibleByBooleanLiteral

extension Client.Capabilities.Roots: ExpressibleByBooleanLiteral {
public init(booleanLiteral value: Bool) {
self.init()
}
}

extension Client.Capabilities.Sampling: ExpressibleByBooleanLiteral {
public init(booleanLiteral value: Bool) {
self.init()
}
}
26 changes: 0 additions & 26 deletions Sources/MCP/Server/Server.swift
Original file line number Diff line number Diff line change
Expand Up @@ -408,29 +408,3 @@ public actor Server {
self.isInitialized = true
}
}

// MARK: - ExpressibleByBooleanLiteral

extension Server.Capabilities.Logging: ExpressibleByBooleanLiteral {
public init(booleanLiteral value: Bool) {
self.init()
}
}

extension Server.Capabilities.Prompts: ExpressibleByBooleanLiteral {
public init(booleanLiteral value: Bool) {
self.init()
}
}

extension Server.Capabilities.Resources: ExpressibleByBooleanLiteral {
public init(booleanLiteral value: Bool) {
self.init()
}
}

extension Server.Capabilities.Tools: ExpressibleByBooleanLiteral {
public init(booleanLiteral value: Bool) {
self.init()
}
}
6 changes: 3 additions & 3 deletions Tests/MCPTests/RoundtripTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ struct RoundtripTests {
name: "TestServer",
version: "1.0.0",
capabilities: .init(
prompts: true,
resources: true,
tools: true
prompts: .init(),
resources: .init(),
tools: .init()
)
)
await server.withMethodHandler(ListTools.self) { _ in
Expand Down