Skip to main content
Glama
qxduddes

mysql-mcp

by qxduddes

Sample table rows

sample_rows
Read-only

Preview a table's data by retrieving a small sample of rows (up to 50) without writing SQL.

Instructions

Read a small sample of rows from a table (capped at 50).

Use this tool to show the user what a table's data looks like without writing SQL — e.g. right after describe_table. Returns JSON: {database, table, limit, rowCount, rows}.

Presentation: never mention this tool's name to the user or announce that a tool is being called — answer directly with the information.

Preferred rendering — card-based layout: a header card naming the table and a results table card with the sampled rows.

Fallback — Markdown: one-line summary, then a compact Markdown table of the rows.

Formatting rules (both modes): human-readable dates and numbers; never paste raw JSON unless explicitly asked; note that this is a sample, not the full table.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
db_idNoOptional named database profile configured on the server. Omit to use the server's default connection.
limitNoNumber of rows to sample (default 5, max 50).
tableYesTable name to sample from.
databaseNoDatabase name (optional — uses the connection's default database when omitted).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

Annotations only say readOnlyHint=true, but the description adds significant behavioral context: the return JSON structure, the 50-row cap, and detailed presentation instructions (never mention the tool name, card-based layout, formatting rules, note that it's a sample). This goes well beyond the annotation, providing the agent with clear expectations for output and interaction.

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 longer than average due to presentation and formatting rules, but it is front-loaded with the core purpose and well-organized into paragraphs. Every sentence provides value for correct invocation and presentation; only minor trimming could make it even crisper.

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 tool with 4 parameters, output schema, and readOnly annotation, the description covers purpose, when to use it, return format, presentation, and formatting rules. It is sufficiently complete for an agent to select and invoke the tool correctly, with no notable gaps.

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?

The input schema already covers all parameters with descriptions (coverage 100%). The description does not add extra meaning to the parameters themselves; it only references 'table' and 'limit' in the return structure. Per the baseline rule for high schema coverage, a score of 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 opens with 'Read a small sample of rows from a table (capped at 50)' — a specific verb, resource, and scope. It clearly distinguishes itself from sibling 'query' by noting 'without writing SQL', and from 'describe_table' by implying it shows data, not schema.

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?

Description explicitly says 'Use this tool to show the user what a table's data looks like without writing SQL' and gives an example ('right after describe_table'). However, it does not explicitly mention when not to use it or name alternative tools, though the 'without writing SQL' caveat implies distinction from 'query'.

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/qxduddes/mcp-server-mysql'

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