Skip to main content
Glama

insert

Execute INSERT statements with parameterized placeholders for safe MySQL writes, returning affected rows and last insert ID. Requires readwrite mode.

Instructions

Execute an INSERT statement and return the affected row count and last insert id. Only available when the server is running in 'readwrite' mode; rejected with PERMISSION_DENIED in 'readonly' mode. Always use %s placeholders in query with values passed via params; never concatenate user-supplied values into query.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
paramsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

While no annotations are provided, the description discloses key behavioral traits: the mode-dependent availability (PERMISSION_DENIED in readonly mode) and the return values (affected row count and last insert id). It also provides security guidance on parameterization, which is essential for agent behavior.

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 two sentences, front-loaded with the primary purpose, followed by mode restriction and security guidance. Every sentence earns its place; no filler or redundancy.

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

Completeness5/5

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

The tool has an output schema, which may explain return values, so the agent knows what to expect. The description covers the key semantics: the operation and parameterization. It gives clear guidance on mode requirements and security, which is sufficient for a tool with only two simple parameters and an output schema.

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?

The schema has 0% description coverage, so the description must compensate. It does explain the purpose of `query` (the INSERT statement) and `params` (values for placeholders), but it doesn't detail the exact types or format expectations beyond mentioning placeholders. The baseline is 3 because the description adds some meaning but not fully.

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

Purpose4/5

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

The description clearly states the tool's purpose: to execute an INSERT statement and return the affected row count and last insert id. It distinguishes itself from siblings (select, update, delete) by naming the specific SQL operation, though it could explicitly contrast with siblings.

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

Usage Guidelines4/5

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

The description provides explicit usage context: only available in 'readwrite' mode, and it warns against concatenating user-supplied values, instructing to use placeholders. It does not explicitly mention when not to use it (e.g., for other SQL operations), but the sibling names make that clear.

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/bomsan69/mysql-mcp-server'

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