Forcing Claude to call one specific tool in a workflow phase

CCDV-F Applications & Integration Easy Question 65 of 105

A workflow defines three tools: lookup_customer, cancel_order, and file_dispute. In one phase, business logic requires the model to call cancel_order rather than any other tool or plain text.

Which request configuration enforces that?

Show answer and explanation

Ctool_choice set to { type: "tool" } with name set to cancel_order

Naming the tool in tool_choice forces a call to that exact tool. type any forces a call but lets the model pick among all three. auto with a prompt instruction raises the likelihood of a call without requiring one, which is the documented workaround on models that reject forced tool use rather than an enforcement mechanism. Narrowing the tools array removes the alternatives but still permits a plain text reply, and it changes what the model can do for the rest of the request.

Source: platform.claude.com/docs/en/agents-and-tools/tool-use/overv…

Anonymous, no account needed. Your tally stays in this browser.

Next question Start 5 timed questions Browse all 105 original CCDV-F practice questions