Skip to main content
Glama

mysql

Execute SQL queries on a MySQL/MariaDB database. Supports SELECT, INSERT, UPDATE, DELETE, SHOW, DESCRIBE, and other statements, returning formatted table output or affected row count.

Instructions

Execute SQL queries on a MySQL/MariaDB database. Supports SELECT, INSERT, UPDATE, DELETE, SHOW, DESCRIBE, and other SQL statements. SELECT-like queries return formatted table output with column alignment. Non-SELECT queries return affected row count and last insert ID. Connection is closed after each call (no session pooling). Max 1000 rows returned, long values truncated at 200 characters.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hostYesMySQL server hostname or IP address,required
portNoMySQL port number. Default: 3306
userYesMySQL username,required
passwordNoPassword for authentication
databaseNoDatabase name to connect to
queryYesSQL query to execute,required
timeout_secNoQuery timeout in seconds. Default: 30, Max: 120
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description discloses key behaviors beyond what annotations would provide: connection closure after each call, row limits (1000), truncation (200 chars), and distinct output formats for SELECT vs non-SELECT queries. This fully compensates for the lack of annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise (6 sentences), front-loaded with the core purpose, and every sentence adds distinct value without repetition or fluff.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers output behavior for both query types and sets clear limits. However, it lacks error handling details (e.g., connection failures, invalid queries). Given the absence of an output schema, this is a minor gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Input schema coverage is 100%, so each parameter is already described. The tool description adds no further detail on individual parameters, providing only general behavior. Baseline score of 3 is appropriate as schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool executes SQL queries on MySQL/MariaDB databases and lists supported statement types, making the purpose explicit and distinguishing it from sibling tools (it is the only database tool).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit when-to-use or when-not-to-use guidance is provided. While there are no direct sibling database tools, the description omits prerequisites (e.g., network access, credentials) and does not contrast with alternative approaches like using 'bash' to run mysql client.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/knewstimek/agent-tool'

If you have feedback or need assistance with the MCP directory API, please join our Discord server