For the complete documentation index, see llms.txt. This page is also available as Markdown.

Basic Usage

Example requests for AI coding agents with MariaDB AI Plugins, with and without a database connection.

You don't call skills or MCP tools yourself. Instead, you describe your task to the agent, and the agent decides which skills to read and which tools to use. The following examples show typical requests.

With Skills Alone

The following requests don't require a database connection:

Write a CREATE TABLE for a product catalog, MariaDB style.
What changes if I move this application from MySQL to MariaDB?
How do I do semantic search in MariaDB?
Show me how to connect to MariaDB from Node.js.

With the MCP Server Connected

The following requests work with a database that you configured with mcp setup:

What does the schema of my orders table look like?
Why is this query slow? Run EXPLAIN on it.
Which of my tables have no primary key?
Deploy a test instance and try this migration on it first.

With a Sandbox Instance

If you don't have a database, the agent can deploy a local MariaDB Server instance for testing:

Deploy a MariaDB sandbox on port 3310.

See Sandbox Instances.

A Complete Example

The following request uses both the skills and the MCP server. The agent designs the schema with the help of the skills, and uses the MCP tools to deploy a server and run the script:

To complete the request, the agent calls sandbox.deploy, then db.connect with the connection that the sandbox registered, then db.execute_sql_script with the file, and finally db.list_objects. The directory that contains notes_app.sql must be on the allowed-paths list.

Using MariaDB Shell Yourself

You can also use MariaDB Shell directly as a SQL client. Start it with:

For a list of commands, enter the following at the MariaDB Shell prompt:

MariaDB Shell can also access the sandbox instances that the agent creates.

This page is licensed: GPLv2

Last updated

Was this helpful?