MCPcopy Index your code
hub / github.com/docker/docker-agent / cloneToolDefinitions

Function cloneToolDefinitions

pkg/session/session.go:496–508  ·  view source on GitHub ↗
(src []tools.Tool)

Source from the content-addressed store, hash-verified

494}
495
496func cloneToolDefinitions(src []tools.Tool) []tools.Tool {
497 if src == nil {
498 return nil
499 }
500 out := make([]tools.Tool, len(src))
501 for i, tool := range src {
502 out[i] = tool
503 out[i].Parameters = cloneSchemaValue(tool.Parameters)
504 out[i].OutputSchema = cloneSchemaValue(tool.OutputSchema)
505 out[i].Annotations = cloneToolAnnotations(tool.Annotations)
506 }
507 return out
508}
509
510func cloneToolAnnotations(src tools.ToolAnnotations) tools.ToolAnnotations {
511 cp := src

Callers 1

cloneChatMessageFunction · 0.85

Calls 2

cloneSchemaValueFunction · 0.85
cloneToolAnnotationsFunction · 0.85

Tested by

no test coverage detected