Skip to main content
The MySQL MCP Server provides 14 tools for database operations, ML/GenAI, vector stores, and OCI Object Storage.

Database Connection Tools

list_all_connections

List all configured database connections and their provider modes. Parameters: None Returns: List of connection IDs with provider information (MySQL AI or HeatWave) Example:
"List all configured database connections"
Response:
[
  {
    "connection_id": "dev_db",
    "mode": "MySQL AI"
  },
  {
    "connection_id": "prod_heatwave",
    "mode": "HeatWave"
  }
]

execute_sql_tool_by_connection_id

Execute SQL statements on a specific database connection. Parameters:
  • connection_id (string, required): Database connection identifier
  • sql_script (string, required): SQL statement(s) to execute
  • params (object, optional): Parameters for parameterized queries
Returns: Query results or execution status Example:
"Execute 'SELECT * FROM employees LIMIT 10' on dev_db"
Supported Modes: MySQL AI, HeatWave

ML and GenAI Tools

ml_generate

Generate text using GenAI models. Parameters:
  • connection_id (string, required): Database connection identifier
  • question (string, required): Text generation prompt
Returns: Generated text response Example:
"Generate a summary of recent customer feedback using my_connection"
Supported Modes: MySQL AI, HeatWave

ragify_column

Create and populate a VECTOR column with embeddings from a text column. Parameters:
  • connection_id (string, required): Database connection identifier
  • table_name (string, required): Name of the table
  • input_column_name (string, required): Source text column
  • embedding_column_name (string, required): Target VECTOR column (will be created if it doesn’t exist)
Returns: Success status and number of rows processed Example:
"Add embeddings for 'body' column into 'embedding' column in docs table"
Supported Modes: MySQL AI, HeatWave
The ragify_column tool works identically on both MySQL AI and MySQL HeatWave connections.

heatwave_ask_help

Ask natural language questions about MySQL HeatWave AutoML features using NL2ML. Parameters:
  • connection_id (string, required): HeatWave database connection
  • question (string, required): Natural language question about HeatWave ML
Returns: Answer about HeatWave ML functionality Example:
"How do I train a model in HeatWave AutoML?"
Supported Modes: HeatWave only
This tool only works with MySQL HeatWave connections. It will return a clear error message if used with MySQL AI.

ask_nl_sql

Convert natural language questions into SQL queries and execute them automatically. Parameters:
  • connection_id (string, required): Database connection identifier
  • question (string, required): Natural language question
Returns: SQL query generated and execution results Example:
"What is the average delay incurred by flights?"
"Show me the top 5 customers by total order value"
Supported Modes: MySQL AI, HeatWave

retrieve_relevant_schema_information

Retrieve relevant schemas and tables (DDL) for a natural language question. Parameters:
  • connection_id (string, required): Database connection identifier
  • question (string, required): Natural language question
Returns: DDL statements for relevant tables and schemas Example:
"Which tables contain employee salary information?"
Supported Modes: MySQL AI, HeatWave

Vector Store Tools

list_vector_store_files_local

List available files in the secure_file_priv directory for local ingestion. Parameters:
  • connection_id (string, required): Database connection identifier
Returns: List of file paths available for loading Example:
"List local files for vector store ingestion"
Supported Modes: MySQL AI only
This tool does not work with MySQL HeatWave connections. Use load_vector_store_oci for HeatWave.

load_vector_store_local

Load documents from the local filesystem into a vector store. Parameters:
  • connection_id (string, required): Database connection identifier
  • file_path (string, required): Path to file in secure_file_priv directory
Returns: Loading status and document count Example:
"Load documents from /var/lib/mysql-files/manuals.pdf into vector store"
Supported Modes: MySQL AI only

load_vector_store_oci

Load documents from OCI Object Storage into a vector store. Parameters:
  • connection_id (string, required): HeatWave database connection
  • namespace (string, required): OCI Object Storage namespace
  • bucket_name (string, required): Bucket containing documents
  • document_prefix (string, required): Prefix filter for objects to load
Returns: Loading status and document count Example:
"Load all documents with prefix 'manuals/' from bucket 'company-docs' into vector store"
Supported Modes: HeatWave only
This tool only works with MySQL HeatWave (OCI) connections. For MySQL AI, use load_vector_store_local.

ask_ml_rag_vector_store

Perform RAG (Retrieval-Augmented Generation) query on the default vector store. Parameters:
  • connection_id (string, required): Database connection identifier
  • question (string, required): Natural language question
  • context_size (integer, optional): Number of context chunks to retrieve
Returns: Generated answer based on vector store contents Example:
"Ask ml_rag: Show me refund policy from the vector store"
"What does the documentation say about installation requirements?"
Supported Modes: MySQL AI, HeatWave

ask_ml_rag_innodb

Perform RAG query restricted to InnoDB tables using specified segment and embedding columns. Parameters:
  • connection_id (string, required): Database connection identifier
  • question (string, required): Natural language question
  • segment_col (string, required): Column containing text segments
  • embedding_col (string, required): Column containing vector embeddings
  • context_size (integer, optional): Number of context chunks to retrieve
Returns: Generated answer based on InnoDB table contents Example:
"Search my product_docs table for information about warranty policies"
Supported Modes: MySQL AI, HeatWave
On MySQL HeatWave, this tool loads the InnoDB table into the HeatWave cluster for maximum performance. On MySQL AI, processing occurs within the database service instance.

ask_ml_rag_vector_store (skip_generate mode)

Retrieve segments from the default vector store without text generation. Parameters:
  • connection_id (string, required): Database connection identifier
  • question (string, required): Natural language question
  • context_size (integer, optional): Number of segments to retrieve
Returns: Raw text segments without LLM generation Example:
"Retrieve relevant segments about installation from vector store"
Supported Modes: MySQL AI, HeatWave

OCI Object Storage Tools

These tools require a valid OCI configuration file (~/.oci/config). See Configuration for setup details.

list_all_compartments

List all compartments in your OCI tenancy. Parameters: None Returns: List of compartment names and OCIDs Example:
"List all compartments in my tenancy"

object_storage_list_buckets

List buckets in a specific compartment. Parameters:
  • compartment_name (string, optional): Compartment name
  • compartment_id (string, optional): Compartment OCID (alternative to name)
Returns: List of bucket names Example:
"Show all buckets in the development compartment"
"List buckets in ocid1.compartment.oc1..."

object_storage_list_objects

List objects in a bucket. Parameters:
  • namespace (string, required): OCI Object Storage namespace
  • bucket_name (string, required): Bucket name
Returns: List of object names and metadata Example:
"List objects in my 'docs-bucket'"

Tool Compatibility Matrix

ToolMySQL AIHeatWaveOCI Config Required
list_all_connections
execute_sql_tool_by_connection_id
ml_generate
ragify_column
heatwave_ask_help
ask_nl_sql
retrieve_relevant_schema_information
list_vector_store_files_local
load_vector_store_local
load_vector_store_oci
ask_ml_rag_vector_store
ask_ml_rag_innodb
list_all_compartments
object_storage_list_buckets
object_storage_list_objects

Error Handling

The server provides clear, actionable error messages:
  • Unsupported Connection Type: When a tool is used with an incompatible database mode
  • Missing OCI Config: When cloud features are used without OCI configuration
  • SQL Errors: Database errors with query context
  • Parameter Validation: Missing or invalid tool parameters

Next Steps

Vector Stores

Learn about loading documents and RAG queries

ML & GenAI

Deep dive into ML/GenAI features

Build docs developers (and LLMs) love