Sim

MySQL

Connect to MySQL database

The MySQL tool enables you to connect to any MySQL database and perform a wide range of database operations directly within your agentic workflows. With secure connection handling and flexible configuration, you can easily manage and interact with your data.

With the MySQL tool, you can:

  • Query data: Execute SELECT queries to retrieve data from your MySQL tables using the mysql_query operation.
  • Insert records: Add new rows to your tables with the mysql_insert operation by specifying the table and data to insert.
  • Update records: Modify existing data in your tables using the mysql_update operation, providing the table, new data, and WHERE conditions.
  • Delete records: Remove rows from your tables with the mysql_delete operation, specifying the table and WHERE conditions.
  • Execute raw SQL: Run any custom SQL command using the mysql_execute operation for advanced use cases.

The MySQL tool is ideal for scenarios where your agents need to interact with structured data—such as automating reporting, syncing data between systems, or powering data-driven workflows. It streamlines database access, making it easy to read, write, and manage your MySQL data programmatically.

Usage Instructions

Integrate MySQL into the workflow. Can query, insert, update, delete, and execute raw SQL.

Tools

mysql_query

Execute SELECT query on MySQL database

Input

ParameterTypeRequiredDescription
hoststringYesMySQL server hostname or IP address
portnumberYesMySQL server port (default: 3306)
databasestringYesDatabase name to connect to
usernamestringYesDatabase username
passwordstringYesDatabase password
sslstringNoSSL connection mode (disabled, required, preferred)
querystringYesSQL SELECT query to execute

Output

ParameterTypeDescription
messagestringOperation status message
rowsarrayArray of rows returned from the query
rowCountnumberNumber of rows returned

mysql_insert

Insert new record into MySQL database

Input

ParameterTypeRequiredDescription
hoststringYesMySQL server hostname or IP address
portnumberYesMySQL server port (default: 3306)
databasestringYesDatabase name to connect to
usernamestringYesDatabase username
passwordstringYesDatabase password
sslstringNoSSL connection mode (disabled, required, preferred)
tablestringYesTable name to insert into
dataobjectYesData to insert as key-value pairs

Output

ParameterTypeDescription
messagestringOperation status message
rowsarrayArray of inserted rows
rowCountnumberNumber of rows inserted

mysql_update

Update existing records in MySQL database

Input

ParameterTypeRequiredDescription
hoststringYesMySQL server hostname or IP address
portnumberYesMySQL server port (default: 3306)
databasestringYesDatabase name to connect to
usernamestringYesDatabase username
passwordstringYesDatabase password
sslstringNoSSL connection mode (disabled, required, preferred)
tablestringYesTable name to update
dataobjectYesData to update as key-value pairs
wherestringYesWHERE clause condition (without WHERE keyword)

Output

ParameterTypeDescription
messagestringOperation status message
rowsarrayArray of updated rows
rowCountnumberNumber of rows updated

mysql_delete

Delete records from MySQL database

Input

ParameterTypeRequiredDescription
hoststringYesMySQL server hostname or IP address
portnumberYesMySQL server port (default: 3306)
databasestringYesDatabase name to connect to
usernamestringYesDatabase username
passwordstringYesDatabase password
sslstringNoSSL connection mode (disabled, required, preferred)
tablestringYesTable name to delete from
wherestringYesWHERE clause condition (without WHERE keyword)

Output

ParameterTypeDescription
messagestringOperation status message
rowsarrayArray of deleted rows
rowCountnumberNumber of rows deleted

mysql_execute

Execute raw SQL query on MySQL database

Input

ParameterTypeRequiredDescription
hoststringYesMySQL server hostname or IP address
portnumberYesMySQL server port (default: 3306)
databasestringYesDatabase name to connect to
usernamestringYesDatabase username
passwordstringYesDatabase password
sslstringNoSSL connection mode (disabled, required, preferred)
querystringYesRaw SQL query to execute

Output

ParameterTypeDescription
messagestringOperation status message
rowsarrayArray of rows returned from the query
rowCountnumberNumber of rows affected

Notes

  • Category: tools
  • Type: mysql
MySQL