I am working with a client troubleshooting an automation. they have a ai chat agent set up and that will lookup information from a mysql database. the database can return up to 50 rows of data, however, the ai agent only returns the first row of the database as a chat response.
query example: “list the names of 5 players who are graduating in 2026”.
the goal is the have the chat model return all the results from their query, not just the first result.
I set up a similar workflow, replaced mysql with an airtable table, and the 5 names were returned, instead of the 1 name when I had mysql connected.
What is the error message (if any)?
no error, only get the first row of data from many rows.
The issue appears to be related to how the AI Agent processes MySQL tool results. Try these solutions:
• Check if there’s a `top_k` or limit parameter in your MySQL tool configuration that might be restricting results to 1 row
• As a workaround, consider using the “Call Another Workflow” tool instead of the direct MySQL tool - create a separate workflow that handles the MySQL query and returns all results
• Test with a simple HTTP Request tool or other data source to confirm if this is MySQL-specific
The fact that Airtable works correctly suggests this is specifically a MySQL tool limitation rather than a general AI Agent issue. You might want to report this as a bug to the n8n team if the workarounds don’t solve it.