From 45f700ea1331df7706d05623d6b02d86a66018c7 Mon Sep 17 00:00:00 2001 From: cryo Date: Mon, 30 Jun 2025 19:51:01 +0800 Subject: [PATCH] mcp/client: fix typo in changeAndNotify&ReadResource (#68) This PR updates the comments for func changeAndNotify and ReadResource to correct typos and improve clarity. --- mcp/client.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mcp/client.go b/mcp/client.go index 82fbb01..856df56 100644 --- a/mcp/client.go +++ b/mcp/client.go @@ -191,7 +191,7 @@ func (c *Client) RemoveRoots(uris ...string) { func() bool { return c.roots.remove(uris...) }) } -// changeAndNotifyClient is called when a feature is added or removed. +// changeAndNotify is called when a feature is added or removed. // It calls change, which should do the work and report whether a change actually occurred. // If there was a change, it notifies a snapshot of the sessions. func (c *Client) changeAndNotify(notification string, params Params, change func() bool) { @@ -347,7 +347,7 @@ func (cs *ClientSession) ListResourceTemplates(ctx context.Context, params *List return handleSend[*ListResourceTemplatesResult](ctx, cs, methodListResourceTemplates, orZero[Params](params)) } -// ReadResource ask the server to read a resource and return its contents. +// ReadResource asks the server to read a resource and return its contents. func (cs *ClientSession) ReadResource(ctx context.Context, params *ReadResourceParams) (*ReadResourceResult, error) { return handleSend[*ReadResourceResult](ctx, cs, methodReadResource, orZero[Params](params)) }