Skip to main content
Glama
cocaxcode

@cocaxcode/database-mcp

by cocaxcode

execute_mutation

Execute SQL write operations (INSERT, UPDATE, DELETE, DDL) with confirmation and snapshot rollback. Use verbosity=minimal to get only affected row counts.

Instructions

Ejecuta una mutacion (INSERT, UPDATE, DELETE, DDL). Pide confirmacion y crea snapshot para rollback. El result se comprime por defecto — para mutations usa verbosity=minimal si solo te interesa affectedRows.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesSentencia SQL de escritura
paramsNoParametros para prepared statement
verbosityNoControls result detail to save context tokens. Default: 'normal'. - 'minimal': Only rowCount, executionTimeMs, affectedRows, and preview of first row. USE FOR: INSERT/UPDATE/DELETE where you only need to confirm success, COUNT queries, health-style SQL ("SELECT 1"), polling a job status. SAVES: ~90-95% tokens. - 'normal' (DEFAULT): Full rows but each CELL truncated to max_cell_bytes. Preserves table structure. Cells flagged with trailing '…(+NB)' marker when truncated. USE FOR: most SELECT debugging — browsing tables with TEXT/JSONB columns, exploring data. SAVES: ~60-80% tokens on tables with large columns (content, html, json payloads). - 'full': Entire result untouched. SAME SHAPE AS pre-compression releases. USE FOR: when you explicitly need the complete value of every cell. If a cell is truncated you can call inspect_last_query({ call_id }) to recover the full result WITHOUT re-executing the SQL (preserves DB load and any side-effects).
only_columnsNoReturn only these columns from the result (client-side projection after fetch). Cheaper than full when the SQL already returned extra columns you don't need. Example: ["id", "title", "slug"] drops all other columns from the response.
max_cell_bytesNoMax bytes per cell for verbosity='normal' (default: 500). Cells longer than this are truncated with '…(+NB)' suffix. Ignored for minimal/full.
max_rows_in_responseNoCap rows returned to the agent (does NOT change the SQL LIMIT). Useful to peek at a big result. Default: no cap beyond SQL LIMIT.
Behavior4/5

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

The description discloses key behaviors: it requests confirmation and creates a snapshot for rollback. It also mentions default result compression. These are important side effects that might not be obvious, and no annotations are present to cover them. However, it does not explicitly mention irreversibility (except via rollback) or potential locking, but the core behaviors are transparent.

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 extremely concise, consisting of two short sentences. It conveys the essential purpose and a key usage hint without any extraneous information. The structure is clear and to the point.

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

Completeness2/5

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

The description does not explain what the tool returns. It mentions result compression but not the structure or content of the response (e.g., affected rows, result set, error handling). Given that there is no output schema, the description should clarify the return value. This omission makes the tool's context incomplete for a caller.

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 provides detailed descriptions for all parameters (100% coverage). The tool description adds a specific note about using verbosity=minimal for mutations, which is useful, but it does not add significant semantic value beyond what the schema already offers. According to the baseline for high schema coverage, a score of 3 is appropriate.

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 that the tool executes mutations (INSERT, UPDATE, DELETE, DDL), which unambiguously specifies its purpose and distinguishes it from query-only tools like execute_query.

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?

The description provides some guidance (e.g., using verbosity=minimal for mutations when only affectedRows matter), but it does not explicitly advise when to use this tool versus alternatives like execute_query or explain_query. The distinction is implicit from the term 'mutacion' but not directly contrasted with siblings.

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/cocaxcode/database-mcp'

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