Context, Retrieval & MCP Questions with Answers

24 practice questions on Context, Retrieval & MCP (AI Tools for Developers) with answers and step-by-step solutions. Try 10 samples below, then practise all 24 free in the AptiNest app.

Sample questions

Question 1Easy

If an AI tool can't see a file, how can you help it?

  1. Restart your computer
  2. Increase screen brightness
  3. Attach or reference the file in your request
  4. Rename the file to ai.txt so the tool notices it automatically

Answer: C. Attach or reference the file in your request

Explanation

Explicitly adding the file to context lets the model read it.

Step-by-step solution

  1. AI tools need files in the request to process them.
  2. Attaching or referencing the file gives context to the tool.
  3. This helps the AI understand and use the file data.
  4. Renaming files doesn't ensure the tool reads them automatically.
  5. The correct way is to attach or reference the file in your request.

Why the other options are wrong

  • A. Restarting the computer does not make a tool see a file; the file must be given in the request.
  • B. Screen brightness has no effect on whether an AI tool can read a file.
  • D. Renaming to ai.txt does not make the tool notice the file; attaching or referencing it does.

Tip: Always include files in your request for AI tools to use them.

Question 2Easy

MCP stands for:

  1. Managed Container Pipeline
  2. Model Context Protocol
  3. Machine Code Processor
  4. Multi Cloud Platform

Answer: B. Model Context Protocol

Explanation

The Model Context Protocol is an open standard for connecting AI applications to external tools and data.

Step-by-step solution

  1. MCP is a term used in AI tooling.
  2. It is an open standard for connecting AI applications to external tools and data.
  3. So MCP stands for Model Context Protocol. The correct answer is B (Model Context Protocol).

Why the other options are wrong

  • A. Managed Container Pipeline is not what MCP stands for.
  • C. Machine Code Processor is not what MCP stands for.
  • D. Multi Cloud Platform is not what MCP stands for.

Tip: An MCP server gives an assistant approved access to outside tools or docs.

Question 3Easy

Which of these uses up space in a model's context window?

  1. Files on your disk that you never shared
  2. The colour theme of your editor and its font size
  3. Your instructions, pasted code and earlier messages
  4. Only the model's final answer, never your input

Answer: C. Your instructions, pasted code and earlier messages

Explanation

Everything sent in the request, including conversation history and attached files, counts toward the context limit.

Step-by-step solution

  1. Your instructions and pasted code are part of the input.
  2. Earlier messages add to the conversation history.
  3. All these elements take up space in the model's context window.
  4. Files and colour theme do not count toward the limit.
  5. Final answer is separate from the input data.

Why the other options are wrong

  • A. Files on disk do not use context unless you share their content into the chat or tool input.
  • B. Editor colour theme and font size are never sent to the model, so they use no context space.
  • D. Input counts toward the context window, and the final answer is only part of it, so this is false.

Tip: Always check if your input exceeds context limits before sending.

Question 4Easy

Which kinds of things can an MCP server expose to an AI application?

  1. Tools, data resources and prompt templates
  2. Only the user's keyboard settings and shortcuts
  3. Only images of the screen
  4. Only new model weights for retraining

Answer: A. Tools, data resources and prompt templates

Explanation

MCP servers provide tools (actions), resources (data) and prompts that compatible AI clients can use.

Step-by-step solution

  1. MCP servers expose tools for AI to perform actions.
  2. They also share data resources for the AI to use.
  3. Prompt templates help guide how the AI should respond.
  4. These three things are available to compatible AI applications.
  5. Final answer: Tools, data resources and prompt templates.

Why the other options are wrong

  • B. Keyboard settings are not something an MCP server exposes; it offers tools, resources and prompts.
  • C. Screen images are not what MCP servers mainly expose; they provide tools, data resources and prompts.
  • D. Model weights are not exposed by MCP servers for retraining; they give clients tools and data.

Question 5Medium

Why does mentioning specific files (e.g. with an @file reference) often improve an assistant's answer?

  1. It deletes unrelated files
  2. It encrypts the file
  3. It puts exactly the relevant code into context
  4. It makes the model run on a faster, dedicated server

Answer: C. It puts exactly the relevant code into context

Explanation

Explicit references guarantee the important code is included instead of relying on the tool to find it.

Step-by-step solution

  1. Mentioning files gives exact context for the code.
  2. This helps the assistant focus on relevant parts.
  3. It ensures the right code is used in the answer.
  4. The model uses this to generate accurate responses.
  5. Final answer: It puts exactly the relevant code into context.

Why the other options are wrong

  • A. Mentioning a file does not delete other files; it only points the assistant to that file.
  • B. Encryption is unrelated; an @file reference only adds that file to the context.
  • D. A file reference does not change the server; it helps the answer by adding the right code.

Tip: Use @file to ensure correct code is included.

Question 6Medium

Why can a very long chat session lead to worse answers over time?

  1. Long chats switch to a different language
  2. The keyboard stops sending input
  3. Models get tired like humans after answering many questions in a row
  4. Early details may be summarised away or diluted among irrelevant context

Answer: D. Early details may be summarised away or diluted among irrelevant context

Explanation

As context fills, tools may truncate or compact history, and irrelevant text can distract the model from what matters now.

Step-by-step solution

  1. Early chat details get mixed with new info.
  2. Important parts might be lost in the mix.
  3. Model focuses on wrong things instead.
  4. Old info gets ignored or misunderstood.
  5. Answers become less accurate over time.

Why the other options are wrong

  • A. Long chats do not switch language by themselves; the real issue is diluted earlier details.
  • B. A keyboard stopping is a device fault, not a reason answers degrade over a long chat.
  • C. Models do not get tired; long context dilutes attention, so earlier details fade.

Tip: Keep chats short and focused to avoid confusion.

Question 7Medium

In MCP terminology, the AI application (such as an IDE or chat app) that connects to MCP servers is called the:

  1. Load balancer in front of the model
  2. Compiler that translates the tools
  3. Registry that stores model weights
  4. Client (or host application)

Answer: D. Client (or host application)

Explanation

MCP follows a client-server design: AI applications act as clients and servers expose tools, resources and prompts.

Step-by-step solution

  1. AI apps like IDEs connect to MCP servers.
  2. These apps are called clients in the system.
  3. Servers provide tools and resources to clients.
  4. Client is the correct term for such applications.
  5. Final answer: Client (or host application)

Why the other options are wrong

  • A. A load balancer spreads traffic between servers; it is not the app that connects to MCP servers.
  • B. A compiler translates code; it does not connect to MCP servers as the client.
  • C. A registry stores packages or model weights; the client is the app that uses MCP tools.

Tip: Remember: AI apps connecting to MCP are clients.

Question 8Medium

Which statement about MCP is accurate?

  1. It is an open protocol, so one server can work with multiple AI applications
  2. It is a database engine that stores model weights and conversation history
  3. It works only with one vendor's editor
  4. It is a programming language for AI

Answer: A. It is an open protocol, so one server can work with multiple AI applications

Explanation

Because MCP is an open standard, a server written once can be used by any MCP-compatible client.

Step-by-step solution

  1. MCP is an open protocol, which means it is not owned by one vendor.
  2. Because it is open, one server can be used with several MCP-compatible AI applications.
  3. So the accurate statement is option A.

Why the other options are wrong

  • B. MCP is a protocol, not a database engine for weights or history.
  • C. MCP is not tied to one vendor's editor.
  • D. MCP is not a programming language.

Tip: Open standards let one server serve many clients.

Question 9Hard

Which statement about retrieval-based codebase context is TRUE?

  1. If the right file isn't retrieved, the model can give a confident but wrong answer
  2. Retrieval guarantees the model has read every file in the repository
  3. Retrieval only works for repositories written in Python
  4. Retrieval makes hallucination impossible because answers come from code

Answer: A. If the right file isn't retrieved, the model can give a confident but wrong answer

Explanation

Retrieval narrows what the model sees; missing a key file means the model fills the gap with plausible guesses.

Step-by-step solution

  1. Retrieval picks a few files to show the model.
  2. If the right file is missed, the model may guess.

Why the other options are wrong

  • B. Retrieval does not read everything.
  • C. It works for many languages.
  • D. It reduces but does not remove hallucination.

Tip: Check which files were retrieved.

Question 10Hard

An assistant answers a question about your code using a function that was deleted two commits ago. What is the most likely cause?

  1. Its retrieved context or index was stale
  2. The function is secretly still running
  3. Git automatically restores deleted functions
  4. The model has access to the future

Answer: A. Its retrieved context or index was stale

Explanation

If the tool's index or pasted context is outdated, the model reasons over old code; refreshing context fixes it.

Step-by-step solution

  1. The function was deleted two commits ago.
  2. The assistant uses a stale context or index.
  3. Stale context leads to incorrect reasoning about old code.
  4. Refreshing the context fixes this issue.
  5. Final answer: Its retrieved context or index was stale.

Why the other options are wrong

  • B. A deleted function cannot be running; it was removed, so the answer used stale information.
  • C. Git does not restore deleted functions on its own; the answer simply used old context.
  • D. No model can see the future; the answer came from stale context, not foresight.

Tip: Always refresh context when code changes to avoid stale data issues.

Practise all 24 questions free

The full question bank with timed practice, progress tracking and Vidya, your AI tutor. Free, no ads.

Open this topic in the app →

Related topics

See all AI Tools for Developers topics · All topics