AI Learning Hub › Learn AI › Self-Paced Courses › MCP Without the Mystery › Let an AI Choose a Tool
Module 8 ยท Intermediate
Let an AI Choose a Tool
What changes when a model can select among exposed tools: a goal rather than an instruction, a tool result as context, and a constraint as a boundary.
By the end
- Explain what changes when a model can select MCP tools
- Distinguish a goal from a specific tool instruction
- Recognize a model-selected tool call
- See how a tool result becomes context for the model’s response
- Use a constraint to keep delegated work within a boundary
- Explain why delegation does not remove the need for human review
This module is a guided demonstration. You do not need Claude Code to complete the rest of the tutorial. Read the recorded exchange below; nothing here is required setup.
Until now, you chose every capability
In Inspector, you personally selected search_resources, entered its input, clicked Execute Tool, opened the resource, and retrieved the prompt.
The Practice Resource Desk did not decide what you wanted. Inspector did not decide what tool would help.
Now we introduce an AI model between your goal and the MCP tools. Instead of saying “run search_resources with research,” you can describe what you want to accomplish.
Inspector — you choose the tool
Goal: find useful practice resources.
Then you manually decide: search_resources, and query = research.
AI host — you describe the goal
You tell the AI what you need and what boundaries to respect.
The model may decide that search_resources is the appropriate capability and construct the tool call.
The tool has not changed. Who selects it has changed.
Three words to learn
Delegation
Giving an AI a goal while allowing it to choose some of the steps or capabilities used to pursue that goal.
Tool call
A request to invoke a particular tool with particular input.
Constraint
A boundary that limits what the AI should do while pursuing a goal.
Watch the handoff
For this demonstration we used Stanford Claude Code, because Module 7 established it is the Stanford-provided surface that can connect directly to the local practice server. It was run in an empty folder with nothing else in it, so the only place the answer could come from was the MCP connection.
Both tools were available to the model — the read-only search and the note-writing tool. Only the search tool was permitted to run.
Already use Stanford Claude Code? You can reproduce this demonstration with your downloaded Practice Resource Desk.
This was the entire human instruction:
The goal and the constraint
What resources from the Practice Resource Desk could help me with research? Do not create or modify any files.
Notice what the instruction does not contain. It never names search_resources. It never mentions a query field. It does not say which of the five fictional resources to look for.
Claude then made three tool calls of its own choosing:
What the model did — recorded from the run
search_resources query: "research"
-> 2 of 5 practice resources matched "research":
Research Planning Workshop
Source Evaluation Checklist
search_resources query: "citation"
-> 1 of 5 practice resources matched "citation":
Citation Practice Guide
search_resources query: "writing"
-> 1 of 5 practice resources matched "writing":
Citation Practice Guide
And this is part of the answer it wrote back:
Claude’s reply — recorded from the run
Three of the desk's five resources are relevant to research work: Research Planning Workshop (Workshop, any student) - a 90-minute session on turning a broad question into an actual research plan... Source Evaluation Checklist (One-page checklist, anyone) - criteria for judging whether a source is current, relevant, and appropriate to cite... Citation Practice Guide (Self-paced guide, first-year students) - a walkthrough of citation formats, for the write-up stage. Together they map onto the three phases: plan the question, vet the sources, cite them correctly. One note: the desk describes its entire collection as fictional...
In this observed run, Claude selected search_resources. Models can make different choices in another run, especially when several tools could plausibly help.
What changed?
- You supplied the goal and constraint. Find useful Practice Resource Desk material about research, without changing files.
- The model selected a tool. In the observed run, Claude chose
search_resources. - The model supplied tool input. First
research, thencitation, thenwriting— three searches it decided to run. - The host invoked the MCP tool and received its result. The same text you would have seen in Inspector’s Results panel.
- The model used that result to write its answer to you.
Step five is worth separating out. The Practice Resource Desk never wrote a word of that reply. It returned the same plain text it returned in Module 2; the model read that text and composed prose around it. The tool supplied facts, not sentences.
The schema became useful again
In Module 5, the schema helped Inspector build a form for a human.
Here, the same tool description and expected input structure help an AI host and model understand how the capability can be called. The host made the tool’s definition available as part of the model’s tool-use environment.
You no longer typed into the query field directly — but the tool still required valid input. Something had to produce { query: "research" } in exactly the shape the tool accepts, or it would have been rejected the way your 42 was in Module 5.
Your constraint mattered
The instruction ended with five words: Do not create or modify any files.
That was there for a reason. Since Module 6, this server exposes both a read-only search tool and a tool that writes a local file. The task did not require a write, so the human supplied a boundary before delegating.
A good delegation describes not only the goal, but also important limits.
A constraint is an instruction to the AI, not a technical guarantee. Writing “do not modify any files” asks the model to behave a certain way. It does not make writing impossible.
In this demonstration the write tool was also withheld at the host level, so the sentence was not the only thing standing between the model and the file. That belt-and-braces arrangement is the honest way to run a demonstration like this — and a reasonable habit generally.
Same tool, different decision point
- Module 2 — Inspector
- You chose
search_resources. You suppliedcitation. You clicked Execute Tool. - Module 8 — AI host
- You supplied a goal and a no-write constraint. The model selected
search_resources. The host handled the tool interaction.
MCP did not become “more autonomous.” The host and model changed how the capability was selected.
Tool choice is a judgment
A model can choose the wrong tool, an unnecessary tool, an unhelpful input, or no tool at all.
Tool descriptions and schemas help, but they do not guarantee a good decision.
That is why the human still needs to understand the available capabilities — which is what Modules 1 through 6 were for.
What to notice
You stopped specifying the mechanism and started specifying the goal.
- In Inspector, you chose the capability yourself.
- In this demonstration, the model chose a capability from those the host made available.
- But the server remained the same.
Delegation moves a decision. It does not remove responsibility for understanding the tools, constraints, and results.
Look back at Claude’s reply once more. It reported that the collection is fictional. That was correct — but you only know it was correct because you read those same records yourself in Module 2.
Checkpoint
You are ready for Module 9 if you can:
- explain delegation in ordinary language;
- recognize a tool call;
- distinguish a goal from a tool-specific instruction;
- explain what the model selected and what the host executed;
- explain why a natural-language constraint is useful but not a security guarantee; and
- identify what still needs human review after a tool-assisted answer.