Skip to main content

ToolChoice

Policy selecting automatic tool choice, no tool use, or a named tool.

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
kindstring (TOOL_CHOICE_KIND_AUTO, TOOL_CHOICE_KIND_NONE, TOOL_CHOICE_KIND_SPECIFIC) or integer (int32)OptionalDiscriminator selecting the representation or policy used by this message.
specificToolNamestringOptionalOnly used when kind = TOOL_CHOICE_KIND_SPECIFIC.

Values of kind​

How the model provider should choose whether and which tool to call.

ValueNo.FormMeaning
TOOL_CHOICE_KIND_AUTO1CanonicalLet the provider decide whether to call an available tool.
TOOL_CHOICE_KIND_NONE2CanonicalDisable tool selection for this generation.
TOOL_CHOICE_KIND_SPECIFIC3CanonicalRequire the named tool specified by the enclosing tool-choice configuration.

In responses​

API JSON uses JSON field names (camelCase).

FieldTypePresenceMeaning
kindstring (TOOL_CHOICE_KIND_AUTO, TOOL_CHOICE_KIND_NONE, TOOL_CHOICE_KIND_SPECIFIC) or integer (int32)OptionalDiscriminator selecting the representation or policy used by this message.
specificToolNamestringOptionalOnly used when kind = TOOL_CHOICE_KIND_SPECIFIC.

Values of kind​

How the model provider should choose whether and which tool to call.

ValueNo.FormMeaning
TOOL_CHOICE_KIND_AUTO1CanonicalLet the provider decide whether to call an available tool.
TOOL_CHOICE_KIND_NONE2CanonicalDisable tool selection for this generation.
TOOL_CHOICE_KIND_SPECIFIC3CanonicalRequire the named tool specified by the enclosing tool-choice configuration.

In webhook payloads​

Webhook JSON uses protobuf field names (snake_case).

FieldTypePresenceMeaning
kindstring (TOOL_CHOICE_KIND_AUTO, TOOL_CHOICE_KIND_NONE, TOOL_CHOICE_KIND_SPECIFIC) or integer (int32)OptionalDiscriminator selecting the representation or policy used by this message.
specific_tool_namestringOptionalOnly used when kind = TOOL_CHOICE_KIND_SPECIFIC.

Values of kind​

How the model provider should choose whether and which tool to call.

ValueNo.FormMeaning
TOOL_CHOICE_KIND_AUTO1CanonicalLet the provider decide whether to call an available tool.
TOOL_CHOICE_KIND_NONE2CanonicalDisable tool selection for this generation.
TOOL_CHOICE_KIND_SPECIFIC3CanonicalRequire the named tool specified by the enclosing tool-choice configuration.

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 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
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).
GenerationConfigNested in model
GenerationConfigNested in model
GenerationConfigNested in model

Download the public reference contract.

Document: DOC-API-MODEL-tool-choice.