Still facing the error code: 400 in both L3 and L5

hi @agparth

are running codes locally?

lesly suggested this possible solution

hope it helps

Regards

Dr. Deepti

Hi Deepti,

I am running it in the DLAI workspace

The pinged response by lesly. actually shares code correction! to be done in the process query of L5 lab for platform as well as locally.

L3 also probably needs same correction to be updated in the lab.on platform.

Even I encountered same error in both labs on dlai.platforrm

@lesly.zerna

the tool result need to be added to the tool use codes as both L3 and L5 are causing same error when running the chat.loop()

Regards

Dr. Deepti

1 Like

Hi @agparth

About your request referring to Lesson 5: Creating an MCP Client I noticed that running with the instructor’s example it is working as expected:

However, asking the chatbot with your query, I’m encountering the same issue as you shared

Take into account this course was updated with the recommended version of sonnet model (since claude-3-7-sonnet-20250219 was deprecated in February 2026) - when we updated to claude-sonnet-4-6we’ve ensured the notebooks were working (we just noticed, it is less than a week that an issue about the tools was reported!)

I’m sharing this with the team! And I just tested this solution about tools use that you can find details here this will be affected the mcp_chatbot.py and searching for neuroscience as you asked was working! (this code can help you continuing learning in the meanwhile, we update the notebooks again, this week)

We are thankful you are learning with us and help us to improve!

Lesly - DLAI