MCP Academy · Lesson

Build Content at Read Time

Compute a resource's body when it is requested.

Lazy, Not Eager

A dynamic resource doesn't store a fixed body. Its content is computed on demand, only when a client actually asks to read it. ⚡

The Read Triggers the Work

Your resource function runs at the moment of a read request. Nothing happens until a client reads it, so you never waste effort building content no one wants.

All lessons in this course

  1. Parameterized Resource URIs
  2. Build Content at Read Time
  3. List vs Templated Resources
  4. Notify Clients of Updates
← Back to MCP Academy