Skip to content

Commit 22308c4

Browse files
committed
fix
1 parent be5ae01 commit 22308c4

File tree

2 files changed

+12
-14
lines changed

2 files changed

+12
-14
lines changed

docs/server.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -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.
113113
MCP 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**:
118118
Servers 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)
127127
to advertise the capability.
128128

129-
TODO: list changed, subscriptions
130-
131129
A
132130
[`ResourceHandler`](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk/mcp#ResourceHandler)
133131
maps a URI to the contents of a resource, which can include text, binary data,
134132
or 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.
139138
The SDK ensures that a read succeeds only if the URI matches a registered resource exactly,
140139
or matches the URI pattern of a resource template.
141140

@@ -148,7 +147,7 @@ Set
148147
[`ClientOptions.ResourceListChangedHandler`](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk/mcp#ClientOptions.ResourceListChangedHandler)
149148
to 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.
152151
Call
153152
[`ClientSession.Subscribe`](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk/mcp#ClientSession.Subscribe)
154153
to subscribe to a resource

internal/docs/server.src.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ notification.
3535

3636
## Resources
3737

38-
In MCP terms, a _resource_ is some data selected by a URI.
38+
In MCP terms, a _resource_ is some data referenced by a URI.
3939
MCP servers can serve resources to clients.
40-
Resource templates use a URI pattern to describe a collection of resources.
41-
Servers register resources and resource templates, and clients can list and read them.
40+
They can register resources individually, or register a _resource template_
41+
that uses a URI pattern to describe a collection of resources.
4242

4343
**Server-side**:
4444
Servers use
@@ -52,16 +52,15 @@ If all resources or resource templates are to be added after connection, set
5252
[`ServerOptions.HasResources`](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk/mcp#ServerOptions.HasResources)
5353
to advertise the capability.
5454

55-
TODO: list changed, subscriptions
56-
5755
A
5856
[`ResourceHandler`](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk/mcp#ResourceHandler)
5957
maps a URI to the contents of a resource, which can include text, binary data,
6058
or both.
6159

6260

6361
**Client-side**:
64-
[`ClientSession.ReadResource`](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk/mcp#ClientSession.ReadResource)
62+
Call [`ClientSession.ReadResource`](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk/mcp#ClientSession.ReadResource)
63+
to read a resource.
6564
The SDK ensures that a read succeeds only if the URI matches a registered resource exactly,
6665
or matches the URI pattern of a resource template.
6766

@@ -74,7 +73,7 @@ Set
7473
[`ClientOptions.ResourceListChangedHandler`](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk/mcp#ClientOptions.ResourceListChangedHandler)
7574
to be notified of changes in the lists of resources or resource templates.
7675

77-
Clients can be notified when the contents of a resource changes by subscribing to the resource.
76+
Clients can be notified when the contents of a resource changes by subscribing to the resource's URI.
7877
Call
7978
[`ClientSession.Subscribe`](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk/mcp#ClientSession.Subscribe)
8079
to subscribe to a resource

0 commit comments

Comments
 (0)