MCP interview question

Agentic AIMCPHuman-in-the-Loopmedium

You are building an MCP server for a retailer's merchandising team. (1) summarize_reviews needs an LLM to condense 500 reviews, but the server must not hold an LLM API key and the user should be able to approve the request; (2) create_promo must ask the user mid-call which of two discount types to apply; (3) scan_assets may only work inside the image folders the user opened in the host. Which MCP client features fit, and why?

  1. A(1) elicitation, because the server asks the host's model for the summary; (2) sampling, because the server samples a discount type from the user; (3) roots, as the client shares the folders.
  2. B(1) sampling, with the server choosing the exact model the host must run; (2) elicitation, because the server asks the user for input; (3) resources, as the server publishes the folders it may use.
  3. C(1) sampling, with the server naming the model and the host bound to run that model; (2) elicitation, as the server asks the user for input; (3) roots, as the client shares the folders.
  4. D(1) sampling, because the host runs the completion and makes the final model choice; (2) elicitation, as the server asks the user for input; (3) roots, as the client shares the folders.
Show the answer and explanation

Correct answer: D, (1) sampling, because the host runs the completion and makes the final model choice; (2) elicitation, as the server asks the user for input; (3) roots, as the client shares the folders.

Explanation MCP

Tools, resources and prompts are server features; the three client features below let a server ask something of the host side. A server may use them only if the client declared the matching capability during initialisation.

FeatureServer asks forWho stays in controlNeed here
Samplingan LLM completion from the host's model (sampling/createMessage)the host picks the actual model (the server can only state preferences), and the user can review or deny the requestsummarising reviews without an API key on the server
Elicitationstructured input from the user mid-call (elicitation/create with a small JSON schema)the user can accept, decline or cancelchoosing the discount type
Rootsthe filesystem boundaries (root URIs) it should work within (roots/list)the client decides which roots to exposelimiting the scan to the opened folders

Why the alternatives fail:

  • Swapping sampling and elicitation confuses asking the model with asking the user.
  • Resources are a server feature: data the server offers to the client. They cannot tell the server where it may work; roots come from the client.
  • Sampling is designed so that the host keeps model choice and human oversight: the server may send only preferences and model-name hints, and the client makes the final selection, so a server can never bind the host to an exact model.

Two cautions: roots are coordination, not a sandbox, so also enforce file access with OS permissions; and the spec forbids using elicitation forms to collect sensitive information such as passwords.

Interview tip: describe sampling as "the server borrows the host's LLM", which keeps provider keys, cost and model policy in one place.

Practice it as a quiz

Answer this and the other free questions with instant grading, streaks and weak-topic tracking, or unlock all 4,000 questions.

More Agentic AI questions

  1. A telecom network-diagnosis orchestrator fans out to 8 sub-agents in parallel (one per system: radio network, core, billing, …) and waits for all of them…
  2. A bank's document pipeline in Google's Agent Development Kit (ADK) must always run extract → validate → summarise, in that order. It is built as an LlmAgent…
  3. A bank moves its claims-triage planner from a general chat model to a reasoning model. The old prompt says "Think step by step", lists a fixed 10-step script…
  4. In LLM applications, what is an AI agent?
  5. Why do long-running agents checkpoint (persist) their state after each step?