anthropicToolDefinitionToOpenAI: ZodEffects<
    ZodObject<
        {
            description: ZodString;
            input_schema: ZodObject<
                {
                    additionalProperties: ZodOptional<ZodBoolean>;
                    properties: ZodRecord<
                        ZodString,
                        ZodUnion<
                            [
                                ZodObject<
                                    {
                                        description: ZodOptional<(...)>;
                                        enum: ZodOptional<(...)>;
                                        type: ZodEnum<(...)>;
                                    },
                                    "passthrough",
                                    ZodTypeAny,
                                    objectOutputType<
                                        { description: ...; enum: ...; type: ... },
                                        ZodTypeAny,
                                        "passthrough",
                                    >,
                                    objectInputType<
                                        { description: ...; enum: ...; type: ... },
                                        ZodTypeAny,
                                        "passthrough",
                                    >,
                                >,
                                ZodObject<
                                    { anyOf: ZodArray<(...), (...)> },
                                    "strip",
                                    ZodTypeAny,
                                    { anyOf: (...)[] },
                                    { anyOf: (...)[] },
                                >,
                            ],
                        >,
                    >;
                    required: ZodOptional<ZodArray<ZodString, "many">>;
                    type: ZodLiteral<"object">;
                },
                "passthrough",
                ZodTypeAny,
                objectOutputType<
                    {
                        additionalProperties: ZodOptional<ZodBoolean>;
                        properties: ZodRecord<
                            ZodString,
                            ZodUnion<
                                [
                                    ZodObject<
                                        { description: ...; enum: ...; type: ... },
                                        "passthrough",
                                        ZodTypeAny,
                                        objectOutputType<(...), (...), (...)>,
                                        objectInputType<(...), (...), (...)>,
                                    >,
                                    ZodObject<
                                        { anyOf: ... },
                                        "strip",
                                        ZodTypeAny,
                                        { anyOf: ... },
                                        { anyOf: ... },
                                    >,
                                ],
                            >,
                        >;
                        required: ZodOptional<ZodArray<ZodString, "many">>;
                        type: ZodLiteral<"object">;
                    },
                    ZodTypeAny,
                    "passthrough",
                >,
                objectInputType<
                    {
                        additionalProperties: ZodOptional<ZodBoolean>;
                        properties: ZodRecord<
                            ZodString,
                            ZodUnion<
                                [
                                    ZodObject<
                                        { description: ...; enum: ...; type: ... },
                                        "passthrough",
                                        ZodTypeAny,
                                        objectOutputType<(...), (...), (...)>,
                                        objectInputType<(...), (...), (...)>,
                                    >,
                                    ZodObject<
                                        { anyOf: ... },
                                        "strip",
                                        ZodTypeAny,
                                        { anyOf: ... },
                                        { anyOf: ... },
                                    >,
                                ],
                            >,
                        >;
                        required: ZodOptional<ZodArray<ZodString, "many">>;
                        type: ZodLiteral<"object">;
                    },
                    ZodTypeAny,
                    "passthrough",
                >,
            >;
            name: ZodString;
        },
        "strip",
        ZodTypeAny,
        {
            description: string;
            input_schema: {
                additionalProperties?: boolean;
                properties: Record<
                    string,
                    | objectOutputType<
                        {
                            description: ZodOptional<ZodString>;
                            enum: ZodOptional<ZodArray<(...), (...)>>;
                            type: ZodEnum<[(...), (...), (...), (...), (...), (...), (...)]>;
                        },
                        ZodTypeAny,
                        "passthrough",
                    >
                    | {
                        anyOf: objectOutputType<
                            { description: ...; enum: ...; type: ... },
                            ZodTypeAny,
                            "passthrough",
                        >[];
                    },
                >;
                required?: string[];
                type: "object";
            } & { [k: string]: unknown };
            name: string;
        },
        {
            description: string;
            input_schema: {
                additionalProperties?: boolean;
                properties: Record<
                    string,
                    | objectInputType<
                        {
                            description: ZodOptional<ZodString>;
                            enum: ZodOptional<ZodArray<(...), (...)>>;
                            type: ZodEnum<[(...), (...), (...), (...), (...), (...), (...)]>;
                        },
                        ZodTypeAny,
                        "passthrough",
                    >
                    | {
                        anyOf: objectInputType<
                            { description: ...; enum: ...; type: ... },
                            ZodTypeAny,
                            "passthrough",
                        >[];
                    },
                >;
                required?: string[];
                type: "object";
            } & { [k: string]: unknown };
            name: string;
        },
    >,
    objectOutputType<
        {
            function: ZodObject<
                {
                    description: ZodOptional<ZodString>;
                    name: ZodString;
                    parameters: ZodObject<
                        {
                            additionalProperties: ZodOptional<ZodBoolean>;
                            properties: ZodRecord<ZodString, ZodUnion<[(...), (...)]>>;
                            required: ZodOptional<ZodArray<ZodString, "many">>;
                            type: ZodLiteral<"object">;
                        } & { strict: ZodOptional<ZodBoolean> },
                        "passthrough",
                        ZodTypeAny,
                        objectOutputType<
                            {
                                additionalProperties: ZodOptional<ZodBoolean>;
                                properties: ZodRecord<ZodString, ZodUnion<(...)>>;
                                required: ZodOptional<ZodArray<(...), (...)>>;
                                type: ZodLiteral<"object">;
                            } & { strict: ZodOptional<ZodBoolean> },
                            ZodTypeAny,
                            "passthrough",
                        >,
                        objectInputType<
                            {
                                additionalProperties: ZodOptional<ZodBoolean>;
                                properties: ZodRecord<ZodString, ZodUnion<(...)>>;
                                required: ZodOptional<ZodArray<(...), (...)>>;
                                type: ZodLiteral<"object">;
                            } & { strict: ZodOptional<ZodBoolean> },
                            ZodTypeAny,
                            "passthrough",
                        >,
                    >;
                },
                "passthrough",
                ZodTypeAny,
                objectOutputType<
                    {
                        description: ZodOptional<ZodString>;
                        name: ZodString;
                        parameters: ZodObject<
                            {
                                additionalProperties: ZodOptional<ZodBoolean>;
                                properties: ZodRecord<ZodString, ZodUnion<(...)>>;
                                required: ZodOptional<ZodArray<(...), (...)>>;
                                type: ZodLiteral<"object">;
                            } & { strict: ZodOptional<ZodBoolean> },
                            "passthrough",
                            ZodTypeAny,
                            objectOutputType<
                                {
                                    additionalProperties: ZodOptional<(...)>;
                                    properties: ZodRecord<(...), (...)>;
                                    required: ZodOptional<(...)>;
                                    type: ZodLiteral<(...)>;
                                } & { strict: ZodOptional<(...)> },
                                ZodTypeAny,
                                "passthrough",
                            >,
                            objectInputType<
                                {
                                    additionalProperties: ZodOptional<(...)>;
                                    properties: ZodRecord<(...), (...)>;
                                    required: ZodOptional<(...)>;
                                    type: ZodLiteral<(...)>;
                                } & { strict: ZodOptional<(...)> },
                                ZodTypeAny,
                                "passthrough",
                            >,
                        >;
                    },
                    ZodTypeAny,
                    "passthrough",
                >,
                objectInputType<
                    {
                        description: ZodOptional<ZodString>;
                        name: ZodString;
                        parameters: ZodObject<
                            {
                                additionalProperties: ZodOptional<ZodBoolean>;
                                properties: ZodRecord<ZodString, ZodUnion<(...)>>;
                                required: ZodOptional<ZodArray<(...), (...)>>;
                                type: ZodLiteral<"object">;
                            } & { strict: ZodOptional<ZodBoolean> },
                            "passthrough",
                            ZodTypeAny,
                            objectOutputType<
                                {
                                    additionalProperties: ZodOptional<(...)>;
                                    properties: ZodRecord<(...), (...)>;
                                    required: ZodOptional<(...)>;
                                    type: ZodLiteral<(...)>;
                                } & { strict: ZodOptional<(...)> },
                                ZodTypeAny,
                                "passthrough",
                            >,
                            objectInputType<
                                {
                                    additionalProperties: ZodOptional<(...)>;
                                    properties: ZodRecord<(...), (...)>;
                                    required: ZodOptional<(...)>;
                                    type: ZodLiteral<(...)>;
                                } & { strict: ZodOptional<(...)> },
                                ZodTypeAny,
                                "passthrough",
                            >,
                        >;
                    },
                    ZodTypeAny,
                    "passthrough",
                >,
            >;
            type: ZodLiteral<"function">;
        },
        ZodTypeAny,
        "passthrough",
    >,
    {
        description: string;
        input_schema: {
            additionalProperties?: boolean;
            properties: Record<
                string,
                | objectInputType<
                    {
                        description: ZodOptional<ZodString>;
                        enum: ZodOptional<ZodArray<ZodString, "many">>;
                        type: ZodEnum<
                            [
                                "string",
                                "number",
                                "boolean",
                                "object",
                                "array",
                                "null",
                                "integer",
                            ],
                        >;
                    },
                    ZodTypeAny,
                    "passthrough",
                >
                | {
                    anyOf: objectInputType<
                        {
                            description: ZodOptional<(...)>;
                            enum: ZodOptional<(...)>;
                            type: ZodEnum<(...)>;
                        },
                        ZodTypeAny,
                        "passthrough",
                    >[];
                },
            >;
            required?: string[];
            type: "object";
        } & { [k: string]: unknown };
        name: string;
    },
> = ...

Parse incoming object as an Anthropic tool call and immediately convert to OpenAI format