Skip to main content
Glama
MySQL Automation MCP Server

MySQL Automation MCP Server

Export Query Results

export_query_results

Execute read-only SQL queries and export results as CSV or JSON files for analysis or reporting.

Instructions

Execute a read-only query and export the results to ./exports/ (CSV or JSON).

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": {
      "sql": "<sql>"
    },
    "name": "export_query_results"
  }
}

Input Schema

NameRequiredDescriptionDefault
sqlYes
formatNocsv
filenameNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/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 behavioral burden. It usefully discloses the read-only constraint and the fixed output directory pattern, but says nothing about overwriting existing files, whether ./exports must pre-exist, or how large result sets are handled — all material for a tool that writes to disk.

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?

A single compact sentence with the action, the safety property, and the output destination front-loaded. Nothing is redundant given the description's short length.

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?

An output schema exists, so return values need not be described, and the core contract (read-only query in, file out) is present. The remaining gap is file-write semantics such as overwrite behavior, which is a moderate rather than fatal omission.

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 0%, so the description must compensate, and it only partly does: it maps sql to a read-only query, format to CSV or JSON, and filename into ./exports/<filename>. It does not explain what happens when filename is null (the documented default) or that csv is the default format.

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 compound verb (execute + export) and the resource (query results), plus the read-only nature and output location. This implicitly separates it from execute_query, which returns results inline, though it never names that sibling.

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?

Usage is only implied: an agent can infer this tool is for when results should land in a file rather than be returned directly. There is no explicit 'use this instead of X when...' routing or statement of preconditions (existing directory, connection state).

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