Skip to main content
Glama

update

Modify existing rows in a MySQL database using a parameterized SQL query and get the number of affected rows.

Instructions

Execute an UPDATE statement and return the affected row count. Only available when the server is running in 'readwrite' mode; rejected with PERMISSION_DENIED in 'readonly' mode. An UPDATE with no WHERE clause is executed but flagged with a warning, since it affects every row in the table. 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

Behavior5/5

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

The description reveals several behavioral traits: returns affected row count, is rejected in readonly mode, warns when no WHERE clause (affects all rows), and enforces parameterized queries. These go beyond the schema and give a clear picture of the tool's behavior and side effects.

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 compact yet information-dense, with each sentence serving a specific purpose: purpose, mode condition, warning, and security guideline. It is well-structured and front-loaded, with no redundant or filler content.

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?

Given the operation, mode constraints, warning behavior, and security practice, the description covers all essential aspects for using the tool correctly. It specifies the return value (affected row count) and does not leave critical gaps; it is complete for the context of an UPDATE tool.

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

Parameters5/5

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

The description clarifies the meaning and relationship of the parameters: query is an UPDATE SQL statement, params are values for placeholders, and %s placeholders must be used. This adds significant semantic detail beyond the bare schema, which only lists query and params as types.

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 an UPDATE statement and returns the affected row count, which is distinct from the sibling tools (select, insert, delete). The verb 'execute' and resource 'UPDATE statement' are specific and unambiguous.

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 conditions for usage—only in readwrite mode, with a warning for missing WHERE clause—and gives security guidance (use %s placeholders, never concatenate user-supplied values). However, it does not explicitly contrast with when to use insert or delete, so it stops short of complete alternative differentiation.

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