promptdojo_

Write dispatch_with_validation(tool_name, args) that:

  • Looks up SCHEMAS[tool_name]. If missing, return "UNKNOWN_TOOL: <name>" (don't crash).
  • Runs validate(args, schema). If invalid, return "VALIDATION_ERROR: <error message>".
  • On valid: looks up TOOLS[tool_name], calls it with **verdict["args"], returns the result.

Three cases run for you. Expected output:

results for ramen
VALIDATION_ERROR: missing required field: q
UNKNOWN_TOOL: frobnicate

this step needs the editor

on desktop today; in the app (coming soon). save your spot and we'll bring you back here when you're ready.

open this same url on a laptop to keep going today.