Skip to main content
Glama
db-mcp

db-mcp

by openmaxai

execute_sql

Read-only

Run read-only SQL queries on a MySQL database to explore and inspect data; results are capped at 500 rows and marked truncated when limited.

Instructions

DATETIME and DATE values are returned with the digits stored in the database and a trailing "Z" that is only formatting: they have no time zone, so do not convert them to another time zone. TIMESTAMP values are in the server's default session time zone. Execute SQL queries on the mysql database [READ-ONLY MODE] (limited to 500 rows; capped results carry "truncated": true)

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "sql": "<sql>"
    },
    "name": "execute_sql"
  }
}

Input Schema

NameRequiredDescriptionDefault
sqlYesSQL to execute (multiple statements separated by ;)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A3.6/5.0
Behavior5/5

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

Beyond the annotations, the description discloses important result behavior: DATETIME/DATE values have no time zone and should not be converted, TIMESTAMP values use the server session time zone, and capped results include a `truncated` flag. These details are valuable and do not contradict the annotations.

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

Conciseness3/5

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

The description is reasonably sized and every sentence conveys useful information, but it is not front-loaded: it opens with detailed time-zone formatting notes before stating the tool's purpose. Reordering would improve scanability.

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 read-only SQL execution tool with one parameter and no output schema, the description covers purpose, safety mode, row limiting, truncation signalling, and relevant return-value semantics. It omits error handling and permission details, but those are less critical here.

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?

There is a single `sql` parameter with full schema description coverage, so the schema already explains its meaning. The description adds no parameter-specific syntax or constraints beyond what the schema provides.

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 states a specific verb and resource: "Execute SQL queries on the mysql database." It also distinguishes the mode as read-only, but it does not explicitly differentiate this tool from the sibling `search_objects`.

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 constraints such as READ-ONLY MODE and a 500-row limit, but it does not say when to use this tool instead of alternatives or when not to use it. Usage is only implied by the tool's purpose.

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

Deploy Server

Other Tools