MCPcopy Create free account
hub / github.com/docker/docker-agent / getToolCallInfo

Function getToolCallInfo

pkg/evaluation/eval.go:617–623  ·  view source on GitHub ↗

getToolCallInfo extracts the tool name and arguments from an event.

(event map[string]any)

Source from the content-addressed store, hash-verified

615
616// getToolCallInfo extracts the tool name and arguments from an event.
617func getToolCallInfo(event map[string]any) (name, args string) {
618 tc, _ := event["tool_call"].(map[string]any)
619 fn, _ := tc["function"].(map[string]any)
620 name, _ = fn["name"].(string)
621 args, _ = fn["arguments"].(string)
622 return name, args
623}
624
625// matchesAnyPattern returns true if the name contains any of the patterns (case-insensitive).
626func matchesAnyPattern(name string, patterns []string) bool {

Callers 1

buildTranscriptFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected