Skip to content

Commit 9f16336

Browse files
fix: remove duplicate methods server.SetPrompts & server.SetResources (#542)
Signed-off-by: Matthis Holleville <[email protected]>
1 parent 8a18f59 commit 9f16336

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

server/server.go

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -383,14 +383,6 @@ func (s *MCPServer) DeleteResources(uris ...string) {
383383
}
384384
}
385385

386-
// SetResources replaces all existing resources with the provided list
387-
func (s *MCPServer) SetResources(resources ...ServerResource) {
388-
s.resourcesMu.Lock()
389-
s.resources = make(map[string]resourceEntry, len(resources))
390-
s.resourcesMu.Unlock()
391-
s.AddResources(resources...)
392-
}
393-
394386
// RemoveResource removes a resource from the server
395387
func (s *MCPServer) RemoveResource(uri string) {
396388
s.resourcesMu.Lock()
@@ -494,15 +486,6 @@ func (s *MCPServer) DeletePrompts(names ...string) {
494486
}
495487
}
496488

497-
// SetPrompts replaces all existing prompts with the provided list
498-
func (s *MCPServer) SetPrompts(prompts ...ServerPrompt) {
499-
s.promptsMu.Lock()
500-
s.prompts = make(map[string]mcp.Prompt, len(prompts))
501-
s.promptHandlers = make(map[string]PromptHandlerFunc, len(prompts))
502-
s.promptsMu.Unlock()
503-
s.AddPrompts(prompts...)
504-
}
505-
506489
// AddTool registers a new tool and its handler
507490
func (s *MCPServer) AddTool(tool mcp.Tool, handler ToolHandlerFunc) {
508491
s.AddTools(ServerTool{Tool: tool, Handler: handler})

0 commit comments

Comments
 (0)