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(
138138
139139// serverCapabilities defines the supported features of the MCP server
140140type serverCapabilities struct {
141+ tools * toolCapabilities
141142 resources * resourceCapabilities
142143 prompts * promptCapabilities
143144 logging bool
@@ -154,6 +155,11 @@ type promptCapabilities struct {
154155 listChanged bool
155156}
156157
158+ // toolCapabilities defines the supported tool-related features
159+ type toolCapabilities struct {
160+ listChanged bool
161+ }
162+
157163// WithResourceCapabilities configures resource-related server capabilities
158164func WithResourceCapabilities (subscribe , listChanged bool ) ServerOption {
159165 return func (s * MCPServer ) {
@@ -173,6 +179,15 @@ func WithPromptCapabilities(listChanged bool) ServerOption {
173179 }
174180}
175181
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+
176191// WithLogging enables logging capabilities for the server
177192func WithLogging () ServerOption {
178193 return func (s * MCPServer ) {
You can’t perform that action at this time.
0 commit comments