Skip to main content
Glama
MySQL MCP Server

MySQL MCP Server

by berthojoris

export_table_to_csv

Read-onlyIdempotent

Exports MySQL table data to CSV with filtering, sorting, and pagination. Use it to save query results as spreadsheet-ready files for reporting or sharing.

Instructions

📄 Exports table data to CSV format with filtering, pagination, and sorting. Requires both utility and read permissions.

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": "export_table_to_csv"
  }
}

Input Schema

NameRequiredDescriptionDefault
filtersNoArray of filter conditions
sortingNo
paginationNo
table_nameYesName of the table to export
include_headersNoWhether to include column headers in the CSV output

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.46.0

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is fully covered. The description adds genuinely useful non-schema context — the requirement for both utility and read permissions — but says nothing about where the CSV goes (file path vs. inline text), size limits, or truncation behavior for large tables.

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?

Two short sentences, front-loaded with the action and the capability list, with no wasted clauses. The emoji is decorative noise but does not impede comprehension.

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?

For a read-only export with no output schema, the description should at minimum tell the agent what comes back — a file, a path, or inline CSV — and whether large exports are capped. It covers the permission prerequisite but leaves the return contract and scale limits unspecified across a five-parameter tool with nested objects.

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 60%, with descriptions on table_name, include_headers, pagination fields, sorting fields, and the filter value; the gaps are the filter field/operator members and the outer filters/sorting/pagination containers. The description names filtering, pagination, and sorting but adds no semantics beyond what the schema already states, so the baseline 3 is appropriate.

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?

States a specific verb and resource ('Exports table data to CSV format') and enumerates the supported capabilities (filtering, pagination, sorting). It implicitly distinguishes itself from the sibling export_query_to_csv by scoping to table data rather than query results, though it never names that sibling explicitly.

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?

There is no when-to-use guidance and no named alternative. An agent reading this cannot tell from the description alone whether to prefer this tool over export_query_to_csv or analyze_table when it wants data out of the database; only the phrase 'table data' hints at the boundary.

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