In the sentence “The boy told Mary that he wanted/had wanted to tell her something”.

  1. Is it OK to use both tenses in bold?
  2. What other verb can I use in order to avoid repetion of tell? Can it be “let her know something”?
    Thank you in advance!

I don’t think the past perfect is needed because the telling and the wanting are both referring to the same time - past simple.

Yes, ‘let her know’ is fine. Or you could say: Mary informed …

Obviously, the past perfect would be OK with an additional phrase.
The boy told Mary that he had wanted to tell her something. However, his boss had sent him on an errand so he didn’t see her that day.