Skip to main content
Glama

export_result

Run a SQL query and write the full result set to a .csv or .xlsx file inside the server's configured export directory. Returns the written path and dimensions.

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>",
      "file": "<file>"
    },
    "name": "export_result"
  }
}

Input Schema

NameRequiredDescriptionDefault
sqlYesSQL statement producing the rows to export
fileYesRelative file name ending in .csv or .xlsx (subdirectories allowed, no ..)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

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 must carry the full behavioral burden. It usefully discloses the side effect (a file written to the server's configured export directory) and the return payload (path and dimensions), but is silent on overwrite behavior for existing files, whether the SQL is restricted to read-only statements, and any size or timeout limits.

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, with the core action and the return value front-loaded. Nothing repeats the name or padding.

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 two-parameter tool with a rich schema and no output schema, the description covers the destination, the artifact types and the return shape. The main remaining gap is overwrite semantics for pre-existing target files, which matters for a write-side-effect tool.

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 100%, so both parameters are already documented, including the .csv/.xlsx extension rule and the no-'..' path constraint. The description only adds 'full result set' framing for the sql parameter, which is marginal.

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 two-part action (run SQL, write full result set) and the output artifact types (.csv/.xlsx) plus the destination directory. This implicitly separates it from query_sql, but the description never names the sibling that returns rows inline, so differentiation is inferred rather than explicit.

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: the word 'full result set' suggests this is for large outputs rather than quick lookups, but there is no explicit when-to-use/when-not guidance and no mention of query_sql as the alternative for inspecting results.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.