@@ -167,8 +167,7 @@ func NewJSONRPCError(
167167 }
168168}
169169
170- // NewProgressNotification
171- // Helper function for creating a progress notification
170+ // NewProgressNotification creates a progress notification.
172171func NewProgressNotification (
173172 token ProgressToken ,
174173 progress float64 ,
@@ -198,8 +197,7 @@ func NewProgressNotification(
198197 return notification
199198}
200199
201- // NewLoggingMessageNotification
202- // Helper function for creating a logging message notification
200+ // NewLoggingMessageNotification creates a logging message notification.
203201func NewLoggingMessageNotification (
204202 level LoggingLevel ,
205203 logger string ,
@@ -221,26 +219,23 @@ func NewLoggingMessageNotification(
221219 }
222220}
223221
224- // NewPromptMessage
225- // Helper function to create a new PromptMessage
222+ // NewPromptMessage creates a prompt message.
226223func NewPromptMessage (role Role , content Content ) PromptMessage {
227224 return PromptMessage {
228225 Role : role ,
229226 Content : content ,
230227 }
231228}
232229
233- // NewTextContent
234- // Helper function to create a new TextContent
230+ // NewTextContent creates text content.
235231func NewTextContent (text string ) TextContent {
236232 return TextContent {
237233 Type : ContentTypeText ,
238234 Text : text ,
239235 }
240236}
241237
242- // NewImageContent
243- // Helper function to create a new ImageContent
238+ // NewImageContent creates image content.
244239func NewImageContent (data , mimeType string ) ImageContent {
245240 return ImageContent {
246241 Type : ContentTypeImage ,
@@ -249,7 +244,7 @@ func NewImageContent(data, mimeType string) ImageContent {
249244 }
250245}
251246
252- // Helper function to create a new AudioContent
247+ // NewAudioContent creates audio content.
253248func NewAudioContent (data , mimeType string ) AudioContent {
254249 return AudioContent {
255250 Type : ContentTypeAudio ,
@@ -258,7 +253,7 @@ func NewAudioContent(data, mimeType string) AudioContent {
258253 }
259254}
260255
261- // Helper function to create a new ResourceLink
256+ // NewResourceLink creates a resource link.
262257func NewResourceLink (uri , name , description , mimeType string ) ResourceLink {
263258 return ResourceLink {
264259 Type : ContentTypeLink ,
@@ -269,7 +264,7 @@ func NewResourceLink(uri, name, description, mimeType string) ResourceLink {
269264 }
270265}
271266
272- // Helper function to create a new EmbeddedResource
267+ // NewEmbeddedResource creates an embedded resource.
273268func NewEmbeddedResource (resource ResourceContents ) EmbeddedResource {
274269 return EmbeddedResource {
275270 Type : ContentTypeResource ,
@@ -551,8 +546,7 @@ func NewInitializeResult(
551546 }
552547}
553548
554- // FormatNumberResult
555- // Helper for formatting numbers in tool results
549+ // FormatNumberResult formats a number as a tool result.
556550func FormatNumberResult (value float64 ) * CallToolResult {
557551 return NewToolResultText (fmt .Sprintf ("%.2f" , value ))
558552}
0 commit comments