Context
coerceInputForSchema (src/tools/coerce-input.ts) recovers string-encoded object/array arguments by using the declared schema as a parsing oracle. Per its own docs, $ref and allOf are out of scope: a property declared via either passes through unchanged, so effectiveSchemaFor returns an untyped node, declaresType is false, and no coercion happens.
Gap
If an upstream tool expresses an array/object parameter via $ref or allOf (rather than a flat type: "array" / type: "object"), a string-encoded value for that parameter is not recovered and will reach the wire, where a strict validator rejects it. Composio's current OUTLOOK_CREATE_DRAFT schema uses a flat type: "array" for to_recipients, so #422 covers it — but the class isn't fully closed.
Suggested fix
Add minimal $ref resolution (within the same document, against $defs) and allOf merging to structuralBranches / effectiveSchemaFor, with tests. Keep it conservative: only resolve when it yields a single concrete structural branch, matching the existing union-resolution policy.
Context
coerceInputForSchema(src/tools/coerce-input.ts) recovers string-encoded object/array arguments by using the declared schema as a parsing oracle. Per its own docs,$refandallOfare out of scope: a property declared via either passes through unchanged, soeffectiveSchemaForreturns an untyped node,declaresTypeis false, and no coercion happens.Gap
If an upstream tool expresses an array/object parameter via
$reforallOf(rather than a flattype: "array"/type: "object"), a string-encoded value for that parameter is not recovered and will reach the wire, where a strict validator rejects it. Composio's currentOUTLOOK_CREATE_DRAFTschema uses a flattype: "array"forto_recipients, so #422 covers it — but the class isn't fully closed.Suggested fix
Add minimal
$refresolution (within the same document, against$defs) andallOfmerging tostructuralBranches/effectiveSchemaFor, with tests. Keep it conservative: only resolve when it yields a single concrete structural branch, matching the existing union-resolution policy.