Courseiva
Claude API Mechanics →mediumMultiple Choice

CCDV-F Claude API Mechanics Practice Question

A developer is integrating the Messages API into a backend service. They want to send a multi-turn conversation where the assistant previously produced a tool call that returned a result. Which content structure should they send back to continue the conversation correctly?

⚠ Common exam trap

The trap here is treating tool output as ordinary text in a user or assistant message, when the API requires a tool_result block linked by tool_use_id.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

A user message whose content array contains a tool_result block referencing the tool_use id, followed by any additional user text as separate blocks.

Tool results belong in a user-turn message as tool_result content blocks, each carrying the tool_use_id from the assistant's prior tool_use block. Additional user text can be included as sibling content blocks. This structured pairing preserves the call-result relationship the API expects, letting Claude incorporate the returned data and continue the conversation coherently.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    A system message that appends the tool output to the original system prompt so it persists for all future turns.

    Why it's wrong here

    System content is not the channel for tool results and appending outputs there conflates persistent instructions with transient data. It also grows the system prompt on every call and does not reference the tool_use id, so the model cannot associate the data with the earlier call. This approach inflates cost and breaks the intended request structure.

  • ✓

    A user message whose content array contains a tool_result block referencing the tool_use id, followed by any additional user text as separate blocks.

    Why this is correct

    The Messages API expects tool outputs delivered as tool_result blocks inside a user message, each referencing the tool_use_id from the assistant's prior tool_use block. Additional user text can coexist as separate content blocks in the same message. This preserves the call-result linkage and lets Claude continue reasoning with the returned data, which is the correct continuation pattern.

  • ✗

    An assistant message echoing the tool name and its output so the model can read its own prior decision before answering.

    Why it's wrong here

    Tool results are inputs to the model, not assistant outputs, so placing them in an assistant message misrepresents the conversation roles. The API treats assistant turns as generated content and will not pair them with the earlier tool_use id. This breaks the expected alternation and typically causes errors or degraded continuity because the model sees the result as something it said rather than data it received.

  • ✗

    A single user message containing the raw tool output as plain text, labeled with the tool name in parentheses.

    Why it's wrong here

    Tool results must be returned as a dedicated tool_result content block tied to the originating tool_use id, not as free text. Dumping the output into a user message loses the linkage between call and result, so Claude cannot reliably correlate them. The API expects the structured pairing, and treating it as prose often produces confused or repetitive follow-up behavior.

About these practice questions

One of 257 original CCDV-F practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Anthropic exam blueprint

This CCDV-F practice question is part of Courseiva's free Anthropic certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CCDV-F exam.