Welcome to awslagi.com – Sharing AWS, Google Cloud, Microsoft Azure IT Exams. It's free for all!

Claude Certified Architect — Foundations

Master Claude Certified Architect — Foundations (CCA-F) with real-world practice on agentic workflows, MCP integration, and prompt engineering.

4.8★★★★★(168 ratings)
14,602 studentsIntermediate
Prepare for the Anthropic Claude Certified Architect — Foundations (CCA-F) certification with scenario-based practice questions covering modern AI system architecture. You will learn how to design reliable multi-agent orchestrations, integrate external tools via the Model Context Protocol (MCP), and manage context windows efficiently. This course also dives into structured output generation, prompt engineering best practices, and Claude Code workflows for production teams. Build the architectural confidence needed to design scalable, dependable Claude-powered applications and pass the CCA-F exam on your first attempt.

What you'll learn

  • Tool Design & MCP Integration
  • Agentic Architecture & Orchestration
  • Context Management & Reliability
  • Prompt Engineering & Structured Output
  • Claude Code Configuration & Workflows

CCA-F

Lectures2
Questions67
Duration30 week
Students14,602

$20.00

Full Free Question Bank (67 Questions)

Claude Certified Architect — Foundations (CCA-F) Practice Questions & Verified Answers

Click any option to test your knowledge, or reveal the verified answer and detailed explanation below each question.

Jump to Section:
Question #1Part 1Tool Design & MCP Integration

Your `send_notification` tool invokes third-party messaging APIs. If these services time out during delivery, you cannot tell whether the message was actually sent. At present, the tool returns `is_error: true` with a generic “Notification failed” message for every timeout. Production monitoring shows that agents automatically retry these failures, often causing users to receive duplicate notifications. How should you change the error response?

AReturn is_error: true with a structured field retry_safe: true for timeouts, distinguishing them from permanent failures that should not be retried.
BReturn is_error: true with a message communicating uncertainty: “Timeout – status unknown. Message may have been sent. Avoid retry.”
CReturn is_error: true with a message encouraging retry: “Delivery service temporarily unavailable. Please retry the notification.”
DReturn is_error: true with the original message content echoed back.
Question #2Part 1Agentic Architecture & Orchestration

You configured the system so that all four subagents can access the full set of 18 tools. During testing, agents often invoke tools outside their specialization—the synthesis agent performs web searches, and the report generator attempts document analysis. What is the main cause of this poor tool-selection behavior?

AChoosing from 18 tools instead of 4-5 relevant ones increases decision complexity beyond reliable selection thresholds.
BThe tool definitions consume too much context window space, leaving insufficient room for task content.
CThe agents’ role descriptions in their system prompts conflict with having access to tools outside that role.
DThe coordinator cannot track which capabilities each subagent has, leading to misrouted tasks.
Question #3Part 1Agentic Architecture & Orchestration

You’re implementing escalation logic for when the agent should invoke `escalate_to_human`. Your team has proposed four different ways to trigger escalation. Which approach will most reliably identify cases that truly need human intervention?

AImplement sentiment analysis that monitors for frustration indicators (negative language, repeated questions, exclamation marks) and trigger escalation when the frustration score exceeds a configured threshold.
BConfigure the agent to escalate after three consecutive tool calls that fail to resolve the customer’s stated issue, ensuring a reasonable attempt before involving a human.
CInstruct the agent to escalate when the customer requests a human, when the issue requires policy exceptions, or when the agent cannot make meaningful progress.
DBuild a rules engine that maps specific issue types, customer segments, and product categories to escalation decisions, removing the need for model judgment calls.
Question #4Part 1Agentic Architecture & Orchestration

Production reviews show that uncertainty is handled inconsistently in final reports. At times, conflicting subagent findings are combined into one confident statement, losing nuance; at other times, reports use so many qualifications that they become unhelpful. When the web-search agent reports “industry analysts estimate $50B market size (methodology varies)” and the document-analysis agent reports “peer-reviewed study estimates $35B (±$7B, 95% CI),” the coordinator either arbitrarily selects one or produces vague wording such as “the market may be $35B-$50B depending on factors.” What systematic approach best resolves this?

AConfigure subagents to only report findings meeting a high-confidence threshold, filtering uncertain information before it reaches the coordinator.
BAdd a verification subagent that cross-references findings across sources, only passing claims to synthesis that are corroborated by at least two independent sources.
CInstruct the synthesis agent to structure reports with explicit sections distinguishing well-established findings from contested ones, preserving original source characterizations and methodological context.
DImplement a confidence calibration layer that normalizes subagent uncertainty expressions to standardized probability scores (0.0-1.0), then weight-average findings by their calibrated confidence.
Question #5Part 1Context Management & Reliability

Your multi-agent research pipeline crashed after processing 12 of 28 documents. The web-search agent had identified relevant sources, the document analyzer had partly completed extraction, and the synthesizer had started identifying patterns. You need to resume processing without duplicating work or losing fidelity from earlier findings. Which state-management approach best balances information fidelity and context efficiency when restoring agent state?

AHave each agent persist a structured export to a known location. On resume, the coordinator loads the manifest and injects relevant state into agent prompts.
BIndex all agent outputs in a shared vector store. When resuming, each agent queries the store using semantic search to retrieve relevant prior findings.
CHave each agent maintain its own persistent state file and reload it independently at the start of each session.
DPersist the coordinator’s conversation log containing all task delegations and responses, providing this to agents when resuming.
Question #6Part 1Context Management & Reliability

After the web-search agent locates 25 sources (120K tokens of raw content), the document-analysis agent identifies key insights (15K tokens), and the synthesis agent creates a coherent narrative draft (3K tokens), the coordinator must provide context to the report-generation agent for the final output with proper source citations. Which context-passing strategy best balances completeness and efficiency?

APass the full accumulated context from all prior agents.
BPass the synthesis draft along with a structured source index that maps key claims to their source URLs and relevant excerpts.
CPass only the synthesis draft and have a separate post-processing pipeline match claims to sources and insert citations after the report is generated.
DPass a condensed summary of all prior stages that preserves the main findings and attributes them to sources by name only.
Question #7Part 1Tool Design & MCP Integration

Your `control_device` tool controls smart-home devices through external APIs. If a device fails to respond within the timeout period, the tool returns an error. Production logs indicate that the agent only tells users, “the device is not responding,” without providing useful next steps. Which error-response structure would best allow the agent to provide helpful follow-up?

ASet is_error: true with a structured technical error containing the device ID, timeout duration, and raw API response code for debugging purposes.
BSet is_error: true with a brief “Device offline” message and provide a separate tool the agent can call to retrieve context-specific troubleshooting suggestions.
CSet is_error: false with an optimistic message indicating the command was dispatched successfully but device acknowledgment is still pending.
DSet is_error: true with a message explaining the likely cause and suggesting troubleshooting steps the agent can offer the user.
Question #8Part 1Prompt Engineering & Structured Output

The synthesis agent receives summarized findings from the web-search and document-analysis agents, then sends a consolidated summary to the report generator. During testing, you find that generated reports make factual claims without proper citations—the report generator cannot trace statements to their original sources because metadata was lost during summarization. What is the most effective approach for ensuring proper source attribution in the final reports?

AHave the report generator query the web search agent to re-locate sources for claims in the final report.
BHave each agent output structured data separating content summaries from source metadata (URLs, document names, page numbers).
CSkip summarization and pass full raw outputs from web search and document analysis directly to the report generator.
DInstruct the synthesis agent to embed source references inline within its summary text using a consistent citation format.
Question #9Part 1Context Management & Reliability

The agent confirms customer identity through a multi-step process before resetting passwords. During testing, after the customer answers the third verification question, the agent asks for their name again, as though the earlier exchange never occurred. What is the most likely reason for this behavior?

AThe verification tool is clearing the agent’s internal state after each successful validation step.
BClaude’s memory retention is limited to two conversational turns by default, requiring explicit configuration to extend it.
CThe conversation history isn’t being passed in subsequent API requests.
DThe prompt lacks instructions telling Claude to remember information across multiple exchanges.
Question #10Part 1Agentic Architecture & Orchestration

In production, final reports often include claims that lack proper source attribution. An investigation finds that web-search and document-analysis agents correctly attach citations to their outputs, but the synthesis agent loses track of which sources support each conclusion when it combines findings. What is the most effective architectural change?

ARequire all subagents to output structured claim-source mappings that the synthesis agent must preserve and merge when combining findings from multiple sources.
BMaintain complete transcripts of all subagent interactions and add a citation-resolution agent to analyze logs and determine attributions before report generation.
CAdd a verification step where the report generator uses semantic similarity matching against original sources to reconstruct which claims came from which documents.
DHave the coordinator inject source identifier prefixes into text before each handoff, then parse these prefixes at report generation to reconstruct citations.
Question #11Part 1Context Management & Reliability

A customer comes back **4 hours** after the original session about the same billing dispute. The prior **32-turn** session includes `lookup_order` results stating: “Status: PENDING, Expected resolution: 24-48 hours.” During testing, you find that, when sessions with stale tool results are resumed, the agent frequently cites the outdated information in its responses (for example, “I see your refund is still being processed”) even after later fresh tool calls return different details. What approach most reliably supports returning customers?

AStart a new session, inject a structured summary of the previous interaction (issue type, actions taken, resolution status), then make fresh tool calls before engaging.
BResume with full history but filter out previous tool_result messages before resuming, keeping only the human/assistant turns so the agent must re-fetch needed data.
CResume with full history and configure the agent to automatically re-call all previously-used tools at session start to ensure data freshness.
DResume with full history and add a system prompt instruction telling the agent to always prefer the most recent tool results when multiple calls to the same tool exist in context.
Question #12Part 1Context Management & Reliability

During a billing-dispute resolution, your agent successfully retrieves customer information through `get_customer` and order details through `lookup_order`, but receives a timeout error when it attempts to call `process_refund`. The agent has sufficient information to explain the charges and confirm refund eligibility, but cannot process the refund because of the backend failure. What approach best balances first-contact resolution with appropriate error handling?

AExplain the billing confirm refund eligibility, acknowledge the system issue preventing immediate processing, and offer escalation or retry later
BConfirm the refund will be processed and close the conversation, since the system has all necessary information to complete it automatically
CImplement automatic retries with exponential backoff for process_refund, keeping the conversation open until the refund is successfully processed
DEscalate immediately to a human agent since the refund action cannot be completed
Question #13Part 1Agentic Architecture & Orchestration

Your content-curation agent finds articles, evaluates each one for relevance, and then adds chosen articles to themed collections. Using separate `discover_articles(topic)`, `analyze_article(id)`, and `add_to_collection(article_id, collection_id)` tools, you observe 18+ sequential tool calls per request, creating latency problems. The agent must make editorial decisions about which articles match a collection’s theme—this requires viewing all candidates and their analysis scores at the same time to choose a cohesive set. Which tool composition best improves efficiency while retaining editorial judgment?

AKeep all tools separate but implement response caching for analyze_article calls.
BCreate a curate_collection(topic, collection_id) tool that handles discovery, analysis, and selection internally using configurable quality thresholds.
CCreate a discover_and_analyze(topic) composite tool that returns all candidates with their analysis scores, keeping add_to_collection separate for selective calls.
DAdd a preview_curation(topic, collection_id) tool that shows what would be added based on predefined rules, with an approve_curation() tool to confirm.
Question #14Part 1Context Management & Reliability

Production monitoring indicates that follow-up queries such as “summarize what we learned about market trends” consistently require more than 40 seconds. Investigation shows that the coordinator launches the synthesis subagent for every summarization request and passes it 80K+ tokens of accumulated findings. The coordinator already retains these findings in its context from coordinating the research. What is the most effective approach to improve response time for these follow-up summaries?

AEnable prompt caching on the synthesis subagent to reduce the overhead of repeatedly transferring the same research findings.
BHave the coordinator handle straightforward summarization requests directly using its existing context, reserving subagent spawning for complex analysis.
CPre-generate and cache summaries at multiple granularities whenever new findings accumulate.
DSpawn the synthesis subagent with reduced context and have it request specific findings from the coordinator on-demand.
Question #15Part 1Agentic Architecture & Orchestration

After the web-search agent and document-analysis agent complete their tasks, the coordinator invokes the synthesis agent. However, the synthesis agent reports that it cannot complete the task because no research findings were supplied. What is the most likely cause of this problem?

AThe subagents need to share a single API connection to enable automatic context sharing between invocations.
BThe synthesis agent needs tools that can fetch results directly from the other agents’ conversation histories.
CThe coordinator did not include the outputs from the previous agents in the synthesis agent’s prompt.
DThe synthesis agent’s context window is not large enough to hold the combined outputs from both previous agents.
Question #16Part 1Tool Design & MCP Integration

A document-extraction tool uses ML models to extract invoice fields (vendor, amount, date). The models return confidence scores (0.0–1.0) for each extracted field. In production, you observe: 1. The agent proceeds with low-confidence extractions that are incorrect 23% of the time. 2. The agent requests unnecessary human review for 31% of extractions that were actually correct. How should the tool’s output be restructured?

AReturn fields with their raw confidence scores and add detailed few-shot examples to your system prompt demonstrating how to interpret different confidence ranges and when to request human review.
BReturn fields with confidence scores, plus a request_review boolean computed using your tested confidence thresholds, along with a review_reasons array explaining which fields triggered review.
CCompute an aggregate extraction_quality score across all fields and return it alongside the extracted values. Include a text summary describing the overall extraction reliability.
DReturn fields organized into verified and needs_verification objects based on confidence thresholds.
Question #17Part 1Agentic Architecture & Orchestration

Once the web-search and document-analysis subagents have finished their tasks, the coordinator must spawn a synthesis subagent to combine the findings. What is the correct way to give the synthesis subagent the information it requires?

ASpawn the subagent with only a brief task description, relying on automatic context inheritance from the coordinator
BProvide the subagent with tool definitions that allow it to request outputs from other subagents via callbacks
CPass reference identifiers and configure the subagent with read access to a shared memory store where other subagents deposited their results
DInclude the complete findings from both subagents directly in the synthesis subagent’s prompt
Question #18Part 1Tool Design & MCP Integration

An expense-reimbursement agent processes employee requests through a `process_reimbursement` tool. Company policy requires manager approval before funds are disbursed for reimbursements above $500. The agent handles hundreds of requests each day, and the threshold enforcement must be tamper-proof regardless of how the agent is prompted. Which design ensures that the $500 approval threshold cannot be bypassed?

AThe process_reimbursement tool accepts amount and details, and internally enforces the threshold: amounts <$500 are auto-disbursed and the tool returns a success confirmation; amounts >$500 cause the tool to create a pending approval request and return a status indicating manager review is pending.
BThe process_reimbursement tool accepts an approved_by_manager: boolean parameter. The system prompt instructs the agent to only set this to true after confirming that a manager has approved the request. A nightly audit script reviews all reimbursements where approved_by_manager was set to true.
CProvide two tools: auto_reimburse (hard-coded limit of $500) and request_manager_approval. Include detailed system prompt instructions telling the agent to check the amount and call the appropriate tool. Add a PostToolUse hook that logs which tool was called for auditing.
DImplement the threshold check in a PreToolUse hook that inspects the amount parameter before process_reimbursement executes. If the amount exceeds $500, the hook modifies the tool call to add a requires_approval: true flag, which the tool checks before disbursing.
Question #19Part 1Tool Design & MCP Integration

Your `post_content` tool needs user confirmation before publishing. The current workflow shows “Ready to post to social media. Confirm?”, and analytics indicate that users approve 98% of requests within 2 seconds. Post-mortems identify incidents in which posts were sent to incorrect accounts, scheduled for incorrect times, or contained errors—all approved by users who did not notice the mistakes. How should the confirmation workflow be redesigned?

AAuto-approve routine posts and only require explicit confirmation for unusual patterns like posting to new accounts or large audiences
BRequire users to type a confirmation phrase instead of clicking a button
CAdd a mandatory waiting period before the confirm option becomes available
DInclude the complete post text, target account, scheduled time, and platform in the confirmation request
Question #20Part 1Tool Design & MCP Integration

The `update_user_profile` tool accepts a required `user_id` and an optional `fields_to_update` object. During testing, Claude often leaves out `user_id` or supplies improperly structured data. What is most important to help Claude understand which parameter values it should provide?

AStrict JSON Schema type constraints marking user_id as required and defining fields_to_update as an object type
BVerbose parameter names encoding format hints, such as user_id_string_uuid_format
CDetailed error responses explaining why invalid parameter values were rejected
DClear parameter descriptions explaining expected format, such as “user_id: UUID of the user to update (required)”
Question #21Part 1Agentic Architecture & Orchestration

An agent is managing a billing dispute. After calling `get_customer` and `lookup_order`, it determines that the dispute concerns a promotional-pricing error that requires manager approval—beyond the agent’s authorization level. How should the workflow manage this mid-process escalation?

ACompile a structured handoff with customer details, order info, and the identified issue before calling escalate_to_human.
BPersist the complete conversation and tool response history to a database, then call escalate_to_human with a reference ID.
CCall escalate_to_human passing only the customer’s original message.
DAttempt the refund with process_refund anyway, escalating only if the system rejects the transaction.
Question #22Part 1Agentic Architecture & Orchestration

A web search agent has collected several relevant sources for a research topic. The document analysis agent must now review those sources. How does information usually flow between these two specialized subagents?

AThe agents communicate through an event-driven message queue, with the document analysis agent subscribing to web search completion events.
BThe web search agent directly invokes the document analysis agent, passing the discovered sources as parameters.
CThe coordinator agent receives the web search agent’s output and includes relevant findings in the prompt when invoking the document analysis agent.
DBoth agents access a shared memory store where the web search agent writes findings and the document analysis agent reads them.
Question #23Part 1Agentic Architecture & Orchestration

Users report that final reports occasionally lack depth on particular subtopics. Investigation reveals that the document-analysis agent often identifies gaps—for example, noting, “the retrieved sources discuss API authentication but lack details on token refresh patterns”—but in the current strict pipeline, this insight cannot be acted on because search has already finished. What is the most effective architectural change?

AAdd a research planning agent before the search phase that decomposes topics into specific sub-questions.
BHave the analysis agent report specific gaps to the coordinator, which triggers targeted searches and re-invokes analysis until sufficient.
CHave the coordinator review analysis output for gap indicators and re-invoke search with gap-informed queries when gaps are detected.
DHave the synthesis agent attach confidence scores to each section and flag areas with insufficient coverage for manual review.
Question #24Part 1Tool Design & MCP Integration

The document analysis agent has one `analyze_documnet` tool that accepts a document and a free-text instruction parameter. During evaluation, requests such as “extract the key financial metrics” frequently produce narrative summaries, whereas “summarize the methodology” occasionally produces raw data tables. The synthesis agent reports that 35% of analysis results need re-requests with clarified instructions. What is the most effective way to improve reliability?

AHave the coordinator pre-classify each analysis request before passing instructions to the document analysis agent
BKeep the single tool but add an analyze_type enum parameter requiring explicit selection between extraction, summarization, and verification modes
CEnhance the tool description with detailed examples showing how different instruction phrasings should map to different output formats
DSplit the generic tool into purpose-specific tools – extract_data_points, summarize_content, verify_claim_against_source – each with defined input/output contracts
Question #25Part 1Context Management & Reliability

A customer brings up three distinct issues in one session: a refund inquiry (turns 1–15), a subscription question (turns 16–30), and a payment-method update (turns 31–45). At turn 48, the customer asks, “What happened with my refund?” The conversation is nearing context limits. Which strategy best preserves the agent’s ability to handle all issues during the session?

AExtract and persist structured issue data (order IDs, amounts, statuses) into a separate context layer.
BSummarize earlier turns into a narrative description, preserving full message history only for the active issue.
CRely on MCP tools to re-fetch relevant information on demand when the customer references earlier issues.
DImplement sliding window context that retains the most recent 30 turns.
Question #26Part 1Prompt Engineering & Structured Output

Your conversational assistant often produces several clarifying questions when users submit ambiguous requests. When a user asks, “Can you help me with the report?”, the assistant replies: “I’d be happy to help! Could you tell me: 1) Which report? 2) What kind of help – drafting, reviewing, or formatting? 3) What’s your deadline?” User analytics indicate a 40% conversation-abandonment rate after these multi-question replies. What is the most effective way to reduce friction while still handling ambiguity appropriately?

ALimit the assistant to one clarifying question per turn, using conversation history to accumulate answers over multiple exchanges rather than requesting everything upfront.
BAdd a preprocessing step using a smaller model to classify request ambiguity on a 1-5 scale, routing high-ambiguity requests to a clarification dialog and low-ambiguity requests directly to the assistant.
CModify the system prompt to instruct the assistant to make reasonable assumptions from available context, state those assumptions explicitly, and offer to adjust if the interpretation is wrong.
DCreate a lookup table of common request patterns with predefined default interpretations, having the assistant respond with those defaults without stating the assumptions made.
Question #27Part 1Agentic Architecture & Orchestration

After the agent calls `lookup_order` and receives order details indicating that the item was bought 45 days ago, how does the agentic loop decide whether to next call `process_refund` or `escalate_to_human`?

AThe orchestration layer automatically routes to the next tool based on the order’s status field.
BThe order details are added to the conversation and the model reasons about which action to take.
CThe agent executes the remaining steps in a tool sequence planned at the start of the request.
DThe agent follows a pre-configured decision tree mapping order attributes to specific tool calls.
Question #28Part 1Tool Design & MCP Integration

Production logs show inconsistent error handling: when `lookup_order` fails, the agent sometimes retries 5+ times (wasteful when the order ID does not exist), sometimes escalates immediately (premature for temporary network issues), and sometimes asks users for clarification (inappropriate when the issue is a backend permission error). Investigation shows that your MCP tool returns uniform error responses: `\{"isError": true, "content": [\{"type": "text", "text": "Operation failed"\}]\}`. The agent cannot differentiate among error types. What is the most effective improvement?

ACreate an analyze_error MCP tool the agent calls after any failure to determine the error category and recommended action.
BAdd few-shot examples to the system prompt demonstrating how to interpret error message patterns and select appropriate responses for each.
CEnhance error responses with structured metadata: include errorCategory (transient/validation/permission), isRetryable boolean, and a description of what caused the failure.
DImplement retry logic with exponential backoff in your MCP server for all errors, returning to the agent only after retries are exhausted.
Question #29Part 1Context Management & Reliability

After 30+ turns, your conversational assistant has noticeably slower responses and sometimes produces less coherent outputs. Investigation shows: 1. Average conversations reach 50,000 tokens by turn 35. 2. Production logs show that 94% of user messages reference only the preceding 3–5 exchanges. 3. The 6% of queries that reference earlier context generally ask about information the user could easily re-state. Your goal is to improve response speed and quality while preserving a good user experience. What is the most effective approach?

AEnable prompt caching and continue sending the complete conversation history, using cached prefixes to reduce per-request costs while preserving all context.
BBuild a retrieval system that stores all conversation turns and uses semantic search to pull in relevant historical context only when the current query appears to reference past information.
CImplement a summarization layer that progressively compresses older conversation turns into a running summary while keeping the most recent 5-6 turns verbatim, maintaining full historical context in condensed form.
DImplement a sliding window keeping only the system prompt and last 8-10 turns. When users reference earlier context, acknowledge the limitation and ask them to re-state the relevant information.
Question #30Part 1Tool Design & MCP Integration

Your order management system needs tools for three distinct operations: issuing refunds (requiring an amount and reason), canceling orders (requiring a reason), and requesting reshipments (requiring a shipping address). Every operation shares an `order_id` parameter but has different additional requirements. During testing, you observe that the agent often omits required parameters or supplies irrelevant ones with the current unified-tool design. Which design change would most effectively improve parameter accuracy?

AKeep one unified tool with a nested operation_details object parameter whose internal structure varies by operation type, documented in the tool description.
BKeep one unified tool but add JSON Schema if-then-else conditionals to enforce that parameters like amount are required only when the operation type is “refund”.
CSplit into three separate tools (issue_refund, cancel_order, request_reshipment), each defining only the parameters required for that specific operation.
DKeep one unified tool with all parameters marked optional, but add detailed few-shot examples in the system prompt showing correct parameter combinations for each operation type.
Question #31Part 1Agentic Architecture & Orchestration

The synthesis agent finishes its initial pass but identifies that three key research questions are still unanswered because the web-search and document-analysis agents did not locate relevant information on those specific subtopics. The coordinator currently moves directly to report generation, resulting in reports with incomplete coverage. Which change would most effectively improve research completeness?

AHave the report generation agent note which research questions couldn’t be answered, so users understand the limitations of the final output.
BIncrease the initial breadth of queries sent to web search and document analysis to reduce the probability of missing relevant information.
CHave the coordinator evaluate synthesis output for gaps, then re-delegate to web search and document analysis with targeted queries before invoking synthesis again.
DGive the synthesis agent direct access to web search tools so it can autonomously fill knowledge gaps without returning control to the coordinator.
Question #32Part 1Prompt Engineering & Structured Output

Your `get_portfolio_value` tool returns the overall value of a user’s investment portfolio. You are choosing between returning a structured JSON object with explicit fields or returning the information as a formatted text string. What is the main advantage of using structured output with defined fields?

AJSON schemas automatically validate that the underlying API returned correct data before the agent processes it.
BStructured JSON consumes significantly fewer tokens than natural language, substantially reducing API costs.
CStructured JSON is processed deterministically by the model, significantly improving accuracy when extracting values.
DThe agent can reliably extract specific values without parsing free-form text, reducing errors in subsequent operations.
Question #33Part 1Agentic Architecture & Orchestration

A customer says: “I’ve been going back and forth on this return for days. I just want to speak to someone who can actually help me.” The agent has confirmed through `lookup_order` that the return is straightforward—within policy and eligible for immediate processing. What should the agent do?

AProcess the refund via process_refund to resolve the underlying issue, then inform them it’s complete
BAcknowledge frustration, inform them this is resolvable now, and offer to complete it or escalate
CCall escalate_to_human immediately to honor the customer’s request
DAsk what specifically hasn’t worked in previous attempts before deciding whether to escalate or resolve automatically
Question #34Part 1Tool Design & MCP Integration

Your product-search tool queries an external catalog API and returns matching items. In production, the agent often retries searches immediately after receiving zero results, treating “no matches found” as a failure that requires a retry. The external API returns HTTP 200 with an empty results array—a valid response. How should you reorganize the tool’s result so the agent correctly interprets empty result sets?

AAdd a suggestions field containing alternative search strategies when results are empty, helping guide the agent toward more productive follow-up queries.
BReturn a natural language string describing the outcome, allowing the agent to interpret the result contextually based on the message content.
CReturn a result object with isError: true and a message explaining no products matched.
DReturn a structured result with a success boolean and results array, reserving isError: true for actual execution failures only.
Question #35Part 1Prompt Engineering & Structured Output

The coordinator gives the web-search subagent detailed, step-by-step directions, including exact search queries, source priorities, and date filters. Production monitoring identifies three problems: 1. When the pre-specified searches fail, the subagent reports “insufficient results” instead of attempting alternatives. 2. Research quality declines for emerging topics that do not fit expected patterns. 3. The subagent seldom identifies valuable tangential sources. What is the most effective way to improve the subagent’s adaptability?

AImplement a topic classification step where the coordinator categorizes requests as “well-defined” or “exploratory” and uses different instruction styles for each category.
BAdd explicit fallback directives to the detailed instructions: “If specified searches yield fewer than N results, attempt alternative query formulations before reporting failure.”
CRemove procedural details entirely, delegating with simple goals like “research X thoroughly” and relying on the subagent’s general capabilities.
DSpecify research goals and quality criteria (coverage breadth, source diversity, recency) rather than procedural steps, letting the subagent determine its search strategy.
Question #36Part 1Tool Design & MCP Integration

An MCP server provides `archive_file(file_id)` and `delete_file(file_id)` tools. Production logs indicate that the agent invokes `delete_file` when users request to “remove old backups,” yet company policy requires backup files to be archived. Both tools presently have minimal descriptions: “Archives a file” and “Deletes a file.” Which change most directly improves tool selection in this scenario?

AExpand tool descriptions to clarify use cases, adding guidance like “Do not use for backup files” to delete_file.
BAdd a confirmation step that requires users to type “CONFIRM DELETE” before delete_file executes.
CImplement server-side validation that rejects delete_file calls for files tagged as backups, returning an error message suggesting archive_file.
DAdd few-shot examples to the system prompt demonstrating that requests involving “backup” or “old” should use archive_file.
Question #37Part 1Agentic Architecture & Orchestration

A customer says: “This is frustrating. I’ve explained my issue twice and nothing is being resolved. I want to talk to a real person NOW.” The agent has not yet used any tools to investigate the customer’s account. What should the agent do?

AImmediately call escalate_to_human with the conversation history.
BBriefly explain what the agent can help with and offer to resolve the issue quickly, escalating only if the customer repeats their request.
CFirst call get_customer and lookup_order to gather account context, then escalate to a human agent.
DAcknowledge the frustration and ask one targeted question to understand the specific issue before escalating.
Question #38Part 1Context Management & Reliability

Your agent has invoked `lookup_order` several times while investigating a customer’s return requests. Each response contains 40+ fields (items, shipping details, payment info, status history). Tool outputs now make up most of the conversation context. The customer mentions two additional orders they want to discuss. What is the most effective approach before performing more lookups?

AMove all tool responses to a vector database with semantic indexing, retrieving relevant portions as the conversation continues
BProceed with additional lookups without modifying the existing tool output context
CHave the model generate a natural language summary of each order’s key details, replacing structured responses with prose descriptions
DExtract only the return-relevant fields (items, purchase date, return window, status) from each existing order response, removing verbose details
Question #39Part 1Context Management & Reliability

After investigating a billing dispute for more than 25 turns, you have determined that duplicate charges resulted from a payment-gateway timeout that triggered retry logic. The required refund ($847) is above your $500 authorization limit. You need to call `escalate_to_human`, and the human agent will not have access to your conversation transcript. What context should you provide to enable an effective resolution?

AA structured summary: customer ID, root cause, refund amount, and recommended action.
BYour diagnosis and the refund amount only.
CThe customer’s original complaint verbatim plus the tool result excerpts showing duplicate transactions.
DThe complete conversation transcript with all tool results.
Question #40Part 1Tool Design & MCP Integration

An agent uses three tools: `get_property_details(property_id)`, which returns data including a street address; `get_price_history(property_id)`, which returns historical pricing; and `get_neighborhood_info(address)`, which returns area statistics. You observe that `get_neighborhood_info` always requires `get_property_details` to run first solely to extract the address, even when users identify the property by ID. This introduces unnecessary latency and failure coupling—if the first call fails, the neighborhood request fails as well. What tool-design change best resolves this?

ACreate a lookup_address(property_id) helper tool for retrieving addresses.
BAdd retry logic and timeout handling to get_property_details.
CChange get_neighborhood_info to accept property_id, resolving the address internally.
DConsolidate into a single get_property_with_neighborhood(property_id) tool returning both datasets.
Question #41Part 1Tool Design & MCP Integration

The `process_refund` tool returns two error categories: transient technical errors (`503 Service Unavailable`, `Connection timeout`) affecting 5% of calls, and permanent business errors (`Order exceeds 30 day return window`, `Item already refunded`) affecting 12% of calls. Monitoring shows that the agent wastes 3–4 turns retrying business errors that can never succeed. At present, both error types return only a plain-text message to Claude. What is the most effective way to reduce wasted retries while improving the quality of customer-facing responses?

AImplement automatic retry logic at the tool level for technical errors only, passing business errors to Claude without retries.
BAdd few-shot examples showing how to distinguish retriable from non-retriable errors by parsing error message text.
CReturn structured error responses with retriable: false for business errors and a customer-friendly explanation for Claude to use.
DAdd a check_refund_eligibility tool that must be called before process_refund to prevent business rule violations.
Question #42Part 1Tool Design & MCP Integration

The `track_shipment(tracking_id)` tool calls an external logistics API that can occasionally fail—the API may be temporarily unavailable, the tracking ID may be malformed, or the shipment may not exist. The tool currently raises a Python exception when an error occurs. Users report that the agent gives unhelpful replies such as “I’m having trouble with that request,” rather than suggesting alternatives like checking the tracking-number format or looking up the shipment by order number. How should errors in tool results be handled?

AReturn a generic error response (e.g., {"success": false, "error": "lookup_failed"}) for all failure cases to maintain a consistent schema and avoid exposing internal error details.
BReturn structured error information as normal tool output including error type, recoverability status, and actionable context for the user.
CCreate dedicated error-recovery tools (retry_tracking_lookup, search_by_order_number) that the model can invoke after the primary tracking tool returns a failure indicator.
DImplement retry logic with exponential backoff inside the tool implementation so transient errors are automatically handled and only return a result after all retry attempts are exhausted.
Question #43Part 1Agentic Architecture & Orchestration

The coordinator agent has `AgentDefinitions` configured for each of the four specialized subagents, with suitable descriptions, prompts, and tool restrictions. During testing, the coordinator correctly identifies when delegation is needed—it produces messages such as “I’ll ask the web search agent to find sources on this topic”—but no subagent execution ever takes place. The coordinator then acts as though delegation occurred and continues using incomplete information. Logs show no errors. What is the most likely cause?

AThe coordinator’s max_tokens setting is too low, causing the Task tool invocation to be truncated before the subagent type parameter can be specified.
BThe coordinator’s allowedTools configuration doesn’t include “Task”, so while it can reason about delegation, it cannot invoke the tool required to spawn subagents.
CThe AgentDefinitions are configured correctly, but the coordinator’s system prompt doesn’t explicitly list the available subagent types, preventing the model from knowing they can be invoked.
DSubagent context isolation means task descriptions from the coordinator don’t automatically reach subagents; you need to configure explicit context forwarding in ClaudeAgentOptions.
Question #44Part 1Tool Design & MCP Integration

While implementing the `lookup_order` MCP tool, the backend occasionally returns errors (for example, “Order not found” or temporary database failures). What is the correct pattern for communicating these errors to the agent?

AThrow an exception from the tool handler so the agent framework can catch and log it
BReturn the error message in the tool result content with the isError flag set to true
CLog the error server-side and return an empty result to avoid confusing the model
DReturn a success response with a “status” field indicating the error type
Question #45Part 1Agentic Architecture & Orchestration

Compliance requires that refunds exceeding $500 automatically escalate to a human agent; this rule cannot be left to model discretion. Despite clear system-prompt instructions, production logs show that the agent occasionally processes high-value refunds directly, with a 3% failure rate. How can guaranteed compliance be achieved?

AModify the refund tool to return an error with message “Amount exceeds policy limit – please escalate” when threshold is exceeded.
BAdd few-shot examples to the prompt showing correct escalation behavior at various refund amounts ($400, $500, $600).
CImplement a hook to intercept tool calls; when the refund process amount exceeds $500, block it and invoke human escalation.
DStrengthen the system prompt with emphatic language: “CRITICAL POLICY: Refunds over $500 MUST trigger human escalation. NEVER process these directly.”
Question #46Part 1Tool Design & MCP Integration

An MCP server implements a `check_availability` tool that queries an external calendar API. During testing, three error conditions occur: 1. The tool is invoked with a malformed request that lacks the required `user_email` parameter. 2. The calendar API returns a 404 because the specified user does not exist in the calendar system. 3. The calendar API returns a 503 because the service is temporarily unavailable. How should each error be reported under MCP’s error-handling design?

AReport all three as tool results with isError: true.
BReport errors 1 and 2 as JSON-RPC protocol errors; report error 3 as a tool result with isError: true.
CReport error 1 as a JSON-RPC protocol error; report errors 2 and 3 as tool results with isError: true.
DReport all three as JSON-RPC protocol errors.
Question #47Part 1Claude Code Configuration & Workflows

Your team's CLAUDE.md includes a rule: "Use 4-space indentation and always run Prettier formatting." Despite this, code reviews reveal that roughly 30% of files Claude Code generates use inconsistent formatting — sometimes 2-space indentation, sometimes missing trailing commas. Adding emphasis ("IMPORTANT: You MUST use Prettier formatting") reduces violations to about 15%, but doesn't eliminate them. What is the most effective way to ensure all generated code is consistently formatted?

AConfigure a PostToolUse hook with an Edit|Write matcher that automatically runs Prettier on each file Claude modifies.
BSplit the formatting rules into path-scoped .claude/rules/files that load when Claude works on matching file types.
CExtract the formatting rules into a dedicated skill that Claude loads automatically when generating code, with more detailed examples of correct formatting.
DAdd a Stop hook with a prompt-based check that evaluates whether generated code follows formatting standards and prompts Claude to fix violations.
Question #48Part 1Agentic Architecture & Orchestration

You are building developer productivity tools using the Claude Agent SDK. The agent helps engineers explore unfamiliar codebases, understand legacy systems, generate boilerplate code, and automate repetitive tasks. It relies on the built-in tools (Read, Write, Bash, Grep, Glob) and integrates with Model Context Protocol (MCP) servers. Your code review assistant must analyze pull requests and provide feedback on three aspects: - Code style compliance - Potential security issues - Documentation completeness Each aspect requires reading files, running analysis tools, and generating a report section. The review process follows this same three-step workflow for every PR. Which task decomposition pattern is most appropriate for this workflow?

ARouting – classify each PR by type (feature, bugfix, refactor) first, then route to different review prompts optimized for that category.
BPrompt chaining – break the review into sequential steps where each aspect (style, security, documentation) is analyzed separately, with outputs combined in a final synthesis step.
CSingle comprehensive prompt – include all instructions in one prompt and let the model handle all three aspects simultaneously.
DOrchestrator-workers – have a central LLM analyze each PR to dynamically determine which checks are needed, then delegate to specialized worker LLMs for each identified subtask.
Question #49Part 1Context Management & Reliability

A critical bug is affecting production users. The error logs show exceptions occurring in the OrderProcessing module, with a clear stack trace pointing to a specific function. You have not previously worked with this module. What is the most effective approach to take?

AStart with direct execution to gather initial information, then switch to plan mode to design a comprehensive solution before implementing any changes.
BEnter plan mode to explore the module’s architecture and dependencies before attempting any fixes.
CUse plan mode to analyze the error in context of the module’s design, enumerate potential root causes, and prioritize fixes systematically.
DUse direct execution to examine the stack trace, read the relevant code, and implement a fix once you identify the root cause.
Question #50Part 1Claude Code Configuration & Workflows

Your team is configuring MCP servers in Claude Code. You want to add a shared venue lookup server that all team members should have access to, and you personally want to add an experimental music playlist server that only you are testing. Which configuration approach correctly applies MCP server scopes?

AAdd both servers to your local ~/.claude.json
BAdd venue server to ~/.claude.json and playlist server to .mcp.json
CAdd venue server to .mcp.json and playlist server to ~/.claude.json.
DAdd both servers to the project-level .mcp.json file
Question #51Part 1Agentic Architecture & Orchestration

You are building developer productivity tools using the Claude Agent SDK. The agent assists engineers with exploring unfamiliar codebases, understanding legacy systems, generating boilerplate code, and automating repetitive tasks. It relies on the built-in tools (Read, Write, Bash, Grep, Glob) and integrates with Model Context Protocol (MCP) servers. An engineer submits two requests: - Request A: "Rename the `getUserData` function to `fetchUserProfile` everywhere it's used." - Request B: "Improve error handling throughout the data processing module — add try/catch blocks, meaningful error messages, and ensure failures don't silently corrupt data." For which request does specifying an explicit multi-phase workflow (such as analyze → propose → implement with review) most improve the quality of the outcome?

ANeither request benefits significantly
BRequest A, the function rename task
CBoth requests benefit equally
DRequest B, the error handling task
Question #52Part 1Agentic Architecture & Orchestration

You are building developer productivity tools with the Claude Agent SDK. The agent helps engineers explore unfamiliar codebases, understand legacy systems, generate boilerplate code, and automate repetitive tasks. It relies on the built-in tools (Read, Write, Bash, Grep, Glob) and integrates with Model Context Protocol (MCP) servers. Yesterday, an engineer used the agent to analyze a legacy authentication module and identified two distinct refactoring approaches: - Extracting a microservice - Refactoring in-place Today, the engineer wants to explore both approaches in depth — having the agent propose specific code changes for each — before deciding which one to implement. What is the most effective way to structure this exploration?

AStart two fresh sessions, manually providing a summary of yesterday’s analysis findings to establish context.
BResume yesterday’s session and explore both approaches sequentially within the same conversation thread.
CResume yesterday’s session to explore the first approach, then start a new session for the second, manually recreating the original context.
DUse fork_session to create two branches from yesterday’s analysis, exploring one approach in each fork.
Question #53Part 1Claude Code Configuration & Workflows

Your team frequently migrates React components to Vue, and you have written a step-by-step workflow for Claude Code to follow during each migration. You want every developer on the team to be able to invoke this workflow by typing `/migrate-component`, and you want the workflow to stay in sync as the team continues to iterate on it. Where should you place the skill file?

AIn ~/.claude/skills/migrate-component/SKILL.md on each developer’s machine
BIn .claude/skills/migrate-component/SKILL.md at the project root, committed to version control
CIn the project’s.claude/settings.json using a skillOverrides entry to register and define the workflow
DAs a detailed instruction block in the project’s root CLAUDE.md file
Question #54Part 1Context Management & Reliability

You are building developer productivity tools with the Claude Agent SDK. The agent assists engineers in exploring unfamiliar codebases, understanding legacy systems, generating boilerplate code, and automating repetitive tasks. It relies on the built-in tools (Read, Write, Bash, Grep, Glob) and integrates with Model Context Protocol (MCP) servers. Suppose your agent has already analyzed a complex service module by: - Reading 23 source files - Tracing request flows - Identifying error handling patterns A developer now wants to compare two different testing strategies before committing to one: 1. End-to-end tests with mocked external services 2. Snapshot tests capturing expected outputs They need to develop both approaches independently so they can evaluate the trade-offs between them. How should you manage the sessions in this case?

AStart two fresh sessions, having each re-read the relevant source files before beginning.
BResume the analysis session with fork_session enabled, creating a separate branch for each testing strategy.
CExport the analysis session's key findings to a file, then create two new sessions that reference this file.
DContinue in the original session, developing end-to-end tests first, then snapshot tests sequentially.
Question #55Part 1Tool Design & MCP Integration

You are building a customer support resolution agent using the Claude Agent SDK. The agent handles high-ambiguity requests such as returns, billing disputes, and account issues, and has access to backend systems through custom Model Context Protocol (MCP) tools: get_customer, lookup_order, process_refund, and escalate_to_human. Your target is 80%+ first-contact resolution while still knowing when to escalate. After expanding the agent's MCP tools with delivery-specific capabilities — check_delivery_status, contact_driver, issue_credit, apply_promo_code, update_delivery_address, and reschedule_delivery — the total tool count grows from 4 to 10. Your evaluation suite shows tool selection accuracy dropping from 88% to 71%. Log analysis reveals that most errors involve the agent choosing between semantically overlapping tools: calling issue_credit when process_refund was the correct choice, and calling check_delivery_status when lookup_order already returns the needed data. Which approach structurally eliminates the semantic overlap identified in the logs as the source of these errors?

AEnable the tool search tool with defer_loading on the six new tools, keeping the original four always loaded, so the agent dynamically discovers specialized tools only when needed.
BSplit the tools across two sub-agents – a “financial resolution” agent with process_refund , issue_credit ,and apply_promo_code , and a “delivery operations” agent with the remaining delivery tools – with a coordinator routing between them.
CAdd few-shot examples to the system prompt demonstrating correct selection for each ambiguous tool pair, such as showing when issue_credit applies versus when process_refund is appropriate.
DConsolidate semantically overlapping tools – merge issue_credit and process_refund into a single resolve_compensation tool with an action parameter, and fold check_delivery_status into lookup_order with an optional include_tracking flag.
Question #56Part 1Agentic Architecture & Orchestration

While testing an agent, you notice that when a customer states, "I need a refund for my recent purchase," the agent immediately invokes process_refund — but supplies the required order_id parameter with a plausible-looking value that it made up, rather than first calling lookup_order to retrieve the actual order ID. As a result, the refund call fails because the invented order ID does not correspond to any real order. Which change would directly address the root cause of the agent inventing the order_id value?

ASwitch tool_choice from “auto” to “any” to force the agent to make a tool call on every turn.
BUpdate the process_refund tool description to explicitly state that order_id must be obtained from a prior lookup_order call and must never be assumed or invented.
CPre-parse incoming customer messages to extract any order IDs mentioned, and inject them into the conversation context before passing to Claude.
DAdd server-side validation that checks whether the order_id exists in your database before executing the refund, returning an error to the agent if not found.
Question #57Part 1Tool Design & MCP Integration

Anthropic's tool use documentation advises: "Write instructive error messages. Instead of generic errors like 'failed', include what went wrong and what Claude should try next." A billing dispute agent uses a `lookup_order` tool that catches all exceptions and always returns a tool result with `is_error: true` and the message "Tool execution failed". Monitoring reveals two distinct failure patterns: - The agent repeatedly retries the identical call until it hits the turn limit. - The agent immediately calls `escalate_to_human` without attempting any alternative tool. Which change follows the documented recommendation and gives Claude the information it needs to choose the correct recovery action for each type of error?

AImplement retry logic with exponential backoff inside each tool implementation so transient errors are resolved transparently within the tool before any failure result is surfaced to Claude in the agentic loop.
BAdd an error classification step in the agentic loop that intercepts tool errors before Claude sees them, tags each as “retry,” “try_alternative,” or “escalate,” and appends that recommendation to the tool result.
CRemove is_error: true and return the error details as normal tool content, so Claude reasons about the response as data rather than treating it as a flagged failure condition that biases retry behavior.
DReturn error-type-specific messages with is_error: true, e.g., “Order not found-try get_customer to search by phone” for data errors and “Database timeout (transient)-retry should succeed” for infrastructure errors.
Question #58Part 1Agentic Architecture & Orchestration

A customer reaches out about a warranty claim on a power drill. Resolving the request requires multiple sequential tool calls: `get_customer` to look up their account, `lookup_order` to find the purchase details, and then either `process_refund` or `escalate_to_human` depending on warranty eligibility. You are implementing the agentic loop that orchestrates these steps using the Claude API. What is the primary mechanism your application uses to determine whether to continue the loop or stop?

AYou manually set the tool_choice parameter to “none” after the final expected tool call to force Claude to stop requesting tools.
BYou check whether Claude's response contains a text content block – if text is present, the agent has produced its final answer and the loop should exit.
CYou track the number of tool calls made and exit the loop once a preconfigured maximum is reached.
DYou check the stop_reason field in each API response – the loop continues while it equals “tool_use” and exits when it changes to “end_turn” or another terminal value.
Question #59Part 1Context Management & Reliability

You are building developer productivity tools with the Claude Agent SDK. The agent helps engineers explore unfamiliar codebases, understand legacy systems, generate boilerplate code, and automate repetitive tasks. It relies on the built-in tools (Read, Write, Bash, Grep, Glob) and also integrates with Model Context Protocol (MCP) servers. During testing, you notice that in extended exploration sessions lasting 30 or more minutes, the agent begins giving inconsistent answers about code structure it already discussed earlier. Engineers report having to re-explain context about modules they have already had the agent explore. What is the most effective approach to address this issue?

AImplement automatic context clearing every 15 minutes to ensure the agent starts with fresh, uncontaminated context.
BSwitch to a higher-capacity model tier to provide more context window space for accumulated exploration data.
CCreate summaries of all source files before exploration begins, loading only these compressed representations into context.
DHave the agent maintain a scratchpad file that records key findings, referencing it for subsequent questions.
Question #60Part 1Claude Code Configuration & Workflows

You need to add a date validation check to ensure that event dates fall in the future. This change requires adding a conditional statement to one existing function within a single file. What is the most appropriate approach to make this change?

AEnter plan mode first to create a detailed implementation strategy before making the change.
BEnter plan mode to analyze how the validation might impact other parts of the reservation flow.
CUse direct execution to make the change.
DStart with extended thinking mode enabled to ensure thorough reasoning about the validation logic.
Question #61Part 2Claude Code Configuration & Workflows

You want to implement a complex graph traversal algorithm that has specific performance requirements and must correctly handle edge cases such as disconnected nodes, cycles, and weighted edges. You want to structure your workflow so that you can efficiently and progressively refine the implementation with Claude across multiple iterations. Which approach would most effectively enable this kind of progressive improvement across iterations?

AHave Claude extensively research the algorithm and create a detailed implementation plan using extended thinking, then implement the complete solution based on that plan.
BProvide Claude with a reference implementation from documentation, then ask it to rewrite the code to match your codebase style and add the required edge case handling, comparing outputs against the reference.
CProvide Claude with a detailed natural language specification of the algorithm, including all requirements and edge cases. Review each output manually and provide descriptive feedback on what behavior needs to change.
DWrite a test suite covering expected behavior, edge cases, and performance requirements before implementation. Ask Claude to write code that passes the tests, then iterate by sharing test failures with each refinement request.
Question #62Part 2Context Management & Reliability

You have documented API error-handling conventions in a CLAUDE.md file at your project root, specifying that endpoint handlers should use a custom ApiError class. After several sessions, you notice that Claude Code sometimes follows these conventions and sometimes instead uses generic try/catch blocks with string messages. This inconsistency appears random across different coding sessions. What is the most efficient first diagnostic step to take?

AAdd a more detailed code examples to your CLAUDE.md showing the exact ApiError usage pattern for different endpoint types.
BRun /memory to check which memory files are loaded and verify your CLAUDE.md is included.
CSearch for conflicting instructions in ~/.claude/CLauDe.md or ~/.claude/rules/ that might override your project conventions.
DCreate path-specific rules in .claude/rules/handlers.md with YAML frontmatter scoping the error handling instructions to your API handler files.
Question #63Part 2Tool Design & MCP Integration

Your team has connected a custom MCP server that provides DevOps workflow templates. This server exposes several MCP prompts (such as deploy_checklist and incident_response) in addition to tools. How do these MCP prompts become accessible within Claude Code?

AThey are surfaced as @ -mentionable resources alongside files, fetched and attached to your message when referenced.
BThey are automatically prepended to every conversation as additional system-level context, influencing Claude’s behavior throughout the session.
CThey are added to Claude Code’s tool registry alongside the server’s tools, invoked automatically by the model when relevant to the task.
DThey appear as slash commands (e.g., mcp_servername_deploy_checklist) that you can invoke, with arguments passed after the command name.
Question #64Part 2Context Management & Reliability

You're implementing a new payment processing module that needs to follow your project's established patterns for database transactions, error handling, and audit logging. You've identified three existing modules that exemplify these patterns: - db_utils.py - error_handlers.py - audit_logger.py This is a one-off integration task, and these patterns are already well documented in your team wiki, so they don't need additional project-level documentation. What is the most effective approach?

AAdd documentation of each pattern to your CLAUDE.md file, establishing them as project conventions that Claude will apply automatically.
BDescribe the patterns from the three modules in natural language in your prompt, explaining the transaction handling approach, error format, and logging conventions Claude should follow.
CAsk Claude to explore your codebase to find and understand the transaction, error handling, and logging patterns before generating the new module.
DUse @ references to include the three modules directly in your prompt, giving Claude concrete code examples of the patterns to follow.
Question #65Part 2Claude Code Configuration & Workflows

Your team has three requirements for how Claude Code should behave in your project: 1. Claude must never modify files in the `db/migrations/` directory. 2. Claude should prefer your custom logging module over `console.log`. 3. All TypeScript files must be auto-formatted with Prettier after every edit. All three requirements are currently written as instructions inside your project's CLAUDE.md file. During a complex refactoring session, a developer discovers that Claude edited a migration file, violating requirement #1. How should you restructure these requirements across Claude Code's configuration mechanisms?

AAdd Edit(./db/migrations/**) to permissions.deny in the project settings, keep the logging preference in CLAUDE.md, and add a PostToolUse hook on the Edit tool that runs Prettier on changed TypeScript files.
BMove all three requirements into .claude/rules/ as path-scoped rules: one targeting db/migrations/** that forbids editing those files, and others targeting **/*.ts for the logging convention and formatting instruction.
CRewrite all three requirements in CLAUDE.md using stronger directive language and add few-shot examples that demonstrate Claude refusing to edit migration files and running Prettier after edits.
DConfigure hooks for all three: a PreToolUse hook script that blocks Edit calls targeting db/migrations/,a PreToolUse hook script that adds logging convention context before edits, and a PostToolUse hook that runs Prettier after TypeScript edits.
Question #66Part 2Prompt Engineering & Structured Output

You've asked Claude to write a data migration script, but the initial output doesn't correctly handle records with null values in required fields. What is the most effective way to iterate toward a working solution?

AManually edit the generated code to fix the null handling, then continue working with Claude on other parts.
BAdd “think harder about edge cases” to your prompt and request a complete rewrite of the migration logic.
CDescribe the null value problem in detail and ask Claude to regenerate the entire script with improved edge case handling.
DProvide a test case with example input containing null values and the expected output, then ask Claude to fix it.
Question #67Part 2Claude Code Configuration & Workflows

You have a rough idea for implementing a caching layer for API responses to speed up the `/products` endpoint — using Redis with a 5-minute TTL — but you are new to production caching and are not sure what other considerations a robust implementation requires. What is the most effective way to start your iterative workflow?

AStart with a minimal request: “Add Redis caching to /products with 5-minute TTL.” Add features and fix issues through follow-up prompts as problems surface during testing.
BWrite a specification with your known requirements and “TBD” markers for uncertain areas, having Claude propose solutions for each TBD as it implements.
CAsk Claude to interview you about the caching requirements before implementing, surfacing considerations like invalidation strategies, cache layers, consistency guarantees, and failure modes.
DUse plan mode to analyze the current/products endpoint implementation, then provide your caching requirements once Claude explains how the existing code is structured.

📢 Unlock Full Access to Success!

"The content displayed here is a promotional preview and contains only 50% of the actual exam database. To access the complete set of updated questions, please upgrade to the Full Version."

👉 Click the button and follow the instructions to secure your full access immediately!