Skip to content

Latest commit

 

History

History
45 lines (33 loc) · 1.75 KB

L05.md

File metadata and controls

45 lines (33 loc) · 1.75 KB
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
title body
What this checkpoint tests
Exposing one real tool: wrap a function you own behind the validated, isolated boundary you just built.
title body
Schema honestly
Give the tool a real `inputSchema` naming required arguments — the boundary only earns trust if the schema tells the truth.
title body
The honest record
Note what your tool may and may not do — a schema that overclaims defeats the isolation you just proved.

Expose one real tool to your agent

Objective

Wrap one function you actually own behind the validated, isolated boundary you just built.

The lesson

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.

Exercise

  • Start with the failure tests; the schema is the contract
  • Record what you did not verify (client compliance, transport behavior)

Checkpoint

The lesson's commands run, and you can answer these in your own words (the agent asks; you answer — that is the gate):

  1. Which command did this lesson run, and what did it decide?
  2. What failed at the start, and why — in your own words?
  3. Before trusting a similar change next time, what would you check first?

Expected evidence

The command transcript and your answers.