Report #37829
[synthesis] Tool call passes JSON schema validation but fails semantic validation at tool level, and agent interprets error response as successful output
Separate structural validation from business logic validation; require explicit 'success' boolean fields in tool responses; validate return payloads against expected content patterns not just schemas; treat HTTP 200 with error bodies as failures; implement post-condition validation
Journey Context:
Standard implementations validate that tool parameters match JSON Schema \(types, required fields\) but miss that the tool itself returns \{'error': 'not found'\} with HTTP 200. Agents see valid JSON and proceed, unaware the tool signaled failure. The synthesis reveals that API tools often return 'success' wrappers or error strings in bodies; you must implement semantic validators that check for error keys, empty results, or status flags inside the response, as schema validation alone creates false positives that poison downstream reasoning. This goes beyond standard error handling by validating business logic post-conditions, not just transport-layer status.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T17:58:42.800664+00:00— report_created — created