MCPcopy
hub / github.com/docker/docker-agent / ListTools

Method ListTools

pkg/tools/mcp/reconnect_test.go:45–56  ·  view source on GitHub ↗
(_ context.Context, _ *gomcp.ListToolsParams)

Source from the content-addressed store, hash-verified

43}
44
45func (m *failingInitClient) ListTools(_ context.Context, _ *gomcp.ListToolsParams) iter.Seq2[*gomcp.Tool, error] {
46 m.mu.Lock()
47 t := m.toolsToList
48 m.mu.Unlock()
49 return func(yield func(*gomcp.Tool, error) bool) {
50 for _, tool := range t {
51 if !yield(tool, nil) {
52 return
53 }
54 }
55 }
56}
57
58func (m *failingInitClient) CallTool(context.Context, *gomcp.CallToolParams) (*gomcp.CallToolResult, error) {
59 return &gomcp.CallToolResult{Content: []gomcp.Content{&gomcp.TextContent{Text: "ok"}}}, nil

Callers

nothing calls this directly

Calls 2

LockMethod · 0.45
UnlockMethod · 0.45

Tested by

no test coverage detected