@@ -109,10 +109,10 @@ func Example_prompts() {
109109
110110## Resources
111111
112- In MCP terms, a _ resource_ is some data selected by a URI.
112+ In MCP terms, a _ resource_ is some data referenced by a URI.
113113MCP servers can serve resources to clients.
114- Resource templates use a URI pattern to describe a collection of resources.
115- Servers register resources and resource templates, and clients can list and read them .
114+ They can register resources individually, or register a _ resource template _
115+ that uses a URI pattern to describe a collection of resources .
116116
117117** Server-side** :
118118Servers use
@@ -126,16 +126,15 @@ If all resources or resource templates are to be added after connection, set
126126[ ` ServerOptions.HasResources ` ] ( https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk/mcp#ServerOptions.HasResources )
127127to advertise the capability.
128128
129- TODO: list changed, subscriptions
130-
131129A
132130[ ` ResourceHandler ` ] ( https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk/mcp#ResourceHandler )
133131maps a URI to the contents of a resource, which can include text, binary data,
134132or both.
135133
136134
137135** Client-side** :
138- [ ` ClientSession.ReadResource ` ] ( https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk/mcp#ClientSession.ReadResource )
136+ Call [ ` ClientSession.ReadResource ` ] ( https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk/mcp#ClientSession.ReadResource )
137+ to read a resource.
139138The SDK ensures that a read succeeds only if the URI matches a registered resource exactly,
140139or matches the URI pattern of a resource template.
141140
148147[ ` ClientOptions.ResourceListChangedHandler ` ] ( https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk/mcp#ClientOptions.ResourceListChangedHandler )
149148to be notified of changes in the lists of resources or resource templates.
150149
151- Clients can be notified when the contents of a resource changes by subscribing to the resource.
150+ Clients can be notified when the contents of a resource changes by subscribing to the resource's URI .
152151Call
153152[ ` ClientSession.Subscribe ` ] ( https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk/mcp#ClientSession.Subscribe )
154153to subscribe to a resource
0 commit comments