Testing MCP Tools
MCP & Tooling
60-90 minutes0/4 steps0%
Step 2 of 4
Write the handler unit suite
Cheap, fast, and where most bugs die.
First time here? Paste the Context Pack first so the AI understands your project - open it from the header above.
Prompt Capsule
Build the unit suite per handler: HAPPY PATHS - representative valid inputs asserting exact outputs; VALIDATION - every rejection rule triggered (bad enum, out-of-range, missing required) asserting the error names the field and the allowed values; ERROR CONVERSION - force internal failures (missing file, dependency down via injected fakes) and assert they surface as typed tool errors, not exceptions; BOUNDARIES - values exactly at limits pass. Target: every branch in each handler covered. Run the suite and fix what it finds - first runs on previously-untested handlers usually find real bugs.
Paste into EmergentFull Build: complete implementation prompt with explicit requirements
Quick is short. Full Build is recommended for most steps. Strict forces real logic when the AI keeps faking output.
Actual change check
Expected after this step
A branch-covering unit suite, with found bugs fixed.
Should NOT happen
- An existing feature broke
- A button only logs to console
- Data disappears after refresh
- Errors fail silently with no visible state
This is what should exist before you continue. If reality does not match, do not move on.
Track what changed, failed, or needs follow-up. Notes export with the flow.
Pass the Verify Gate to complete this step