Is it possible to let the model read libraries I have imported?

How much would it effect context length to include a feature like this? I work with python, and a lot of the time claude hallucinates a library attribute that doesn’t exist.