Function: coercePromptArgs()
ts
function coercePromptArgs(rawArgs, zodSchema): Record<string, unknown>;Defined in: packages/core/src/prompt/PromptExecutionPipeline.ts:100
Schema-Informed Boundary Coercion.
Reads the Zod schema AST to determine expected types, then coerces string values from the MCP wire format.
This is NOT guessing. The coercion is derived from the developer's declared schema — it's deterministic.
Parameters
| Parameter | Type | Description |
|---|---|---|
rawArgs | Record<string, string> | Raw string arguments from the MCP client |
zodSchema | ZodObject<ZodRawShape> | The validated Zod schema for this prompt |
Returns
Record<string, unknown>
Coerced argument values ready for Zod validation