Skip to main content
Glama
qq5032449

MySQL MCP Server

by qq5032449

get_table_sample

Read-only

Fetch a small sample of rows from any table to quickly inspect its data format and content before writing queries. Supports database-qualified names and aliases for cross-database sampling.

Instructions

Fetch a small sample of rows from a table to understand its data format and content. Use alongside get_schema_info before writing complex queries. Accepts bare table names (uses MYSQL_DATABASE) or database.table for cross-database lookups. Use alias to target a different configured database.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aliasNo数据库别名,或管理页面 /admin 中为该库配置的项目名称(项目文件夹名)。在单个 SSE 连接内通过此参数切换不同库;省略时用连接 URL ?alias 指定的别名或默认别名。建议优先传当前项目文件夹名自动匹配对应数据库。
limitNoNumber of rows to return (default 5, max 20).
table_nameYesTable to sample. Use database.table notation for cross-database queries.

Schema Changelog

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

  1. First observedv0.4.4

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so safety is covered. The description adds valuable behavioral context: bare table names use MYSQL_DATABASE, database.table enables cross-database lookups, and alias switches the configured database target. It does not describe return shape or sampling order, but these are less critical given the read-only annotations.

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 four sentences with no filler: purpose, usage timing, table-name syntax, and alias behavior each get one focused sentence. It is front-loaded with the core action and reads efficiently.

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

Completeness5/5

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

For a simple read-only sampler with no output schema, the description covers what the tool does, when to use it, how to name tables, and how to override the database target. An agent has enough information to invoke it correctly without needing to infer anything beyond the schema.

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

Parameters4/5

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

Schema description coverage is 100%, so the baseline is 3. The description goes beyond the schema by specifying that bare table names resolve to MYSQL_DATABASE and reinforcing how alias targets a different configured database. The limit parameter needs no extra explanation because the schema already documents default and maximum.

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?

Description states a specific action and resource: 'Fetch a small sample of rows from a table to understand its data format and content.' It also names a companion tool (get_schema_info) and clearly frames this as an exploration tool, which distinguishes it from execute_sql even without an explicit contrast.

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 gives clear context: 'Use alongside get_schema_info before writing complex queries,' indicating when this tool is appropriate. It does not explicitly state when to prefer execute_sql instead, but the phrase 'before writing complex queries' implies the alternative, so it falls just short of fully explicit exclusion guidance.

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/qq5032449/mysql_mcp_server'

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