Expand description
Type coercion and validation for MCP tool parameters.
This module provides flexible type coercion to help AI agents interact with MCP tools correctly, even when they pass parameters with slightly incorrect types (e.g., numbers instead of strings).
Structs§
- Coercion
Error - Structured error type for coercion failures.
Constants§
- VALID_
INTERACTION_ TYPES - Valid interaction type values
Functions§
- coerce_
and_ validate - Coerce and validate a JSON value into the target type.
- generate_
recovery_ suggestions - Generate recovery suggestions based on error message patterns.