Skip to main content

ToolExecutionPolicy

Per-run policy for approvals, MCP execution concurrency, admitted tool-call budget and answer windows. Some stored controls are not enforced by the current workflow.

If an expected approval does not appear, inspect the tool/server require rules and auto-approve exceptions. Auto-approve takes precedence; server IDs are compared case-insensitively after trimming whitespace. An exception does not establish that the user reviewed the action.

An omitted or zero approvalTimeoutMs waits five minutes. At expiry, failOnApprovalTimeoutToolNamePatterns yields FAILED for matching calls and TIMED_OUT for others; an unset list makes every expiry FAILED.

The retry controls retriableToolNamePatterns, retryableErrorSubstrings, nonRetryableErrorSubstrings, maxRetries and retryBackoff are stored but do not schedule retries. Ordering rules, tie-breaking, the per-loop call cap, client-tool scheduling mode, failure mode and stop-on-failure rules are also not enforced; do not rely on them as execution or safety controls.

maxTotalToolCalls limits admitted calls across the run; zero or omission leaves the cap unset. A client call consumes budget when armed. A routable MCP call consumes budget before approval, including when held for approval or later rejected. Unknown tools and calls refused because the cap is already exhausted do not consume budget. Further calls at the limit receive FAILED tool results naming the limit, which the model can use when continuing the run.

maxParallelToolCalls limits concurrent MCP execution. Zero or one runs MCP calls sequentially; values greater than one permit concurrency. Client calls are armed separately, and your application controls their execution concurrency.

Choose clientToolTimeoutMs for your application's validation and action. Zero or omission gives a five-minute answer window; there is no unbounded setting. Each call returns its resolved clientToolDeadlineAt.

See Tool execution policies for policy selection and caller reconciliation.

Usage profiles​

UsageFields and validation
In requestsView fields
In responsesView fields
In webhook payloadsView fields

In requests​

API JSON uses JSON field names (camelCase).

FieldTypePresenceMeaning
requireApprovalToolNamePatternsArray of stringOptionalApprovals Tool-name patterns selecting calls that require an approval decision.
requireApprovalServerIdsArray of stringOptionalMCP server identifiers whose calls require approval. IDs are compared case-insensitively after trimming whitespace.
autoApproveToolNamePatternsArray of stringOptionalTool-name patterns whose matching calls may be approved automatically.
autoApproveServerIdsArray of stringOptionalMCP server identifiers exempted from approval require rules. IDs are compared case-insensitively after trimming whitespace.
approvalModestring (APPROVAL_MODE_MIXED, APPROVAL_MODE_BLOCK_ALL) or integer (int32)OptionalHow to schedule execution when approvals are required for some tools
clientToolModestring (CLIENT_TOOL_MODE_MIXED, CLIENT_TOOL_MODE_BLOCK_ALL) or integer (int32)OptionalStored requested client-tool scheduling mode; not enforced by the current workflow.
approvalTimeoutMsinteger (int32)OptionalTime allowed for an approval decision, in milliseconds. Zero or omission selects the five-minute default; a positive value overrides it. There is no unbounded wait setting. At expiry, matching fail_on_approval_timeout_tool_name_patterns produces FAILED; other calls become TIMED_OUT. An empty pattern list makes every expiry FAILED. Minimum: -2147483648. Maximum: 2147483647.
failOnApprovalTimeoutToolNamePatternsArray of stringOptionalSelects approval timeouts reported as FAILED; nonmatching calls become TIMED_OUT. An empty list makes every approval expiry FAILED. Global failure_mode is not enforced.
orderRulesArray of ToolExecutionOrderRuleOptionalStored requested ordering rules; not applied by the current generation workflow.
stableSortByCallIndexOnTiebooleanOptionalStored requested ordering tie-breaker; not applied by the current generation workflow.
maxParallelToolCallsinteger (int32)OptionalMaximum concurrent MCP tool executions. Zero, omission or one runs MCP calls sequentially; larger values permit concurrency. Client calls are armed separately, and their execution concurrency is controlled by the caller application. Minimum: -2147483648. Maximum: 2147483647.
maxToolCallsPerLoopinteger (int32)OptionalStored requested per-loop tool-call cap; not enforced by the current generation workflow. Minimum: -2147483648. Maximum: 2147483647.
maxTotalToolCallsinteger (int32)OptionalMaximum admitted tool calls across the run; zero or omission leaves the cap unset. Client calls count when armed. Routable MCP calls count before approval, including calls later rejected. Unknown tools and calls refused by an exhausted cap do not count. Minimum: -2147483648. Maximum: 2147483647.
retriableToolNamePatternsArray of stringOptionalStored requested retry selection; does not enable retries in the current workflow.
maxRetriesinteger (int32)OptionalStored requested retry count; does not enable retries in the current workflow. Minimum: -2147483648. Maximum: 2147483647.
retryBackoffBackoffOptionalStored requested retry delays; not applied by the current generation workflow.
retryableErrorSubstringsArray of stringOptionalStored requested retryable-error selection; not evaluated by the current workflow.
nonRetryableErrorSubstringsArray of stringOptionalStored requested retry exclusions; not evaluated by the current generation workflow.
timeoutsTimeoutPolicyOptionalTimeouts Overall execution time budget for the generation run.
clientToolTimeoutMsinteger (int32)OptionalTime allowed for a client-side tool result, in milliseconds. Zero or omission selects the five-minute default; a positive value overrides it. There is no unbounded wait. The resolved answer deadline is returned as clientToolDeadlineAt on each call. A result arriving after the deadline is rejected. At expiry, an empty or matching fail_on_approval_timeout_tool_name_patterns list yields FAILED; other calls become TIMED_OUT. Expiry closes the answer window and does not cancel a client action already in progress. Minimum: -2147483648. Maximum: 2147483647.
failureModestring (FAILURE_MODE_CONTINUE, FAILURE_MODE_STOP_LOOP, FAILURE_MODE_STOP_RUN) or integer (int32)OptionalStored requested failure action; not enforced by the current generation workflow.
stopOnFailureRulesArray of StopOnFailureRuleOptionalStored requested stop rules; not evaluated by the current generation workflow.

Values of approvalMode​

How approval-required tool calls affect other tool calls in the same execution loop.

ValueNo.FormMeaning
APPROVAL_MODE_MIXED1CanonicalRun automatically approved calls immediately and hold only calls that require approval.
APPROVAL_MODE_BLOCK_ALL2CanonicalHold execution of all tool calls in the loop until the approval-required calls are approved or rejected.

Values of clientToolMode​

How unresolved caller-executed tools affect progression of the tool loop.

ValueNo.FormMeaning
CLIENT_TOOL_MODE_MIXED1CanonicalRecord pending client tools and continue with server-executed MCP tools and the loop.
CLIENT_TOOL_MODE_BLOCK_ALL2CanonicalHold loop advancement until the caller submits results for all pending client tools.

Values of failureMode​

Requested scope of stopping after a tool execution failure.

ValueNo.FormMeaning
FAILURE_MODE_CONTINUE1CanonicalRequest continued processing after the failed tool call.
FAILURE_MODE_STOP_LOOP2CanonicalRequest stopping the current tool-execution loop after the failure.
FAILURE_MODE_STOP_RUN3CanonicalRequest stopping the generation run after the failure.

In responses​

API JSON uses JSON field names (camelCase).

FieldTypePresenceMeaning
requireApprovalToolNamePatternsArray of stringOptionalApprovals Tool-name patterns selecting calls that require an approval decision.
requireApprovalServerIdsArray of stringOptionalMCP server identifiers whose calls require approval. IDs are compared case-insensitively after trimming whitespace.
autoApproveToolNamePatternsArray of stringOptionalTool-name patterns whose matching calls may be approved automatically.
autoApproveServerIdsArray of stringOptionalMCP server identifiers exempted from approval require rules. IDs are compared case-insensitively after trimming whitespace.
approvalModestring (APPROVAL_MODE_MIXED, APPROVAL_MODE_BLOCK_ALL) or integer (int32)OptionalHow to schedule execution when approvals are required for some tools
clientToolModestring (CLIENT_TOOL_MODE_MIXED, CLIENT_TOOL_MODE_BLOCK_ALL) or integer (int32)OptionalStored requested client-tool scheduling mode; not enforced by the current workflow.
approvalTimeoutMsinteger (int32)OptionalTime allowed for an approval decision, in milliseconds. Zero or omission selects the five-minute default; a positive value overrides it. There is no unbounded wait setting. At expiry, matching fail_on_approval_timeout_tool_name_patterns produces FAILED; other calls become TIMED_OUT. An empty pattern list makes every expiry FAILED. Minimum: -2147483648. Maximum: 2147483647.
failOnApprovalTimeoutToolNamePatternsArray of stringOptionalSelects approval timeouts reported as FAILED; nonmatching calls become TIMED_OUT. An empty list makes every approval expiry FAILED. Global failure_mode is not enforced.
orderRulesArray of ToolExecutionOrderRuleOptionalStored requested ordering rules; not applied by the current generation workflow.
stableSortByCallIndexOnTiebooleanOptionalStored requested ordering tie-breaker; not applied by the current generation workflow.
maxParallelToolCallsinteger (int32)OptionalMaximum concurrent MCP tool executions. Zero, omission or one runs MCP calls sequentially; larger values permit concurrency. Client calls are armed separately, and their execution concurrency is controlled by the caller application. Minimum: -2147483648. Maximum: 2147483647.
maxToolCallsPerLoopinteger (int32)OptionalStored requested per-loop tool-call cap; not enforced by the current generation workflow. Minimum: -2147483648. Maximum: 2147483647.
maxTotalToolCallsinteger (int32)OptionalMaximum admitted tool calls across the run; zero or omission leaves the cap unset. Client calls count when armed. Routable MCP calls count before approval, including calls later rejected. Unknown tools and calls refused by an exhausted cap do not count. Minimum: -2147483648. Maximum: 2147483647.
retriableToolNamePatternsArray of stringOptionalStored requested retry selection; does not enable retries in the current workflow.
maxRetriesinteger (int32)OptionalStored requested retry count; does not enable retries in the current workflow. Minimum: -2147483648. Maximum: 2147483647.
retryBackoffBackoffOptionalStored requested retry delays; not applied by the current generation workflow.
retryableErrorSubstringsArray of stringOptionalStored requested retryable-error selection; not evaluated by the current workflow.
nonRetryableErrorSubstringsArray of stringOptionalStored requested retry exclusions; not evaluated by the current generation workflow.
timeoutsTimeoutPolicyOptionalTimeouts Overall execution time budget for the generation run.
clientToolTimeoutMsinteger (int32)OptionalTime allowed for a client-side tool result, in milliseconds. Zero or omission selects the five-minute default; a positive value overrides it. There is no unbounded wait. The resolved answer deadline is returned as clientToolDeadlineAt on each call. A result arriving after the deadline is rejected. At expiry, an empty or matching fail_on_approval_timeout_tool_name_patterns list yields FAILED; other calls become TIMED_OUT. Expiry closes the answer window and does not cancel a client action already in progress. Minimum: -2147483648. Maximum: 2147483647.
failureModestring (FAILURE_MODE_CONTINUE, FAILURE_MODE_STOP_LOOP, FAILURE_MODE_STOP_RUN) or integer (int32)OptionalStored requested failure action; not enforced by the current generation workflow.
stopOnFailureRulesArray of StopOnFailureRuleOptionalStored requested stop rules; not evaluated by the current generation workflow.

Values of approvalMode​

How approval-required tool calls affect other tool calls in the same execution loop.

ValueNo.FormMeaning
APPROVAL_MODE_MIXED1CanonicalRun automatically approved calls immediately and hold only calls that require approval.
APPROVAL_MODE_BLOCK_ALL2CanonicalHold execution of all tool calls in the loop until the approval-required calls are approved or rejected.

Values of clientToolMode​

How unresolved caller-executed tools affect progression of the tool loop.

ValueNo.FormMeaning
CLIENT_TOOL_MODE_MIXED1CanonicalRecord pending client tools and continue with server-executed MCP tools and the loop.
CLIENT_TOOL_MODE_BLOCK_ALL2CanonicalHold loop advancement until the caller submits results for all pending client tools.

Values of failureMode​

Requested scope of stopping after a tool execution failure.

ValueNo.FormMeaning
FAILURE_MODE_CONTINUE1CanonicalRequest continued processing after the failed tool call.
FAILURE_MODE_STOP_LOOP2CanonicalRequest stopping the current tool-execution loop after the failure.
FAILURE_MODE_STOP_RUN3CanonicalRequest stopping the generation run after the failure.

In webhook payloads​

Webhook JSON uses protobuf field names (snake_case).

FieldTypePresenceMeaning
require_approval_tool_name_patternsArray of stringOptionalApprovals Tool-name patterns selecting calls that require an approval decision.
require_approval_server_idsArray of stringOptionalMCP server identifiers whose calls require approval. IDs are compared case-insensitively after trimming whitespace.
auto_approve_tool_name_patternsArray of stringOptionalTool-name patterns whose matching calls may be approved automatically.
auto_approve_server_idsArray of stringOptionalMCP server identifiers exempted from approval require rules. IDs are compared case-insensitively after trimming whitespace.
approval_modestring (APPROVAL_MODE_MIXED, APPROVAL_MODE_BLOCK_ALL) or integer (int32)OptionalHow to schedule execution when approvals are required for some tools
client_tool_modestring (CLIENT_TOOL_MODE_MIXED, CLIENT_TOOL_MODE_BLOCK_ALL) or integer (int32)OptionalStored requested client-tool scheduling mode; not enforced by the current workflow.
approval_timeout_msinteger (int32)OptionalTime allowed for an approval decision, in milliseconds. Zero or omission selects the five-minute default; a positive value overrides it. There is no unbounded wait setting. At expiry, matching fail_on_approval_timeout_tool_name_patterns produces FAILED; other calls become TIMED_OUT. An empty pattern list makes every expiry FAILED. Minimum: -2147483648. Maximum: 2147483647.
fail_on_approval_timeout_tool_name_patternsArray of stringOptionalSelects approval timeouts reported as FAILED; nonmatching calls become TIMED_OUT. An empty list makes every approval expiry FAILED. Global failure_mode is not enforced.
order_rulesArray of ToolExecutionOrderRuleOptionalStored requested ordering rules; not applied by the current generation workflow.
stable_sort_by_call_index_on_tiebooleanOptionalStored requested ordering tie-breaker; not applied by the current generation workflow.
max_parallel_tool_callsinteger (int32)OptionalMaximum concurrent MCP tool executions. Zero, omission or one runs MCP calls sequentially; larger values permit concurrency. Client calls are armed separately, and their execution concurrency is controlled by the caller application. Minimum: -2147483648. Maximum: 2147483647.
max_tool_calls_per_loopinteger (int32)OptionalStored requested per-loop tool-call cap; not enforced by the current generation workflow. Minimum: -2147483648. Maximum: 2147483647.
max_total_tool_callsinteger (int32)OptionalMaximum admitted tool calls across the run; zero or omission leaves the cap unset. Client calls count when armed. Routable MCP calls count before approval, including calls later rejected. Unknown tools and calls refused by an exhausted cap do not count. Minimum: -2147483648. Maximum: 2147483647.
retriable_tool_name_patternsArray of stringOptionalStored requested retry selection; does not enable retries in the current workflow.
max_retriesinteger (int32)OptionalStored requested retry count; does not enable retries in the current workflow. Minimum: -2147483648. Maximum: 2147483647.
retry_backoffBackoffOptionalStored requested retry delays; not applied by the current generation workflow.
retryable_error_substringsArray of stringOptionalStored requested retryable-error selection; not evaluated by the current workflow.
non_retryable_error_substringsArray of stringOptionalStored requested retry exclusions; not evaluated by the current generation workflow.
timeoutsTimeoutPolicyOptionalTimeouts Overall execution time budget for the generation run.
client_tool_timeout_msinteger (int32)OptionalTime allowed for a client-side tool result, in milliseconds. Zero or omission selects the five-minute default; a positive value overrides it. There is no unbounded wait. The resolved answer deadline is returned as clientToolDeadlineAt on each call. A result arriving after the deadline is rejected. At expiry, an empty or matching fail_on_approval_timeout_tool_name_patterns list yields FAILED; other calls become TIMED_OUT. Expiry closes the answer window and does not cancel a client action already in progress. Minimum: -2147483648. Maximum: 2147483647.
failure_modestring (FAILURE_MODE_CONTINUE, FAILURE_MODE_STOP_LOOP, FAILURE_MODE_STOP_RUN) or integer (int32)OptionalStored requested failure action; not enforced by the current generation workflow.
stop_on_failure_rulesArray of StopOnFailureRuleOptionalStored requested stop rules; not evaluated by the current generation workflow.

Values of approval_mode​

How approval-required tool calls affect other tool calls in the same execution loop.

ValueNo.FormMeaning
APPROVAL_MODE_MIXED1CanonicalRun automatically approved calls immediately and hold only calls that require approval.
APPROVAL_MODE_BLOCK_ALL2CanonicalHold execution of all tool calls in the loop until the approval-required calls are approved or rejected.

Values of client_tool_mode​

How unresolved caller-executed tools affect progression of the tool loop.

ValueNo.FormMeaning
CLIENT_TOOL_MODE_MIXED1CanonicalRecord pending client tools and continue with server-executed MCP tools and the loop.
CLIENT_TOOL_MODE_BLOCK_ALL2CanonicalHold loop advancement until the caller submits results for all pending client tools.

Values of failure_mode​

Requested scope of stopping after a tool execution failure.

ValueNo.FormMeaning
FAILURE_MODE_CONTINUE1CanonicalRequest continued processing after the failed tool call.
FAILURE_MODE_STOP_LOOP2CanonicalRequest stopping the current tool-execution loop after the failure.
FAILURE_MODE_STOP_RUN3CanonicalRequest stopping the generation run after the failure.

Where used​

ReferenceRelationship
Create an agent profilePOST /api/v1/agent-profiles/create
Import a prompt libraryPOST /api/v1/agent-profiles/import
Update an agent profilePOST /api/v1/agent-profiles/update
Append a message without generatingPOST /api/v1/llm/append-message
Create a new conversation threadPOST /api/v1/llm/create-thread
Send a message to a conversationPOST /api/v1/llm/send-message
Send a message and wait for the resultPOST /api/v1/llm/send-message-sync
Update context management settingsPOST /api/v1/llm/update-context-management-settings
Update default generation configPOST /api/v1/llm/update-default-generation-config
Update conversation settingsPOST /api/v1/llm/update-settings
Update the caller's default generation configPOST /api/v1/enduser/update-generation-config
Get an agent profilePOST /api/v1/agent-profiles/get
List agent profilesPOST /api/v1/agent-profiles/list
Withdraw your rating on a messagePOST /api/v1/llm/delete-message-rating
Get full conversation statePOST /api/v1/llm/conversation-state
Rate an assistant messagePOST /api/v1/llm/rate-message
Submit client-side tool results and wait for the next segmentPOST /api/v1/llm/submit-client-tool-results-sync
Update prompt variablesPOST /api/v1/llm/update-prompt-variables
Get the caller's end-user profilePOST /api/v1/enduser/get
Generation configurationAPI JSON uses JSON field names (camelCase).
llm.generation_startedWebhook JSON uses protobuf field names (snake_case).
llm.message_publishedWebhook JSON uses protobuf field names (snake_case).
ConversationSettingsNested in model
ConversationSettingsNested in model
GenerationConfigNested in model
GenerationConfigNested in model
GenerationConfigNested in model

Download the public reference contract.

Document: DOC-API-MODEL-tool-execution-policy.