1
Create a database tool config
Provide connection parameters through
POST /api/tools_config.2
Enable the tool on an agent
Add the
text_to_sql tool config id to the agent’s agent_tools.3
Ask
The agent introspects the schema, generates SQL, executes it, and answers from the
result set.
A query that returns no rows surfaces as
422, not as an empty success — see
Errors.