You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rate limiting can be configured using middleware. Please see [examples/rate-limiting](<https://github.com/modelcontextprotocol/go-sdk/tree/main/examples/rate-limiting>] for an example on how to implement this.
474
+
Rate limiting can be configured using middleware. Please see [examples/rate-limiting](<https://github.com/modelcontextprotocol/go-sdk/tree/main/examples/rate-limiting>) for an example on how to implement this.
475
475
476
476
### Errors
477
477
@@ -609,7 +609,7 @@ A tool handler accepts `CallToolParams` and returns a `CallToolResult`. However,
609
609
```go
610
610
type CallToolParamsFor[In any] struct {
611
611
Meta Meta `json:"_meta,omitempty"`
612
-
Arguments In `json:"arguments,omitempty"`
612
+
Arguments In `json:"arguments,omitempty"`
613
613
Name string`json:"name"`
614
614
}
615
615
@@ -748,13 +748,26 @@ Server sessions also support the spec methods `ListResources` and `ListResourceT
748
748
749
749
#### Subscriptions
750
750
751
-
ClientSessions can manage change notifications on particular resources:
751
+
##### Client-Side Usage
752
+
753
+
Use the Subscribe and Unsubscribe methods on a ClientSession to start or stop receiving updates for a specific resource.
To process incoming update notifications, you must provide a ResourceUpdatedHandler in your ClientOptions. The SDK calls this function automatically whenever the server sends a notification for a resource you're subscribed to.
The server does not implement resource subscriptions. It passes along subscription requests to the user, and supplies a method to notify clients of changes. It tracks which sessions have subscribed to which resources so the user doesn't have to.
759
772
760
773
If a server author wants to support resource subscriptions, they must provide handlers to be called when clients subscribe and unsubscribe. It is an error to provide only one of these handlers.
@@ -772,7 +785,7 @@ type ServerOptions struct {
772
785
User code should call `ResourceUpdated` when a subscribed resource changes.
0 commit comments