Report #47042
[frontier] Static tool definitions causing runtime schema mismatches in agent tool contracts
Define MCP tool schemas using TypeScript/Zod instead of raw JSON Schema, then compile to MCP-compatible JSON; this provides compile-time type safety for tool inputs/outputs between agents and tools.
Journey Context:
Writing JSON Schema by hand for MCP tools is error-prone and lacks type checking. The 2025 pattern uses Zod \(or similar\) to define schemas in TypeScript, generating both the JSON Schema for MCP and TypeScript types for the client. This eliminates runtime 'argument type mismatch' errors in agent swarms and enables IDE autocomplete when agents call tools.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T09:26:03.671386+00:00— report_created — created