From ac90e679cd201813208272281b9041da5c69e5f8 Mon Sep 17 00:00:00 2001 From: Mattt Date: Sun, 7 Sep 2025 04:24:38 -0700 Subject: [PATCH] Make `Tool.description` optional (#160) * Make Tool.description optional * Make description parameter in Tool initializer optional --- Sources/MCP/Server/Tools.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/MCP/Server/Tools.swift b/Sources/MCP/Server/Tools.swift index edfe112..d5ee9bb 100644 --- a/Sources/MCP/Server/Tools.swift +++ b/Sources/MCP/Server/Tools.swift @@ -12,7 +12,7 @@ public struct Tool: Hashable, Codable, Sendable { /// The tool name public let name: String /// The tool description - public let description: String + public let description: String? /// The tool input schema public let inputSchema: Value @@ -85,7 +85,7 @@ public struct Tool: Hashable, Codable, Sendable { /// Initialize a tool with a name, description, input schema, and annotations public init( name: String, - description: String, + description: String?, inputSchema: Value, annotations: Annotations = nil ) {