Skip to main content
A single condition that, when met, halts the server-tool agent loop.

Supported Types

StopServerToolsWhenFinishReasonIs

StopServerToolsWhenHasToolCall

StopServerToolsWhenMaxCost

StopServerToolsWhenMaxTokensUsed

StopServerToolsWhenStepCountIs

Union Discrimination

Use the Type field to determine which variant is active, then access the corresponding field: