Skip to main content
Glama
mark3lim

db-query-mcp

by mark3lim

run_write_query

Execute SQL statements that modify database data (INSERT, UPDATE, DELETE, DDL) after user approval. Requires a writable connection; read-only connections reject the query.

Instructions

데이터를 변경하는 쿼리(INSERT/UPDATE/DELETE/DDL 등)를 실행한다. 반드시 실행 전에 사용자에게 쿼리 내용을 보여주고 승인을 받아야 하며, Claude Code 권한 설정(ask)에 의해 실행 직전 화면에서 한 번 더 확인된다. 읽기 전용(read-only)으로 등록된 연결에서는 서버가 강제로 거부한다.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes실행할 SQL 한 문장 (DML/DDL)
connection_noYeslist_connections에서 확인한 DB 연결 번호 (예: '1')

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.1/5.0
Behavior4/5

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

The description discloses critical behavioral traits: it requires user approval before execution, Claude Code permission settings (ask) will double-check right before execution, and read-only connections will be forcibly rejected by the server. These are important behavioral details beyond what annotations would provide. Since no annotations are provided, the description carries the full burden and does it well, though it could mention what happens on failure or the return format.

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

Conciseness4/5

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

The description is concise and front-loaded with the core purpose, then adds essential behavioral warnings. It's three sentences with no wasted words. It could be slightly more structured, but it's efficient and informative.

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?

For a mutation tool with no annotations and no output schema, the description covers the key operational context: what it does, the approval requirement, the double-check mechanism, and the read-only rejection behavior. It doesn't describe the return value or error handling, but for a write tool that's less critical. The sibling context (run_select_query exists) makes the read/write distinction clear.

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?

Schema description coverage is 100%, so the schema already documents both parameters (query and connection_no). The description adds context that the query is a single SQL statement (DML/DDL) and that connection_no comes from list_connections, which is helpful. However, it doesn't add much beyond the schema's own descriptions, so baseline 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 the tool executes data-modifying SQL queries (INSERT/UPDATE/DELETE/DDL), distinguishing it from read-only query tools. The verb '실행한다' (executes) with the specific resource (data-changing queries) makes the purpose 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 clear context on when to use this tool: for data-modifying queries, and it implicitly contrasts with read-only connections. It also mentions the approval requirement before execution. However, it doesn't explicitly name the sibling alternative (run_select_query) for read-only queries, so it's not a full 5.

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