Querying MySQL from Gemini

I am trying to query my mysql database using gemini flash 2.0 as an AI model. It doesn’t seem to be working. I tried creating a tool to get the DB schema but that fails. Also, implementing the AI Agent as a SQL Agent also just fails. The error I get when running with the tool to get the DB schema looks like this:

[GoogleGenerativeAI Error]: Error fetching from https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash-exp:streamGenerateContent?alt=sse: [400 Bad Request] * GenerateContentRequest.tools[0].function_declarations[0].parameters.properties: should be non-empty for OBJECT type

Anyone run into this before, any idea on what might be wrong? thank you

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Not sure of the version, its the current cloud version as I am testing it out with a trial.

Database is MySQL.

Welcome to the community :tada:
Could you share your workflow so we can have a better understanding of what you’re building?

Tip for sharing your workflow in the forum

Pasting your n8n workflow


Ensure to copy your n8n workflow and paste it in the code block, that is in between the pairs of triple backticks, which also could be achieved by clicking </> (preformatted text) in the editor and pasting in your workflow.

```
<your workflow>
```

Make sure that you’ve removed any sensitive information from your workflow and include dummy data or pinned data as much as you can!


This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.