Skip to main content

Database Tool

This tool allows your agent to execute SQL queries directly against databases, enabling data retrieval, analysis, and database operations across different database systems.

Database Tool Database Tool Mobile

Parameters

This are the Tools Parameters. They can be configured as "static" during configuration of the tool or left as dynamic in order to let the llm to configure them.

NameDescriptionPossible ValuesRequired
queryThe SQL query to executeAny valid SQL query stringYes
databaseType*The type of database to use'mysql', 'mssql', 'postgres'Yes
serverAddress*The server address of the databaseAny valid server address/hostnameYes
serverPort*The server port of the databaseAny valid port number as stringYes
databaseName*The name of the databaseAny valid database name stringYes
credentials*The database credentialsUsername and password credentials. See Credentials documentation for details on creating and managing credentialsYes

*This fields needs to be configured manually, only query should be left for the agent to compile

When to use this tool

Use this tool when you want to give your agent the ability to connect to and query databases directly. This is particularly useful for:

  • Data analysis and reporting: Execute complex SQL queries to analyze business data, generate reports, or extract insights from your database
  • Real-time data access: Retrieve up-to-date information from your database to answer user questions or make data-driven decisions
  • Database operations: Perform database maintenance tasks, update records, or manage data as part of automated workflows
  • Integration with business systems: Connect your agent to existing databases to provide contextual information and enhance user interactions

The tool supports multiple database types (MySQL, MSSQL, PostgreSQL) and requires proper database credentials to establish secure connections.