Skip to main content
Glama
joyous-coder

universal-db-mcp

by joyous-coder

execute_sql_file

Execute SQL scripts from whitelisted file paths against your database, with dry-run and transaction control for safe deployment.

Instructions

执行 .sql 文件(最多 1000 条语句)。需要 permissions 包含 script + DB_ALLOWED_FILE_PATHS。⚠️ 路径必须在 DB_ALLOWED_FILE_PATHS 白名单内。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dryRunNov4.0 G8 增强:true = 只解析 + lint,不执行
filePathYes文件路径(必须在白名单内)
maxStatementsNo
useTransactionNo

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv5.0.2

TDQS

C2.9/5.0
Behavior3/5

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

No annotations are provided, so the description carries the behavioral disclosure burden. It does disclose the permission requirement and whitelist restriction, which is useful, but it does not mention side effects, transaction behavior, dry-run behavior, or failure modes for a tool that executes SQL files.

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 short and front-loaded with the main action. However, the whitelist constraint is stated twice, which is mildly redundant and weakens the otherwise tight structure.

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?

For an execution tool with no output schema and no annotations, this description is under-specified. It omits return values, error behavior, transaction default behavior, dry-run behavior, and clear differentiation from execute_script/execute_batch.

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

Parameters2/5

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

Schema description coverage is only 50%. The description adds meaning for filePath (whitelist) and maxStatements (1000 statement limit), but dryRun and useTransaction receive no description-level semantics, and useTransaction is undocumented in the schema as well.

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 action ('执行 .sql 文件') and identifies the resource type with a meaningful constraint (max 1000 statements). It is specific enough to distinguish from the many query/list siblings, though it does not explicitly name a competing tool.

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

Usage Guidelines2/5

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

The description gives preconditions (permissions and whitelisted path) but no guidance on when to use this tool versus execute_query, execute_script, or execute_batch. There is no alternative-selection context.

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

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/joyous-coder/universal-db-mcp'

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