Skip to content

Commit ac90e67

Browse files
authored
Make Tool.description optional (#160)
* Make Tool.description optional * Make description parameter in Tool initializer optional
1 parent 78d1877 commit ac90e67

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/MCP/Server/Tools.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public struct Tool: Hashable, Codable, Sendable {
1212
/// The tool name
1313
public let name: String
1414
/// The tool description
15-
public let description: String
15+
public let description: String?
1616
/// The tool input schema
1717
public let inputSchema: Value
1818

@@ -85,7 +85,7 @@ public struct Tool: Hashable, Codable, Sendable {
8585
/// Initialize a tool with a name, description, input schema, and annotations
8686
public init(
8787
name: String,
88-
description: String,
88+
description: String?,
8989
inputSchema: Value,
9090
annotations: Annotations = nil
9191
) {

0 commit comments

Comments
 (0)