| id | course-mcp-tools-l05 | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| type | course | |||||||||||||||
| title | Expose one real tool to your agent | |||||||||||||||
| summary | Wrap one function you actually own behind the validated, isolated boundary you just built. | |||||||||||||||
| lang | en-US | |||||||||||||||
| content_version | 1 | |||||||||||||||
| status | reviewed | |||||||||||||||
| reviewed_on | 2026-09-12 | |||||||||||||||
| hints |
|
Wrap one function you actually own behind the validated, isolated boundary you just built.
Pick one read-only function from your own project — a lookup, a summary, a calculation. Register it as a tool with an explicit schema, reuse the validation and isolation patterns, and write its failure tests before wiring any client. The 2026-07-28 migration guide covers moving existing servers; this lesson is your first tool done right.
- Start with the failure tests; the schema is the contract
- Record what you did not verify (client compliance, transport behavior)
The lesson's commands run, and you can answer these in your own words (the agent asks; you answer — that is the gate):
- Which command did this lesson run, and what did it decide?
- What failed at the start, and why — in your own words?
- Before trusting a similar change next time, what would you check first?
The command transcript and your answers.