Chapter 6 Exercises
These exercises will help you design effective prompts and workflows that give users control.
Quiz
Test your understanding of resources, prompts, and workflows:
Exercises
-
Prompt Design Workshop ⭐⭐ Intermediate (25 min)
- Design structured analysis prompts
- Create safe data modification workflows
- Build context-setting prompts for exploration
-
Building and Validating Hard Workflows ⭐⭐ Intermediate (30 min)
- Build a SequentialWorkflow with multiple steps
- Write validation tests for structural correctness
- Use
cargo pmcp validate workflowsfor project validation - Understand binding names vs step names
Key Concepts to Practice
- Prompts as User Control: Users explicitly choose workflows by invoking prompts
- Numbered Steps: AI follows explicit, numbered steps more reliably
- Guard Rails: Preview, confirm, then execute for dangerous operations
- Tool References: Name specific tools in prompts so AI knows what to use
Resources vs Tools Quick Reference
| Use Resources For | Use Tools For |
|---|---|
| Schema and structure | Parameterized queries |
| Configuration | Write operations |
| Reference data | External integrations |
| Documentation | Computed results |
Next Steps
After completing these exercises, you've finished Part II: Thoughtful Design! Continue to:
- Part III: Cloud Deployment - Deploy to production
- Review Part II Exercises - Practice more design patterns