Skip to main content
Glama
MySQL MCP Server

MySQL MCP Server

by berthojoris

read_records

Read-onlyIdempotent

Retrieve records from a MySQL table using filters, pagination, and sorting for simple data reads. Use run_select_query for complex JOINs or aggregations.

Instructions

Reads records from a table with built-in filtering, pagination, and sorting. Use this for simple data retrieval. For complex queries with JOINs or aggregations, use run_select_query instead.

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": {
      "table_name": "<table_name>"
    },
    "name": "read_records"
  }
}

Input Schema

NameRequiredDescriptionDefault
filtersNoArray of filter conditions
sortingNo
paginationNo
table_nameYesName of the table to read from

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.46.0

TDQS

A4.2/5.0
Behavior3/5

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

The annotations already declare readOnlyHint, idempotentHint, destructiveHint=false, and openWorldHint=false, so the safety profile is fully covered by structured data. The description confirms this is simple read retrieval but adds nothing about result limits, default page sizes, or ordering behavior beyond naming the capabilities. Useful but not additive beyond what the annotations and schema already establish.

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?

Two sentences, zero filler. The capability statement comes first and the routing rule second, which is the right front-loading for an agent choosing between similar tools.

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 four-parameter nested read tool with no output schema, the description covers what and when adequately, and the absence of an output schema is not a meaningful gap for a simple record reader. The residual gap is that 50% schema coverage leaves the filter and sorting sub-objects thin, which the description does nothing to offset.

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 description coverage is 50%: table_name, pagination.page, pagination.limit, and filters.value are documented, while filter field/operator and sorting.field/direction rely on their enum and names. The description mentions filtering, pagination, and sorting but adds no semantics — no default page size, no filter-combination logic, no sort-order default — so it neither compensates for the gap nor exceeds the baseline.

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?

"Reads records from a table with built-in filtering, pagination, and sorting" gives a concrete verb plus resource and names the three capabilities available. It is immediately distinguishable from the nearest sibling, run_select_query, without opening either schema.

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

Usage Guidelines5/5

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

"Use this for simple data retrieval" sets the positive condition, and "For complex queries with JOINs or aggregations, use run_select_query instead" names the exact alternative and the trigger for switching. Both the when and the when-not are explicit.

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