In MCP, what exactly is a 'tool' and who decides when to call it?
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
An MCP tool is a model-invokable function with a name, description, and JSON Schema for its arguments. The LLM decides when to call it; the server executes the action.
Imagine the AI has a toolbox in front of it. Each tool in the box has a label (the name), a small card explaining what it does (the description), and a little form showing what inputs it needs (the JSON Schema). The AI reads the cards, picks a tool that fits the current task, fills in the form, and hands it to the runtime. The runtime actually picks up the tool, uses it (creates the GitHub issue, writes the file, sends the message), and reports back what happened. The AI never touches the tool directly; it only chooses which one to use and fills in the form. Tools are how MCP servers let the model take action in the outside world.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
5 min: state the definition (name, description, JSON Schema), walk the five-step call lifecycle (initialize, tools/list, catalog translation, function-calling emission, tools/call plus result), distinguish tools from resources and prompts on the invocation axis, name three concrete tools from reference servers, and explain what function calling guarantees versus what it does not.
Real products, models, and research that use this idea.
What an interviewer would ask next. Try answering before peeking at the approach.
Red flags and common mistakes that signal junior thinking. Click to expand.
Confusing tools with resources. Tools are model-invoked and may have side effects; resources are host-pulled and strictly read-only. The invocation path and safety model are completely different.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.