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

Function WithMaxConsecutiveToolCalls

pkg/session/session.go:777–783  ·  view source on GitHub ↗

WithMaxConsecutiveToolCalls sets the threshold for consecutive identical tool call detection. 0 means "use runtime default of 5". Negative values are ignored.

(n int)

Source from the content-addressed store, hash-verified

775// call detection. 0 means "use runtime default of 5". Negative values are
776// ignored.
777func WithMaxConsecutiveToolCalls(n int) Opt {
778 return func(s *Session) {
779 if n >= 0 {
780 s.MaxConsecutiveToolCalls = n
781 }
782 }
783}
784
785// WithMaxOldToolCallTokens sets the maximum token budget for old tool call content.
786// Positive values enable truncation; 0 and -1 disable truncation (unlimited tool content).

Callers 6

runDockerAgentFunction · 0.92
CreateToolHandlerFunction · 0.92
CreateSessionMethod · 0.92
newSubSessionFunction · 0.92
NewSessionMethod · 0.92
buildSessionOptsMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected