AI Certificates

CCAR-F Tool Design & MCP Integration practice questions

18% of the CCAR-F exam. These worked examples come from free Form 1, with an explanation for every answer option.

D2 Tool Design & MCP IntegrationCCAR-F · Form 1 · free

Since the system prompt gained the line "always look up the customer's history before deciding," the agent calls get_customer twice per turn — once to verify identity and again before each order action. Both tool descriptions are detailed and accurate. What is the most likely cause?

  1. A

    The prompt's "look up the customer's history" wording binds that instruction to get_customer on each turnCorrect

    Correct. Keyword-sensitive system prompt language creates unintended tool associations: "look up" and "customer" read as a standing directive to invoke get_customer, overriding otherwise sound descriptions.

  2. B

    The get_customer description overlaps lookup_order enough that the agent hedges by calling both tools

    Would be the usual first suspect and is worth ruling out, but the stem states both descriptions are detailed and accurate, and the symptom is repetition of one tool rather than misrouting between two.

  3. C

    The agent cannot see its own earlier tool results within a turn, so it re-queries identity before acting

    Would explain re-querying, and context loss does cause duplicate calls in other systems, but tool results are appended to the conversation and remain visible for the rest of the turn.

  4. D

    tool_choice is set to "any", which forces at least one tool call before the agent may answer in text

    Would guarantee a tool call rather than prose, which is a real effect of that setting, but it does not explain why the same tool is chosen a second time in a single turn.

The principle

System prompt wording competes with tool descriptions for control of tool selection. When behavior changes right after a prompt edit, read the new wording for keywords that map onto a tool name before suspecting the tool definitions.

D2 Tool Design & MCP IntegrationCCAR-F · Form 1 · free

When the payments backend times out, process_refund returns isError: true with the text "Operation failed." Policy rejections return the same payload. The agent now retries policy rejections indefinitely and gives up on real timeouts. What should the tool return instead?

  1. A

    A distinct human-readable error string per failure mode so the agent can match on the wording it gets

    Gives the agent more to go on than one generic string, but it puts the retry decision back on string matching, which breaks the moment someone rewords a message.

  2. B

    A retry loop inside the tool itself, surfacing only the final outcome after three attempts have failed

    Handles transient failures close to the source, which is genuinely good practice, but it does nothing for the policy rejections that should never be retried at all.

  3. C

    The backend's own exception class name in a code field, so the agent can branch on the code it gets

    A stable code is a real improvement on prose and is something the agent can match exactly rather than interpret. It exports the backend's internal taxonomy, so the agent must carry its own map of which classes are worth retrying.

  4. D

    An errorCategory value and an isRetryable boolean alongside a readable description of what failedCorrect

    Correct. Structured error metadata lets the agent branch on isRetryable rather than infer intent from prose, and errorCategory separates transient failures from business-rule violations.

The principle

Uniform failure payloads strip an agent of the information it needs to recover. Errors should carry a category and an explicit retryability flag so the retry decision is data, not interpretation.

D2 Tool Design & MCP IntegrationCCAR-F · Form 1 · free

run_query lets the billing subagent compose arbitrary queries against the billing database. Twice last quarter it returned invoice rows belonging to a different account whose contact name matched the caller's. Which two changes most directly address this?

  1. A

    Replace run_query with a lookup_invoice tool that takes an invoice ID and rejects invoices outside the account in disputeCorrect

    Correct. A constrained replacement makes the account boundary part of the tool contract, so a cross-account row cannot come back however the model phrases its request.

  2. B

    Rewrite run_query's description so it warns that the tool is a last resort, for questions no specific billing tool covers

    Sharpens selection and would reduce casual reaching for it, but the capability is unchanged: a tool that can read any account still will when the description is outweighed.

  3. C

    Remove run_query from the billing subagent's tool set once lookup_invoice covers the lookups the role actually needsCorrect

    Correct. The narrow tool only helps if the broad one is gone; leaving both in the set keeps the unconstrained path one selection away.

  4. D

    Add a PostToolUse hook that drops any returned row whose account id is not the account currently in dispute

    Filtering the result set is deterministic and does keep the foreign rows out of the model's context, which is worth having as a backstop. The query still ran unconstrained, so the read happened and the tool can be asked for anything.

  5. E

    Use forced tool selection so lookup_order runs first on each billing turn and establishes the account in context

    Establishes the account early and is a sound use of forced selection, but nothing then stops a later run_query from reaching past that account anyway.

The principle

Guardrails belong in the tool interface, not in the instructions wrapped around it. Narrowing a generic tool means both building the constrained replacement and retiring the general tool it replaces.

Start free CCAR-F Form 1The five domains