Skip to main content
Glama
akrym1582

sqldb-mcp-server

by akrym1582

exportQuery

Execute a read-only SELECT SQL query and stream results to a CSV or JSON file. Supports large datasets with no row limit.

Instructions

Execute a read-only SELECT SQL query and stream the results to a file. Supports CSV and JSON output formats. Designed for large datasets – results are streamed directly to disk without a row-count limit. CSV options: delimiter (default ','), nullValue (default ''), bom (default false). JSON options: pretty (default false). Timeout is controlled by the EXPORT_QUERY_TIMEOUT environment variable (default: 300 s).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesSELECT SQL statement whose results should be exported
formatNoOutput format. "csv" (default) or "json"
optionsNoFormat-specific options. CSV: delimiter (default ","), nullValue (default ""), bom (default false). JSON: pretty (default false). Additional keys are accepted for forward compatibility.
filepathYesDestination file path (absolute, or relative to the server working directory)
Behavior5/5

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

With no annotations, the description fully discloses behavioral traits: read-only (SELECT only), streaming to file, no row-count limit, timeout controlled by environment variable, and format-specific options with defaults. This is comprehensive for a data export tool.

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 four sentences, front-loaded with the primary action. It is efficient but could be slightly more compact; however, no extraneous information is present.

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?

The description covers input parameters and behavior (streaming, timeout) but lacks details on error handling, file overwrite behavior, or permission requirements. For a tool with no output schema, this is fairly complete given its complexity.

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

Parameters5/5

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

Schema coverage is 100%, but the description adds significant meaning: default values for CSV/JSON options, accepted keys, and timeout env variable. It explains formatting details beyond the schema's basic descriptions.

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 clearly states it executes a read-only SELECT query and streams results to a file, supporting CSV and JSON formats. This distinguishes it from sibling tools like query (returns results inline) and saveQueryEvidence (likely saves query evidence rather than results).

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 specifies it is designed for large datasets and streams to disk without row-count limit. It implicitly suggests use for exporting large result sets, but does not explicitly mention when not to use or alternatives like query for interactive results.

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/akrym1582/sqldb-mcp-server'

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