Skip to main content
Glama
mysql2-mcp-server

mysql2-mcp-server

by jcxy

mysql_list_tables

Lists all tables in a specified MySQL database, or returns available databases when no database is provided.

Instructions

列出数据库中的所有表。可传 database 参数指定库;环境未配置默认库且未传参时返回数据库列表。可用环境: default(默认: default)。结果行数上限: default ≤ 1000 行,超出会被截断并在返回中标记 truncated;请用 WHERE/LIMIT 收窄范围或先执行 COUNT(*) 取总数

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "mysql_list_tables"
  }
}

Input Schema

NameRequiredDescriptionDefault
databaseNo可选。目标数据库名;未传时使用环境配置的默认库,无默认库时返回数据库列表
environmentNo目标环境名。可用环境: default(默认: default)。未传时使用默认环境

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.1.0

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose real behavior: a 1000-row cap, truncation flagging, and the available environment. But the trailing advice 'use WHERE/LIMIT to narrow or run COUNT(*) first' is copy-pasted from a query tool and is mismatched for a table-listing tool, which weakens confidence rather than adding clarity.

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 purpose and fallback condition are front-loaded well, but the trailing sentence about row limits and WHERE/LIMIT/COUNT(*) is irrelevant boilerplate for this tool and adds noise at the end. Cutting it would make the definition tighter.

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

Completeness3/5

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

Without annotations or an output schema, the description must do more work, and it covers purpose, fallback output, environment selection, and limits. It still omits basics such as whether results include schema qualifiers or table type, and includes misleading narrowing advice instead.

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 coverage is 100%, so the schema already documents both parameters fully, and the baseline of 3 applies. The description reinforces the database parameter's default-resolution behavior, but adds no format details beyond what the schema states.

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 opens with a specific verb and resource (list all tables in the database) and clarifies the fallback case where a bare database list is returned, so the agent knows exactly what output shape to expect. It never names siblings such as mysql_describe_table or mysql_query, so differentiation is left to inference, which keeps it below a 5.

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?

It states the contextual condition for the two modes (database param supplied vs. no default DB configured), which is genuinely useful routing information. However, it gives no explicit guidance on when to prefer this over mysql_query or mysql_describe_table, so the agent must infer that this is the discovery step before inspecting or querying.

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