File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -138,6 +138,7 @@ func (s *MCPServer) SendNotificationToClient(
138
138
139
139
// serverCapabilities defines the supported features of the MCP server
140
140
type serverCapabilities struct {
141
+ tools * toolCapabilities
141
142
resources * resourceCapabilities
142
143
prompts * promptCapabilities
143
144
logging bool
@@ -154,6 +155,11 @@ type promptCapabilities struct {
154
155
listChanged bool
155
156
}
156
157
158
+ // toolCapabilities defines the supported tool-related features
159
+ type toolCapabilities struct {
160
+ listChanged bool
161
+ }
162
+
157
163
// WithResourceCapabilities configures resource-related server capabilities
158
164
func WithResourceCapabilities (subscribe , listChanged bool ) ServerOption {
159
165
return func (s * MCPServer ) {
@@ -173,6 +179,15 @@ func WithPromptCapabilities(listChanged bool) ServerOption {
173
179
}
174
180
}
175
181
182
+ // WithToolCapabilities configures tool-related server capabilities
183
+ func WithToolCapabilities (listChanged bool ) ServerOption {
184
+ return func (s * MCPServer ) {
185
+ s .capabilities .tools = & toolCapabilities {
186
+ listChanged : listChanged ,
187
+ }
188
+ }
189
+ }
190
+
176
191
// WithLogging enables logging capabilities for the server
177
192
func WithLogging () ServerOption {
178
193
return func (s * MCPServer ) {
You can’t perform that action at this time.
0 commit comments